Open Lighting Architecture  0.9.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
ola::plugin::ftdidmx::FtdiWidget Class Reference

Detailed Description

An FTDI widget.

Public Member Functions

 FtdiWidget (const std::string &serial, const std::string &name, uint32_t id=0, const uint16_t vid=FtdiWidgetInfo::FTDI_VID, const uint16_t pid=FtdiWidgetInfo::FT232_PID)
 Construct a new FtdiWidget instance for one widget.
virtual ~FtdiWidget ()
 Destructor.
std::string Serial () const
 Get the widget's USB serial number.
std::string Name () const
 Get the widget's USB name.
uint16_t Vid () const
uint16_t Pid () const
uint32_t Id () const
 Get the widget's FTD2XX ID number.
std::string Description () const
int GetInterfaceCount ()
 Get Widget available interface count.

Static Public Member Functions

static void Widgets (std::vector< FtdiWidgetInfo > *widgets)
 Build a list of available ftdi widgets.

Static Public Attributes

static const int libftdi_ftdi_usb_get_strings_get_serial_failed = -9
static bool m_missing_serial = false

Constructor & Destructor Documentation

ola::plugin::ftdidmx::FtdiWidget::FtdiWidget ( const std::string &  serial,
const std::string &  name,
uint32_t  id = 0,
const uint16_t  vid = FtdiWidgetInfo::FTDI_VID,
const uint16_t  pid = FtdiWidgetInfo::FT232_PID 
)

Construct a new FtdiWidget instance for one widget.

Parameters
serialThe widget's USB serial number
nameThe widget's USB name (description)
idid based on order of adding it seems from the code
vidThe VendorID of the device, def = FtdiWidgetInfo::ftdi_vid
pidThe ProductID of the device, def = FtdiWidgetInfo::ft232_pid

Member Function Documentation

int ola::plugin::ftdidmx::FtdiWidget::GetInterfaceCount ( )

Get Widget available interface count.

Get the number of physical interfaces our widget has to offer.

This does not deal with product names being named in a different way.

Originally I had hoped to use ftdi_context::type however, it only gets set properly after the device has been opened.

void ola::plugin::ftdidmx::FtdiWidget::Widgets ( std::vector< FtdiWidgetInfo > *  widgets)
static

Build a list of available ftdi widgets.

Build a list of all attached ftdi devices.

Parameters
widgetsa pointer to a vector of FtdiWidgetInfo objects.

The documentation for this class was generated from the following files: