Definition at line 10 of file Sensor.h.
Public Types | |
enum | Status { OPEN = 1, CLOSED = 0, ERROR = -1 } |
enumeration for the status of a sensor More... | |
enum | Type { VOLT = 'V', AMPS = 'A', TEMP = 'T', BATT = 'B', POW = 'P' } |
enumeration for the type of a sensor More... | |
Public Member Functions | |
Sensor (char *senName, Type senType, int senID) | |
constructor for a sensor | |
~Sensor ()=0 | |
Destructor for a sensor. | |
Status | getStatus ()=0 |
get the status of the sensor | |
char * | getName ()=0 |
get the name of the sensor | |
int | getID ()=0 |
the id of the sensor | |
int | getValue ()=0 |
the current value of the sensor | |
void | setValue (int newVal)=0 |
set the value of the sensor | |
virtual void | sendInfo () |
setup and send the sensor information over the network | |
Protected Attributes | |
int | ID |
ID of the sensor. | |
char * | name |
name of the sensor | |
Status | status |
status of the sensor | |
int | value |
value of the sensor | |
sema | senSem |
semaphore for the sensor | |
SensrPacket | packet |
packet to send info over |
|
enumeration for the status of a sensor
|
|
enumeration for the type of a sensor
|
|
constructor for a sensor
|
|
the id of the sensor
Implemented in AmpsSensor, BattSensor, PowSensor, TempSensor, and VoltSensor. |
|
get the name of the sensor
Implemented in AmpsSensor, BattSensor, PowSensor, TempSensor, and VoltSensor. |
|
get the status of the sensor
Implemented in AmpsSensor, BattSensor, PowSensor, TempSensor, and VoltSensor. |
|
the current value of the sensor
Implemented in AmpsSensor, BattSensor, PowSensor, TempSensor, and VoltSensor. |
|
set the value of the sensor
Implemented in AmpsSensor, BattSensor, PowSensor, TempSensor, and VoltSensor. |