WPILibC++ 2023.4.3
|
MXP analog output class. More...
#include <frc/AnalogOutput.h>
Public Member Functions | |
AnalogOutput (int channel) | |
Construct an analog output on the given channel. More... | |
~AnalogOutput () override | |
AnalogOutput (AnalogOutput &&)=default | |
AnalogOutput & | operator= (AnalogOutput &&)=default |
void | SetVoltage (double voltage) |
Set the value of the analog output. More... | |
double | GetVoltage () const |
Get the voltage of the analog output. More... | |
int | GetChannel () const |
Get the channel of this AnalogOutput. More... | |
void | InitSendable (wpi::SendableBuilder &builder) override |
Initializes this Sendable object. More... | |
Public Member Functions inherited from wpi::Sendable | |
virtual | ~Sendable ()=default |
virtual void | InitSendable (SendableBuilder &builder)=0 |
Initializes this Sendable object. More... | |
Public Member Functions inherited from wpi::SendableHelper< AnalogOutput > | |
SendableHelper (const SendableHelper &rhs)=default | |
SendableHelper (SendableHelper &&rhs) | |
SendableHelper & | operator= (const SendableHelper &rhs)=default |
SendableHelper & | operator= (SendableHelper &&rhs) |
Protected Attributes | |
int | m_channel |
hal::Handle< HAL_AnalogOutputHandle > | m_port |
Additional Inherited Members | |
Protected Member Functions inherited from wpi::SendableHelper< AnalogOutput > | |
SendableHelper ()=default | |
~SendableHelper () | |
MXP analog output class.
|
explicit |
Construct an analog output on the given channel.
All analog outputs are located on the MXP port.
channel | The channel number on the roboRIO to represent. |
|
override |
|
default |
int frc::AnalogOutput::GetChannel | ( | ) | const |
Get the channel of this AnalogOutput.
double frc::AnalogOutput::GetVoltage | ( | ) | const |
Get the voltage of the analog output.
|
overridevirtual |
|
default |
void frc::AnalogOutput::SetVoltage | ( | double | voltage | ) |
Set the value of the analog output.
voltage | The output value in Volts, from 0.0 to +5.0 |
|
protected |
|
protected |