Open Lighting Architecture  0.9.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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:
ola::rdm::DiscoverableRDMControllerInterface ola::rdm::DiscoveryTargetInterface ola::rdm::RDMControllerInterface

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
typedef ola::BaseCallback0< void > UnMuteDeviceCallback
typedef ola::BaseCallback2
< void, const uint8_t
*, unsigned int > 
BranchCallback

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 (const 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)
- Public Member Functions inherited from ola::rdm::DiscoveryTargetInterface
virtual void MuteDevice (const UID &target, MuteDeviceCallback *mute_complete)=0
virtual void Branch (const UID &lower, const UID &upper, BranchCallback *callback)=0

Member Function Documentation

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

Send a Discovery Unique Branch

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 
)

Mute a responder

Parameters
targetthe UID to mute
mute_completethe callback to run once the mute request completes.
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 ( const 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: