Commit 0bb74d2d authored by Anders Nilsson's avatar Anders Nilsson

Added new test ontology

parent 84ea25b0
......@@ -28,36 +28,36 @@ aspect ConfigGen {
s.append(" -Name \"BOARD1\" -Type \"eip000\" -Bus \"SIM\" -Address \"6\" -Digin 16 -Digout 16\n");
s.append(" -Name \"BOARDSIM\" -Type \"eip000\" -Bus \"SIM\" -Address \"1\" -Digin 16 -Digout 16\n");
// System.out.println("devices: "+getNumDevice());
for (int i=0; i<getNumDevice(); i++) {
Device d = (Device) getDevice(i);
// System.out.println("Subdevice: "+d.id());
if (d instanceof IO_Board) {
s.append(" -Name ");
s.append("\""+d.id()+"\" ");
s.append("-Type ");
s.append("\""+d.id()+"\" ");
s.append("-Bus \"BASE\" ");
System.out.println(d.getNumProperty());
d.dumpTree("",System.out);
for (int j=0; j<d.getNumProperty(); j++) {
System.out.println(d.getProperty(j).decl().name());
if (d.getProperty(j).decl() instanceof Signal) {
Signal sig = (Signal) d.getProperty(j).decl();
if (sig instanceof DigIn) {
s.append(" -Digin ");
} else if (sig instanceof DigOut) {
s.append(" -DigOut ");
} else {
s.append(" Unknown_Signal ");
}
s.append(sig.getValue());
}
}
s.append("\n");
// s.append("-Digin 16 -Digout 16\n");
// for (int i=0; i<getNumDevice(); i++) {
// Device d = (Device) getDevice(i);
// // System.out.println("Subdevice: "+d.id());
// if (d instanceof IO_Board) {
// s.append(" -Name ");
// s.append("\""+d.id()+"\" ");
// s.append("-Type ");
// s.append("\""+d.id()+"\" ");
// s.append("-Bus \"BASE\" ");
// System.out.println(d.getNumProperty());
// d.dumpTree("",System.out);
// for (int j=0; j<d.getNumProperty(); j++) {
// System.out.println(d.getProperty(j).decl().name());
// if (d.getProperty(j).decl() instanceof Signal) {
// Signal sig = (Signal) d.getProperty(j).decl();
// if (sig instanceof DigIn) {
// s.append(" -Digin ");
// } else if (sig instanceof DigOut) {
// s.append(" -DigOut ");
// } else {
// s.append(" Unknown_Signal ");
// }
// s.append(sig.getValue());
// }
// }
// s.append("\n");
// // s.append("-Digin 16 -Digout 16\n");
}
}
// }
// }
s.append("#\n");
s.append("EIO_SAFETY_SIGNAL = EIO_SIGNAL:\n");
s.append(" -Name \"BatAlarm\" -Type \"DO\" -Unit \"BOARD1\" -Phsig 3 -Store\n");
......
......@@ -180,6 +180,7 @@ SPECIAL_TOKEN : /* COMMENTS */
"\u0041"-"\u005a",
"\u005f",
"\u0061"-"\u007a",
"\u00b5",
"\u00c0"-"\u00d6",
"\u00d8"-"\u00f6",
"\u00f8"-"\u00ff",
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment