Open Lighting Architecture  Latest Git
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | List of all members
ola::plugin::usbpro::EnttecPortImpl Class Reference

Detailed Description

The internal implementation of an Enttec port

Inheritance diagram for ola::plugin::usbpro::EnttecPortImpl:
Inheritance graph
[legend]
Collaboration diagram for ola::plugin::usbpro::EnttecPortImpl:
Collaboration graph
[legend]

Public Types

typedef ola::Callback3< bool,
uint8_t, const uint8_t
*, unsigned int > 
SendCallback
 
- Public Types inherited from ola::rdm::DiscoveryTargetInterface
typedef ola::BaseCallback1
< void, bool > 
MuteDeviceCallback
 The callback run when a mute command completes. More...
 
typedef ola::BaseCallback0< void > UnMuteDeviceCallback
 The callback run when an unmute command completes.
 
typedef ola::BaseCallback2
< void, const uint8_t
*, unsigned int > 
BranchCallback
 The callback run when a DUB command completes. More...
 

Public Member Functions

 EnttecPortImpl (const OperationLabels &ops, const ola::rdm::UID &uid, SendCallback *send_cb)
 
void Stop ()
 
bool SendDMX (const DmxBuffer &buffer)
 
const DmxBufferFetchDMX () const
 
void SetDMXCallback (ola::Callback0< void > *callback)
 
bool ChangeToReceiveMode (bool change_only)
 
void GetParameters (usb_pro_params_callback *callback)
 
bool SetParameters (uint8_t break_time, uint8_t mab_time, uint8_t rate)
 
void SendRDMRequest (ola::rdm::RDMRequest *request, ola::rdm::RDMCallback *on_complete)
 
void RunFullDiscovery (ola::rdm::RDMDiscoveryCallback *callback)
 
void RunIncrementalDiscovery (ola::rdm::RDMDiscoveryCallback *callback)
 
void MuteDevice (const ola::rdm::UID &target, MuteDeviceCallback *mute_complete)
 
void UnMuteAll (UnMuteDeviceCallback *unmute_complete)
 
void Branch (const ola::rdm::UID &lower, const ola::rdm::UID &upper, BranchCallback *callback)
 
void HandleRDMTimeout (unsigned int length)
 
void HandleParameters (const uint8_t *data, unsigned int length)
 
void HandleIncomingDataMessage (const uint8_t *data, unsigned int length)
 
void HandleDMXDiff (const uint8_t *data, unsigned int length)
 
void ClockWatchdog ()
 
void WatchdogFired ()
 

Member Function Documentation

void ola::plugin::usbpro::EnttecPortImpl::Branch ( const ola::rdm::UID lower,
const ola::rdm::UID upper,
BranchCallback callback 
)
virtual

Send a Discovery Unique Branch

Implements ola::rdm::DiscoveryTargetInterface.

void ola::plugin::usbpro::EnttecPortImpl::GetParameters ( usb_pro_params_callback callback)

Send a request for the widget's parameters. TODO(simon): add timers to these

void ola::plugin::usbpro::EnttecPortImpl::HandleIncomingDataMessage ( const uint8_t *  data,
unsigned int  length 
)

Handle an incoming frame.

Parameters
datathe incoming data buffer
lengththe length of the data buffer.

The first byte is a status code: 0: good, non-0: bad The second byte is the start code The remaining bytes are the actual data.

void ola::plugin::usbpro::EnttecPortImpl::HandleRDMTimeout ( unsigned int  length)

Called to indicate the completion of an RDM request. According to the spec: The timeout message will follow the RDM discovery reply message, whether or not the reply is partial or complete. The timeout message will follow the RDM reply message (GET or SET), only when the reply is incomplete or unrecognizable.

Experiments suggest that sending another RDM message before this 'timeout' is received results in Bad Things Happening.

The length of this message should be 0.

void ola::plugin::usbpro::EnttecPortImpl::MuteDevice ( const ola::rdm::UID target,
MuteDeviceCallback mute_complete 
)
virtual

Mute a responder

Parameters
targetthe UID to mute
mute_completethe callback to run once the mute request completes.

Implements ola::rdm::DiscoveryTargetInterface.

void ola::plugin::usbpro::EnttecPortImpl::RunFullDiscovery ( ola::rdm::RDMDiscoveryCallback callback)
virtual

Start full discovery for this widget.

Implements ola::rdm::DiscoverableRDMControllerInterface.

void ola::plugin::usbpro::EnttecPortImpl::RunIncrementalDiscovery ( ola::rdm::RDMDiscoveryCallback callback)
virtual

Start incremental discovery for this widget

Implements ola::rdm::DiscoverableRDMControllerInterface.

bool ola::plugin::usbpro::EnttecPortImpl::SendDMX ( const DmxBuffer buffer)

Send a DMX message

void ola::plugin::usbpro::EnttecPortImpl::SendRDMRequest ( ola::rdm::RDMRequest request,
ola::rdm::RDMCallback on_complete 
)
virtual

Send an RDM Request.

Implements ola::rdm::RDMControllerInterface.

void ola::plugin::usbpro::EnttecPortImpl::SetDMXCallback ( ola::Callback0< void > *  callback)

Set the callback to run when new DMX data arrives

bool ola::plugin::usbpro::EnttecPortImpl::SetParameters ( uint8_t  break_time,
uint8_t  mab_time,
uint8_t  rate 
)

Set the widget's parameters. Due to the lack of confirmation, this returns immediately.

void ola::plugin::usbpro::EnttecPortImpl::UnMuteAll ( UnMuteDeviceCallback unmute_complete)
virtual

Unmute all responders

Parameters
unmute_completethe callback to run once the unmute request completes.

Implements ola::rdm::DiscoveryTargetInterface.


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