21 #ifndef PLUGINS_USBPRO_ROBEWIDGET_H_
22 #define PLUGINS_USBPRO_ROBEWIDGET_H_
28 #include "ola/io/Descriptor.h"
35 #include "ola/thread/SchedulingExecutorInterface.h"
36 #include "plugins/usbpro/BaseRobeWidget.h"
77 MuteDeviceCallback *mute_complete);
78 void UnMuteAll(UnMuteDeviceCallback *unmute_complete);
81 BranchCallback *callback);
83 static const int DMX_FRAME_DATA_SIZE;
87 MuteDeviceCallback *m_mute_callback;
88 UnMuteDeviceCallback *m_unmute_callback;
89 BranchCallback *m_branch_callback;
91 auto_ptr<Callback0<void> > m_dmx_callback;
95 uint8_t m_transaction_number;
97 void HandleMessage(uint8_t label,
100 void HandleRDMResponse(
const uint8_t *data,
101 unsigned int length);
102 void HandleDiscoveryResponse(
const uint8_t *data,
103 unsigned int length);
107 void HandleDmxFrame(
const uint8_t *data,
unsigned int length);
108 bool PackAndSendRDMRequest(uint8_t label,
110 static const unsigned int RDM_PADDING_BYTES = 4;
122 unsigned int queue_size = 20);
125 void Stop() { m_impl->
Stop(); }
128 return m_impl->GetDescriptor();
132 return m_impl->
SendDMX(buffer);
148 bool ChangeToReceiveMode() {
153 m_impl->SetDmxCallback(callback);
156 const DmxBuffer& FetchDMX() {
157 return m_impl->FetchDMX();
161 friend class ::RobeWidgetTest;
166 RobeWidgetImpl *m_impl;
172 #endif // PLUGINS_USBPRO_ROBEWIDGET_H_