35 #ifndef PLUGINS_FTDIDMX_FTDIWIDGET_H_ 36 #define PLUGINS_FTDIDMX_FTDIWIDGET_H_ 40 #endif // HAVE_CONFIG_H 43 #include <libftdi1/ftdi.h> 46 #endif // HAVE_LIBFTDI1 65 static const uint16_t FTDI_VID;
66 static const uint16_t FT232_PID;
67 static const uint16_t FT4232_PID;
70 const std::string &serial,
72 const uint16_t vid = FTDI_VID,
73 const uint16_t pid = FT232_PID)
82 : m_name(info.Name()),
83 m_serial(info.Serial()),
91 std::string Name()
const {
return m_name; }
92 std::string Serial()
const {
return m_serial; }
94 unsigned int Id()
const {
return m_id; }
95 uint16_t Vid()
const {
return m_vid; }
96 uint16_t Pid()
const {
return m_pid; }
98 std::string Description()
const {
99 return m_name +
" with serial number : " + m_serial +
" ";
103 if (
this != &other) {
104 m_name = other.Name();
105 m_serial = other.Serial();
115 std::string m_serial;
136 const std::string &name,
138 const uint16_t vid = FtdiWidgetInfo::FTDI_VID,
139 const uint16_t pid = FtdiWidgetInfo::FT232_PID);
145 std::string
Serial()
const {
return m_serial; }
148 std::string
Name()
const {
return m_name; }
150 uint16_t Vid()
const {
return m_vid; }
151 uint16_t Pid()
const {
return m_pid; }
154 uint32_t
Id()
const {
return m_id; }
156 std::string Description()
const {
157 return m_name +
" with serial number : " + m_serial +
" ";
161 int GetInterfaceCount();
167 static void Widgets(std::vector<FtdiWidgetInfo> *widgets);
171 static const int libftdi_ftdi_usb_get_strings_get_serial_failed = -9;
173 static bool m_missing_serial;
176 std::string m_serial;
179 const uint16_t m_vid;
180 const uint16_t m_pid;
186 const ftdi_interface interface);
190 std::string Description()
const {
191 return m_parent->Description();
210 bool SetLineProperties();
213 bool SetBaudRate(
int speed = 250000);
216 bool SetFlowControl();
225 bool SetBreak(
bool on);
231 bool Read(
unsigned char* buff,
int size);
238 struct ftdi_context m_handle;
239 const ftdi_interface m_interface;
244 #endif // PLUGINS_FTDIDMX_FTDIWIDGET_H_
Used to hold a single universe of DMX data.
Definition: DmxBuffer.h:49
A class used to hold a single universe of DMX data.
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
Definition: FtdiWidget.h:183