Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

Sensor.h

00001 
00007 #ifndef SENSOR_H
00008 #define SENSOR_H
00009 
00010 class Sensor {
00011 public:
00015     enum Status{
00017         OPEN = 1,
00019         CLOSED = 0,
00021         ERROR = -1
00022     };
00023 
00027     enum Type{
00029         VOLT = 'V',
00031         AMPS = 'A',
00033         TEMP = 'T',
00035         BATT = 'B',
00037         POW = 'P'
00038     };
00039 
00046     Sensor(char * senName,Type senType, int senID);
00047 
00051     ~Sensor()=0;
00052 
00057     Status getStatus()=0;
00058 
00063     char * getName()=0;
00064 
00069     int getID()=0;
00070 
00075     int getValue()=0;
00076 
00081     void setValue(int newVal)=0;
00082 
00086     virtual void sendInfo();
00087 protected:
00089     int ID;
00091     char * name;
00093     Status status;
00095     int value;
00097     sema senSem;
00099     SensrPacket packet;
00100 };
00101 
00102 #endif

Generated on Fri Mar 25 23:48:45 2005 for CS498EmbeddedSystemsProgramming by doxygen 1.3.6