--- /dev/null
+@use Control.
+
+@plugin "plugin.so" (SAbrFunctions).
+
+Object : Teoria (aka Teorias) {
+
+ + variables:
+ ptr (pointer).
+
+ + to init named name (string) with-action action (int)
+ executed k = 1 (int) succeeded p = 1 (int):
+ ptr = TeoriaNew(name, action, k, p).
+
+ + to add-dato-inicial name theName (string) value theValue (float):
+ TeoriaAddDatoInicial(ptr, theName, theValue).
+
+ + to add-dato-final name theName (string) value theValue (float):
+ TeoriaAddDatoFinal(ptr, theName, theValue).
+
+ - to get-ptr:
+ return ptr.
+
+ + to destroy:
+ TeoriaDelete(ptr).
+}
+
+Object : SistemaAutonomo {
+
+ + variables:
+ ptr (pointer).
+
+ + to init:
+ ptr = SistemaAutonomoNew().
+
+ + to add teoria theTeoria (object):
+ SistemaAutonomoAddTeoria(ptr, (theTeoria get-ptr)).
+
+ + to destroy:
+ SistemaAutonomoDelete(ptr).
+}
+
--- /dev/null
+@use Control.
+@use SistemaAutonomo.
+
+Controller SistemaAutonomoController.
+
+Control : SistemaAutonomoController {
+
+ + to init:
+ teorias (list).
+ sa (object).
+
+ sa = new SistemaAutonomo.
+ teorias = 3 new Teorias.
+ teorias{0} init named "t1" with-action 1.
+ teorias{1} init named "t2" with-action 2.
+ teorias{2} init named "t3" with-action 3.
+
+ (teorias{0}) add-dato-inicial name "sensor1" value 10.5.
+ (teorias{0}) add-dato-inicial name "sensor2" value 0.5.
+ (teorias{1}) add-dato-inicial name "sensor1" value 0.5.
+ (teorias{1}) add-dato-inicial name "sensor2" value 10.5.
+ (teorias{2}) add-dato-inicial name "sensor1" value 5.5.
+ (teorias{2}) add-dato-inicial name "sensor2" value 5.5.
+
+ sa add teoria (teorias{0}).
+ sa add teoria (teorias{1}).
+ sa add teoria (teorias{2}).
+
+ free teorias{0}.
+ free teorias{1}.
+ free teorias{2}.
+ free sa.
+
+}
+
return EC_OK;\r
}\r
\r
-// void TeoriaAddDatoInicial(pointer{Teoria}, string, double)\r
+// void TeoriaAddDatoInicial(pointer{Teoria}, string, float)\r
int SAbrTeoriaAddDatoInicial(brEval args[], brEval* result, void* data)\r
{\r
CTeoria* t = (CTeoria*) BRPOINTER(args);\r
return EC_OK;\r
}\r
\r
-// void TeoriaAddDatoFinal(pointer{Teoria}, string, double)\r
+// void TeoriaAddDatoFinal(pointer{Teoria}, string, float)\r
int SAbrTeoriaAddDatoFinal(brEval args[], brEval* result, void* data)\r
{\r
CTeoria* t = (CTeoria*) BRPOINTER(args);\r