13 #include "HAL/Types.h"
14 #include "LiveWindow/LiveWindowSendable.h"
15 #include "SolenoidBase.h"
16 #include "tables/ITableListener.h"
31 Solenoid(
int moduleNumber,
int channel);
33 virtual void Set(
bool on);
34 virtual bool Get()
const;
38 std::shared_ptr<nt::Value> value,
bool isNew);
43 void InitTable(std::shared_ptr<ITable> subTable);
44 std::shared_ptr<ITable>
GetTable()
const;
47 HAL_SolenoidHandle m_solenoidHandle = HAL_kInvalidHandle;
49 std::shared_ptr<ITable> m_table;
A table whose values can be read and written to.
Definition: ITable.h:22
Live Window Sendable is a special type of object sendable to the live window.
Definition: LiveWindowSendable.h:17
SolenoidBase class is the common base class for the Solenoid and DoubleSolenoid classes.
Definition: SolenoidBase.h:20
void StartLiveWindowMode()
Start having this sendable object automatically respond to value changes reflect the value on the tab...
Definition: Solenoid.cpp:122
void StopLiveWindowMode()
Stop having this sendable object automatically respond to value changes.
Definition: Solenoid.cpp:129
virtual void Set(bool on)
Set the value of a solenoid.
Definition: Solenoid.cpp:75
virtual bool Get() const
Read the current value of the solenoid.
Definition: Solenoid.cpp:87
void UpdateTable()
Update the table for this sendable object with the latest values.
Definition: Solenoid.cpp:116
Solenoid class for running high voltage Digital Output (PCM).
Definition: Solenoid.h:26
virtual ~Solenoid()
Destructor.
Definition: Solenoid.cpp:65
void ValueChanged(ITable *source, llvm::StringRef key, std::shared_ptr< nt::Value > value, bool isNew)
Called when a key-value pair is changed in a ITable.
Definition: Solenoid.cpp:110
Solenoid(int channel)
Constructor using the default PCM ID (0).
Definition: Solenoid.cpp:23
A listener that listens to changes in values in a ITable.
Definition: ITableListener.h:18
bool IsBlackListed() const
Check if solenoid is blacklisted.
Definition: Solenoid.cpp:105
void InitTable(std::shared_ptr< ITable > subTable)
Initializes a table for this sendable object.
Definition: Solenoid.cpp:138
std::string GetSmartDashboardType() const
Definition: Solenoid.cpp:136
std::shared_ptr< ITable > GetTable() const
Definition: Solenoid.cpp:143