35 #ifndef PLUGINS_FTDIDMX_FTDIWIDGET_H_
36 #define PLUGINS_FTDIDMX_FTDIWIDGET_H_
56 static const uint16_t FTDI_VID;
57 static const uint16_t FT232_PID;
58 static const uint16_t FT4232_PID;
61 const std::string &serial,
63 const uint16_t vid = FTDI_VID,
64 const uint16_t pid = FT232_PID)
73 : m_name(info.Name()),
74 m_serial(info.Serial()),
82 std::string Name()
const {
return m_name; }
83 std::string Serial()
const {
return m_serial; }
85 unsigned int Id()
const {
return m_id; }
86 uint16_t Vid()
const {
return m_vid; }
87 uint16_t Pid()
const {
return m_pid; }
89 std::string Description()
const {
90 return m_name +
" with serial number : " + m_serial +
" ";
95 m_name = other.Name();
96 m_serial = other.Serial();
106 std::string m_serial;
127 const std::string &name,
129 const uint16_t vid = FtdiWidgetInfo::FTDI_VID,
130 const uint16_t pid = FtdiWidgetInfo::FT232_PID);
136 std::string
Serial()
const {
return m_serial; }
139 std::string
Name()
const {
return m_name; }
141 uint16_t Vid()
const {
return m_vid; }
142 uint16_t Pid()
const {
return m_pid; }
145 uint32_t
Id()
const {
return m_id; }
147 std::string Description()
const {
148 return m_name +
" with serial number : " + m_serial +
" ";
158 static void Widgets(std::vector<FtdiWidgetInfo> *widgets);
162 static const int libftdi_ftdi_usb_get_strings_get_serial_failed = -9;
164 static bool m_missing_serial;
167 std::string m_serial;
170 const uint16_t m_vid;
171 const uint16_t m_pid;
177 const ftdi_interface interface);
181 std::string Description()
const {
182 return m_parent->Description();
222 bool Read(
unsigned char* buff,
int size);
229 struct ftdi_context m_handle;
230 const ftdi_interface m_interface;
235 #endif // PLUGINS_FTDIDMX_FTDIWIDGET_H_
bool SetLineProperties()
Setup communications line for 8N2 traffic.
Definition: FtdiWidget.cpp:277
bool SetBreak(bool on)
Toggle communications line BREAK condition on/off.
Definition: FtdiWidget.cpp:327
bool Open()
Open the widget.
Definition: FtdiWidget.cpp:226
bool Close()
Close the widget.
Definition: FtdiWidget.cpp:253
bool SetFlowControl()
Disable flow control.
Definition: FtdiWidget.cpp:297
Used to hold a single universe of DMX data.
Definition: DmxBuffer.h:49
bool SetBaudRate(int speed=250000)
Set 250kbps baud rate.
Definition: FtdiWidget.cpp:287
A class used to hold a single universe of DMX data.
bool ClearRts()
Clear the RTS bit.
Definition: FtdiWidget.cpp:307
bool PurgeBuffers()
Purge TX & RX buffers.
Definition: FtdiWidget.cpp:317
bool SetupOutput()
Setup device for DMX Output.
Definition: FtdiWidget.cpp:365
bool Write(const ola::DmxBuffer &data)
Write data to a previously-opened line.
Definition: FtdiWidget.cpp:338
bool SetInterface()
Set interface on the widget.
Definition: FtdiWidget.cpp:215
bool Reset()
Reset the communications line.
Definition: FtdiWidget.cpp:267
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
bool IsOpen() const
Check if the widget is open.
Definition: FtdiWidget.cpp:263
bool Read(unsigned char *buff, int size)
Read data from a previously-opened line.
Definition: FtdiWidget.cpp:354
Definition: FtdiWidget.h:174