Open Lighting Architecture  0.9.4
 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)
virtual ~FtdiWidget ()
std::string Serial () const
std::string Name () const
uint32_t Id () const
std::string Description () const
bool Open ()
bool Close ()
bool IsOpen () const
bool Reset ()
bool SetLineProperties ()
bool SetBaudRate ()
bool SetFlowControl ()
bool ClearRts ()
bool PurgeBuffers ()
bool SetBreak (bool on)
bool Write (const ola::DmxBuffer &data)
bool Read (unsigned char *buff, int size)
bool SetupOutput ()

Static Public Member Functions

static void Widgets (std::vector< FtdiWidgetInfo > *widgets)

Static Public Attributes

static const int VID = 0x0403
static const int PID = 0x6001

Constructor & Destructor Documentation

ola::plugin::ftdidmx::FtdiWidget::FtdiWidget ( const std::string &  serial,
const std::string &  name,
uint32_t  id = 0 
)

Construct a new FtdiWidget instance for one widget.

Parameters
serialThe widget's USB serial number
nameThe widget's USB name (description)
idThe ID of the device (used only when FTD2XX is the backend)
ola::plugin::ftdidmx::FtdiWidget::~FtdiWidget ( )
virtual

Destructor

Member Function Documentation

bool ola::plugin::ftdidmx::FtdiWidget::ClearRts ( )

Clear the RTS bit

bool ola::plugin::ftdidmx::FtdiWidget::Close ( )

Close the widget

uint32_t ola::plugin::ftdidmx::FtdiWidget::Id ( ) const
inline

Get the widget's FTD2XX ID number

bool ola::plugin::ftdidmx::FtdiWidget::IsOpen ( ) const

Check if the widget is open

std::string ola::plugin::ftdidmx::FtdiWidget::Name ( ) const
inline

Get the widget's USB name

bool ola::plugin::ftdidmx::FtdiWidget::Open ( )

Open the widget

bool ola::plugin::ftdidmx::FtdiWidget::PurgeBuffers ( )

Purge TX & RX buffers

bool ola::plugin::ftdidmx::FtdiWidget::Read ( unsigned char *  buff,
int  size 
)

Read data from a previously-opened line

bool ola::plugin::ftdidmx::FtdiWidget::Reset ( )

Reset the communications line

std::string ola::plugin::ftdidmx::FtdiWidget::Serial ( ) const
inline

Get the widget's USB serial number

bool ola::plugin::ftdidmx::FtdiWidget::SetBaudRate ( )

Set 250kbps baud rate

bool ola::plugin::ftdidmx::FtdiWidget::SetBreak ( bool  on)

Toggle communications line BREAK condition on/off

bool ola::plugin::ftdidmx::FtdiWidget::SetFlowControl ( )

Disable flow control

bool ola::plugin::ftdidmx::FtdiWidget::SetLineProperties ( )

Setup communications line for 8N2 traffic

bool ola::plugin::ftdidmx::FtdiWidget::SetupOutput ( )

Setup device for DMX Output

Setup our device for DMX send Mainly used to test if device is working correctly before AddDevice()

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

Build a list of available ftdi widgets.

Parameters
widgetsa pointer to a vector of FtdiWidgetInfo objects.

Build a list of all attached ftdi devices

bool ola::plugin::ftdidmx::FtdiWidget::Write ( const ola::DmxBuffer data)

Write data to a previously-opened line


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