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"
75 MuteDeviceCallback *mute_complete);
76 void UnMuteAll(UnMuteDeviceCallback *unmute_complete);
79 BranchCallback *callback);
81 static const int DMX_FRAME_DATA_SIZE;
85 MuteDeviceCallback *m_mute_callback;
86 UnMuteDeviceCallback *m_unmute_callback;
87 BranchCallback *m_branch_callback;
89 std::auto_ptr<Callback0<void> > m_dmx_callback;
93 uint8_t m_transaction_number;
95 void HandleMessage(uint8_t label,
98 void HandleRDMResponse(
const uint8_t *data,
100 void HandleDiscoveryResponse(
const uint8_t *data,
101 unsigned int length);
105 void HandleDmxFrame(
const uint8_t *data,
unsigned int length);
106 bool PackAndSendRDMRequest(uint8_t label,
108 static const unsigned int RDM_PADDING_BYTES = 4;
120 unsigned int queue_size = 20);
123 void Stop() { m_impl->
Stop(); }
126 return m_impl->GetDescriptor();
130 return m_impl->
SendDMX(buffer);
146 bool ChangeToReceiveMode() {
151 m_impl->SetDmxCallback(callback);
154 const DmxBuffer& FetchDMX() {
155 return m_impl->FetchDMX();
159 friend class ::RobeWidgetTest;
164 RobeWidgetImpl *m_impl;
170 #endif // PLUGINS_USBPRO_ROBEWIDGET_H_