xCPS
|
#include <Switch.h>
Public Member Functions | |
Switch (int switchnumber) | |
void | enable () |
void | disable () |
void | initComm (CommSystem *communication) |
Protected Attributes | |
int | _mask |
int | _card |
CommSystem * | comm |
Control of the switches (or 'wissel' in some documentation) is handled here. Enable() and disable() are the available methods, to extend and retract the switch respectively. Enums can be used to address the different switches, instead of having to look-up (or remember) the specific numbers.
Switch::Switch | ( | int | switchnumber | ) |
Implementation of the Switch class. All instances of this class require a switch number. TODO: CREATE SENSIBLE ENUMS
void Switch::disable | ( | ) |
Disables the switch.
void Switch::enable | ( | ) |
Enables the switch. Note that the switch will say enabled (extended) as long as disable() is not called!
void Switch::initComm | ( | CommSystem * | communication | ) |