Skip to content
Snippets Groups Projects
Commit 0bb74d2d authored by Anders Nilsson's avatar Anders Nilsson
Browse files

Added new test ontology

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