10 #include "SolenoidBase.h"
11 #include "LiveWindow/LiveWindowSendable.h"
12 #include "tables/ITableListener.h"
27 enum Value { kOff, kForward, kReverse };
29 explicit DoubleSolenoid(uint32_t forwardChannel, uint32_t reverseChannel);
31 uint32_t reverseChannel);
33 virtual void Set(Value value);
34 virtual Value
Get()
const;
39 std::shared_ptr<nt::Value> value,
bool isNew);
44 void InitTable(std::shared_ptr<ITable> subTable);
45 std::shared_ptr<ITable>
GetTable()
const;
48 uint32_t m_forwardChannel;
49 uint32_t m_reverseChannel;
50 uint8_t m_forwardMask;
51 uint8_t m_reverseMask;
53 std::shared_ptr<ITable> m_table;
virtual Value Get() const
Read the current value of the solenoid.
Definition: DoubleSolenoid.cpp:122
A table whose values can be read and written to.
Definition: ITable.h:43
void InitTable(std::shared_ptr< ITable > subTable)
Initializes a table for this sendable object.
Definition: DoubleSolenoid.cpp:193
Live Window Sendable is a special type of object sendable to the live window.
Definition: LiveWindowSendable.h:18
void StartLiveWindowMode()
Start having this sendable object automatically respond to value changes reflect the value on the tab...
Definition: DoubleSolenoid.cpp:175
DoubleSolenoid class for running 2 channels of high voltage Digital Output (PCM). ...
Definition: DoubleSolenoid.h:23
virtual void Set(Value value)
Set the value of a solenoid.
Definition: DoubleSolenoid.cpp:98
DoubleSolenoid(uint32_t forwardChannel, uint32_t reverseChannel)
Constructor.
Definition: DoubleSolenoid.cpp:20
virtual ~DoubleSolenoid()
Destructor.
Definition: DoubleSolenoid.cpp:85
std::string GetSmartDashboardType() const
Definition: DoubleSolenoid.cpp:189
bool IsFwdSolenoidBlackListed() const
Check if the forward solenoid is blacklisted.
Definition: DoubleSolenoid.cpp:138
A listener that listens to changes in values in a ITable.
Definition: ITableListener.h:18
std::shared_ptr< ITable > GetTable() const
Definition: DoubleSolenoid.cpp:198
void UpdateTable()
Update the table for this sendable object with the latest values.
Definition: DoubleSolenoid.cpp:167
SolenoidBase class is the common base class for the Solenoid and DoubleSolenoid classes.
Definition: SolenoidBase.h:21
void StopLiveWindowMode()
Stop having this sendable object automatically respond to value changes.
Definition: DoubleSolenoid.cpp:182
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:39
bool IsRevSolenoidBlackListed() const
Check if the reverse solenoid is blacklisted.
Definition: DoubleSolenoid.cpp:150