xCPS
Public Member Functions | Protected Attributes | List of all members
Switch Class Reference

#include <Switch.h>

Collaboration diagram for Switch:
Collaboration graph

Public Member Functions

 Switch (int switchnumber)
 
void enable ()
 
void disable ()
 
void initComm (CommSystem *communication)
 

Protected Attributes

int _mask
 
int _card
 
CommSystemcomm
 

Detailed Description

Author
Max Houwing
Date
November 23rd, 2015

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.

Constructor & Destructor Documentation

Switch::Switch ( int  switchnumber)

Implementation of the Switch class. All instances of this class require a switch number. TODO: CREATE SENSIBLE ENUMS

Member Function Documentation

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)

Initializes the commmunication between the switch and the xCPS system. This function is called in the init() function of the xCPS class, and should otherwise only be used if the usage is known!


The documentation for this class was generated from the following files: