Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed
Fork of ICE by
Diff: src/ConfigurationHandler/Controls/CompositeControl.cpp
- Revision:
- 227:7153e89b6974
- Parent:
- 222:94ea9a091d99
- Child:
- 229:0d6755d765fd
diff -r 1a03451c0870 -r 7153e89b6974 src/ConfigurationHandler/Controls/CompositeControl.cpp
--- a/src/ConfigurationHandler/Controls/CompositeControl.cpp Mon Oct 17 13:05:06 2016 +0000
+++ b/src/ConfigurationHandler/Controls/CompositeControl.cpp Tue Oct 18 12:23:27 2016 +0000
@@ -181,19 +181,29 @@
return "nothing";
}
+ // equal to operator
if ( ca->getOp() == "==" ) {
- //printf("\rvalue = %f opr = %f\n", value.value, atof(ca->getOpr().c_str()));
+ // perform the
if ( value.value == atof(ca->getOpr().c_str()) ) {
return ca->getResultTrue();
} else {
return ca->getResultFalse();
}
}
+ // addition operator
if ( ca->getOp() == "+" ) {
- // do nothing
+ // TODO
}
+ // multiply operator
+ if ( ca->getOp() == "*" ) {
+ // TODO:
+ }
+ // subtraction operator
+ if ( ca->getOp() == "-" ) {
+ // TODO:
+ }
+
return "nothing";
-
}
//
@@ -242,12 +252,14 @@
OutputControlMsg_t *output_mail = OutputMasterMailBox.alloc();
memset(output_mail, 0, sizeof(OutputControlMsg_t));
- output_mail->action = action;
- output_mail->controlType = CONTROL_COMPOSITE;
+ output_mail->action = action;
+ output_mail->controlType = CONTROL_COMPOSITE;
+ output_mail->priority = this->priority;
+
strncpy(output_mail->input_tag, this->tag.c_str(), sizeof(output_mail->input_tag)-1);
strncpy(output_mail->output_tag, io_tag.c_str(), sizeof(output_mail->output_tag)-1);
- output_mail->priority = this->priority;
strncpy(output_mail->id, this->id.c_str(), sizeof(output_mail->id)-1);
+
OutputMasterMailBox.put(output_mail);
}
@@ -287,7 +299,7 @@
"CONTROL_OFF",
"CONTROL_ON"
};
-
+\
printf("\r control file : %s\n", controlFile.c_str());
printf("\r id : %s\n", id.c_str());
printf("\r tag : %s\n", tag.c_str());
