Open Lighting Architecture 0.10.9
Loading...
Searching...
No Matches
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
 The callback run when a mute command completes.
 
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.
 

Public Member Functions

 EnttecPortImpl (const OperationLabels &ops, const ola::rdm::UID &uid, SendCallback *send_cb, bool no_rdm_dub_timeout=false)
 
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 ()
 
- Public Member Functions inherited from ola::rdm::DiscoverableRDMControllerInterface
- Public Member Functions inherited from ola::rdm::RDMControllerInterface
- Public Member Functions inherited from ola::rdm::DiscoveryTargetInterface

Member Function Documentation

◆ Branch()

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.

◆ GetParameters()

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

◆ HandleIncomingDataMessage()

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.

◆ HandleRDMTimeout()

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. This doesn't seem to be the case in reality for DUBs with newer firmware (>=4.15) 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.

◆ MuteDevice()

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.

◆ RunFullDiscovery()

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

Start full discovery for this widget.

Implements ola::rdm::DiscoverableRDMControllerInterface.

◆ RunIncrementalDiscovery()

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

Start incremental discovery for this widget

Implements ola::rdm::DiscoverableRDMControllerInterface.

◆ SendDMX()

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

Send a DMX message

◆ SendRDMRequest()

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

Send an RDM Request.

Implements ola::rdm::RDMControllerInterface.

◆ SetDMXCallback()

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

Set the callback to run when new DMX data arrives

◆ SetParameters()

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.

◆ UnMuteAll()

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: