Open Lighting Architecture
Latest Git
|
An UART widget (i.e. a serial port with suitable hardware attached)
Public Member Functions | |
UartWidget (const std::string &path) | |
virtual | ~UartWidget () |
std::string | Name () const |
std::string | Description () const |
bool | Open () |
bool | Close () |
bool | IsOpen () const |
bool | SetBreak (bool on) |
bool | Write (const ola::DmxBuffer &data) |
bool | Read (unsigned char *buff, int size) |
bool | SetupOutput () |
|
explicit |
Construct a new UartWidget instance for one widget.
path | The device file path of the serial port |
|
virtual |
Destructor
bool ola::plugin::uartdmx::UartWidget::Close | ( | ) |
Close the widget
bool ola::plugin::uartdmx::UartWidget::IsOpen | ( | ) | const |
Check if the widget is open
|
inline |
Get the widget's device name
bool ola::plugin::uartdmx::UartWidget::Open | ( | ) |
Open the widget
bool ola::plugin::uartdmx::UartWidget::Read | ( | unsigned char * | buff, |
int | size | ||
) |
Read data from a previously-opened line
bool ola::plugin::uartdmx::UartWidget::SetBreak | ( | bool | on | ) |
Toggle communications line BREAK condition on/off
bool ola::plugin::uartdmx::UartWidget::SetupOutput | ( | ) |
Setup device for DMX Output
Setup our device for DMX send Also used to test if device is working correctly before AddDevice()
bool ola::plugin::uartdmx::UartWidget::Write | ( | const ola::DmxBuffer & | data | ) |
Write data to a previously-opened line