Open Lighting Architecture  Latest Git
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | List of all members
ola::plugin::usbdmx::DMXCreator512BasicAsyncUsbSender Class Reference
Inheritance diagram for ola::plugin::usbdmx::DMXCreator512BasicAsyncUsbSender:
Inheritance graph
[legend]
Collaboration diagram for ola::plugin::usbdmx::DMXCreator512BasicAsyncUsbSender:
Collaboration graph
[legend]

Public Member Functions

 DMXCreator512BasicAsyncUsbSender (LibUsbAdaptor *adaptor, libusb_device *usb_device)
 
libusb_device_handle * SetupHandle ()
 Open the device handle. More...
 
bool PerformTransfer (const DmxBuffer &buffer)
 Perform the DMX transfer. More...
 
void PostTransferHook ()
 Called when the transfer completes. More...
 
- Public Member Functions inherited from ola::plugin::usbdmx::AsyncUsbSender
 AsyncUsbSender (ola::usb::LibUsbAdaptor *const adaptor, libusb_device *usb_device)
 Create a new AsyncUsbSender. More...
 
virtual ~AsyncUsbSender ()
 Destructor.
 
bool SendDMX (const DmxBuffer &buffer)
 Send one frame of DMX data. More...
 
void TransferComplete (struct libusb_transfer *transfer)
 Called from the libusb callback when the asynchronous transfer completes. More...
 
- Public Member Functions inherited from ola::plugin::usbdmx::AsyncUsbTransceiverBase
 AsyncUsbTransceiverBase (ola::usb::LibUsbAdaptor *const adaptor, libusb_device *usb_device)
 Create a new AsyncUsbTransceiverBase. More...
 
virtual ~AsyncUsbTransceiverBase ()
 Destructor.
 
bool Init ()
 Initialize the transceiver. More...
 
libusb_device_handle * GetHandle ()
 Get the libusb_device_handle of an already opened widget. More...
 

Additional Inherited Members

- Protected Types inherited from ola::plugin::usbdmx::AsyncUsbTransceiverBase
enum  TransferState { IDLE, IN_PROGRESS, DISCONNECTED }
 
- Protected Member Functions inherited from ola::plugin::usbdmx::AsyncUsbSender
bool TransferPending () const
 Check if there is a pending transfer. More...
 
- Protected Member Functions inherited from ola::plugin::usbdmx::AsyncUsbTransceiverBase
void CancelTransfer ()
 Cancel any pending transfers.
 
void FillControlTransfer (unsigned char *buffer, unsigned int timeout)
 Fill a control transfer. More...
 
void FillBulkTransfer (unsigned char endpoint, unsigned char *buffer, int length, unsigned int timeout)
 Fill a bulk transfer.
 
void FillInterruptTransfer (unsigned char endpoint, unsigned char *buffer, int length, unsigned int timeout)
 Fill an interrupt transfer.
 
int SubmitTransfer ()
 Submit the transfer for tx. More...
 
- Protected Attributes inherited from ola::plugin::usbdmx::AsyncUsbTransceiverBase
ola::usb::LibUsbAdaptor *const m_adaptor
 The LibUsbAdaptor passed in the constructor.
 
libusb_device *const m_usb_device
 The libusb_device passed in the constructor.
 
libusb_device_handle * m_usb_handle
 
bool m_suppress_continuation
 
struct libusb_transfer * m_transfer
 
TransferState m_transfer_state
 
ola::thread::Mutex m_mutex
 

Member Function Documentation

bool ola::plugin::usbdmx::DMXCreator512BasicAsyncUsbSender::PerformTransfer ( const DmxBuffer buffer)
inlinevirtual

Perform the DMX transfer.

Parameters
bufferthe DMX buffer to send.
Returns
true if the transfer was scheduled, false otherwise.

This method is implemented by the subclass. The subclass should call FillControlTransfer() / FillBulkTransfer() as appropriate and then call SubmitTransfer().

Implements ola::plugin::usbdmx::AsyncUsbSender.

void ola::plugin::usbdmx::DMXCreator512BasicAsyncUsbSender::PostTransferHook ( )
inlinevirtual

Called when the transfer completes.

Some devices require multiple transfers per DMX frame. This provides a hook for continuation.

Reimplemented from ola::plugin::usbdmx::AsyncUsbSender.

libusb_device_handle* ola::plugin::usbdmx::DMXCreator512BasicAsyncUsbSender::SetupHandle ( )
inlinevirtual

Open the device handle.

Returns
A valid libusb_device_handle or NULL if the device could not be opened.

Implements ola::plugin::usbdmx::AsyncUsbTransceiverBase.


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