Open Lighting Architecture
0.9.4
|
The internal implementation of an Enttec port
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 DmxBuffer & | FetchDMX () 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) |
|
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.
data | the incoming data buffer |
length | the 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.
|
virtual |
Mute a responder
target | the UID to mute |
mute_complete | the callback to run once the mute request completes. |
Implements ola::rdm::DiscoveryTargetInterface.
|
virtual |
Start full discovery for this widget.
Implements ola::rdm::DiscoverableRDMControllerInterface.
|
virtual |
Start incremental discovery for this widget
Implements ola::rdm::DiscoverableRDMControllerInterface.
bool ola::plugin::usbpro::EnttecPortImpl::SendDMX | ( | const DmxBuffer & | buffer | ) |
Send a DMX message
|
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.
|
virtual |
Unmute all responders
unmute_complete | the callback to run once the unmute request completes. |
Implements ola::rdm::DiscoveryTargetInterface.