10 #include "SensorBase.h"
11 #include "tables/ITableListener.h"
12 #include "LiveWindow/LiveWindowSendable.h"
13 #include "tables/ITable.h"
26 class Relay :
public SensorBase,
public ITableListener,
public LiveWindowSendable {
28 typedef enum {kOff, kOn, kForward, kReverse} Value;
29 typedef enum {kBothDirections, kForwardOnly, kReverseOnly} Direction;
31 Relay(uint32_t channel, Direction direction = kBothDirections);
32 Relay(uint8_t moduleNumber, uint32_t channel, Direction direction = kBothDirections);
35 void Set(Value value);
38 void ValueChanged(ITable* source,
const std::string& key, EntryValue value,
bool isNew);
40 void StartLiveWindowMode();
41 void StopLiveWindowMode();
42 std::string GetSmartDashboardType();
43 void InitTable(ITable *subTable);
49 void InitRelay(uint8_t moduleNumber);
52 Direction m_direction;
Value Get()
Definition: Relay.cpp:199
virtual ~Relay()
Definition: Relay.cpp:102
void Set(Value value)
Definition: Relay.cpp:131
Definition: SensorBase.h:20
Relay(uint32_t channel, Direction direction=kBothDirections)
Definition: Relay.cpp:91
Definition: DigitalModule.h:17