10 #include "DigitalSource.h"
11 #include "LiveWindow/LiveWindowSendable.h"
12 #include "tables/ITableListener.h"
28 void Set(uint32_t value);
30 void Pulse(
float length);
43 std::shared_ptr<nt::Value> value,
bool isNew);
48 void InitTable(std::shared_ptr<ITable> subTable);
49 std::shared_ptr<ITable>
GetTable()
const;
55 std::shared_ptr<ITable> m_table;
A table whose values can be read and written to.
Definition: ITable.h:43
bool IsPulsing() const
Determine if the pulse is still going.
Definition: DigitalOutput.cpp:92
void SetPWMRate(float rate)
Change the PWM frequency of the PWM output on a Digital Output line.
Definition: DigitalOutput.cpp:111
DigitalSource Interface.
Definition: DigitalSource.h:22
Live Window Sendable is a special type of object sendable to the live window.
Definition: LiveWindowSendable.h:18
virtual bool GetAnalogTriggerForRouting() const
Definition: DigitalOutput.cpp:200
Class to write to digital outputs.
Definition: DigitalOutput.h:22
void StopLiveWindowMode()
Stop having this sendable object automatically respond to value changes.
Definition: DigitalOutput.cpp:216
std::shared_ptr< ITable > GetTable() const
Definition: DigitalOutput.cpp:231
void DisablePWM()
Change this line from a PWM output back to a static Digital Output line.
Definition: DigitalOutput.cpp:155
void Pulse(float length)
Output a single pulse on the digital output line.
Definition: DigitalOutput.cpp:80
void StartLiveWindowMode()
Start having this sendable object automatically respond to value changes reflect the value on the tab...
Definition: DigitalOutput.cpp:210
DigitalOutput(uint32_t channel)
Create an instance of a digital output.
Definition: DigitalOutput.cpp:22
void Set(uint32_t value)
Set the value of a digital output.
Definition: DigitalOutput.cpp:60
void UpdateTable()
Update the table for this sendable object with the latest values.
Definition: DigitalOutput.cpp:208
virtual uint32_t GetChannelForRouting() const
Definition: DigitalOutput.cpp:190
void UpdateDutyCycle(float dutyCycle)
Change the duty-cycle that is being generated on the line.
Definition: DigitalOutput.cpp:179
std::string GetSmartDashboardType() const
Definition: DigitalOutput.cpp:222
virtual ~DigitalOutput()
Free the resources associated with a digital output.
Definition: DigitalOutput.cpp:44
virtual uint32_t GetModuleForRouting() const
Definition: DigitalOutput.cpp:195
A listener that listens to changes in values in a ITable.
Definition: ITableListener.h:18
void InitTable(std::shared_ptr< ITable > subTable)
Initializes a table for this sendable object.
Definition: DigitalOutput.cpp:226
void EnablePWM(float initialDutyCycle)
Enable a PWM Output on this line.
Definition: DigitalOutput.cpp:132
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:39
uint32_t GetChannel() const
Definition: DigitalOutput.cpp:71
virtual 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: DigitalOutput.cpp:202