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/ManualControl.h
- Revision:
- 217:d5a2ff093319
- Parent:
- 164:7cecd731882e
- Child:
- 262:696cd48bb04a
--- a/src/ConfigurationHandler/Controls/ManualControl.h Mon Oct 10 16:07:40 2016 +0000
+++ b/src/ConfigurationHandler/Controls/ManualControl.h Tue Oct 11 12:24:28 2016 +0000
@@ -19,35 +19,79 @@
string output; // output
unsigned int type; // timed, continuous, setpoint
unsigned int priority; // control priority
- unsigned int duration;
- float setpoint;
+ unsigned int duration; // in seconds (not implemented)
+ float setpoint; // setpoint (not implemented)
unsigned int state; // ON or OFF
unsigned int percent; // analog/manual value
enum State {
- STATE_INIT,
- STATE_STARTUP,
- STATE_CONTROL_ON,
- STATE_CONTROL_OFF
+ STATE_INIT, // init
+ STATE_STARTUP, // control has been started
+ STATE_CONTROL_ON, // control is ON
+ STATE_CONTROL_OFF // control is OFF
};
State currentState;
public:
+ // ctor
ManualControl() {};
+ // dtor
~ManualControl() {
printf("\r%s destructor invoked\n", __func__);
}
// load a control from the control file
bool load(string filename);
+
+ // start a control
+ void start(void);
+
+ // update a control (this is called periodically)
+ int update(void);
+
+ // power an output
+ int powerOutput(void);
+
+ // unregister a control
+ int unregisterControl(void);
+
+ // display the control
+ void display(void);
+
string getControlFile(void) const {
return controlFile;
}
- void start(void);
- int update(void);
- int powerOutput(void);
- int unregisterControl();
- void display(void);
+ string getId(void) const {
+ return id;
+ }
+
+ string getOutput(void) const {
+ return output;
+ }
+
+ unsigned int getType(void) const {
+ return type;
+ }
+
+ unsigned int getPriority(void) const {
+ return priority;
+ }
+
+ unsigned int getDuration(void) const {
+ return duration;
+ }
+
+ float getSetpoint(void) const {
+ return setpoint;
+ }
+
+ unsigned int getState(void) const {
+ return state;
+ }
+
+ unsigned int getPercent(void) const {
+ return percent;
+ }
};
#endif
