21 #ifndef PLUGINS_USBPRO_ROBEWIDGETDETECTOR_H_
22 #define PLUGINS_USBPRO_ROBEWIDGETDETECTOR_H_
26 #include <ola/thread/SchedulingExecutorInterface.h>
30 #include "plugins/usbpro/BaseRobeWidget.h"
31 #include "plugins/usbpro/WidgetDetectorInterface.h"
50 hardware_version(other.hardware_version),
51 software_version(other.software_version),
52 eeprom_version(other.eeprom_version) {
56 uint8_t hardware_version;
57 uint8_t software_version;
58 uint8_t eeprom_version;
77 unsigned int timeout = 200);
84 class DiscoveryState {
87 discovery_state(INFO_SENT),
98 widget_state discovery_state;
103 const unsigned int m_timeout_ms;
104 std::auto_ptr<SuccessHandler> m_callback;
105 std::auto_ptr<FailureHandler> m_failure_callback;
107 typedef std::map<DispatchingRobeWidget*, DiscoveryState> WidgetStateMap;
108 WidgetStateMap m_widgets;
113 unsigned int length);
116 unsigned int length);
119 unsigned int length);
125 void RemoveTimeout(DiscoveryState *discovery_state);
127 DiscoveryState *discovery_state);
130 static const uint32_t MODEL_MASK = 0xffff0000;
131 static const uint32_t RUI_DEVICE_PREFIX = 0x01000000;
132 static const uint32_t WTX_DEVICE_PREFIX = 0x02000000;
135 static const uint8_t RUI_MIN_UNLOCKED_SOFTWARE_VERSION = 0x14;
137 static const uint8_t WTX_MIN_SOFTWARE_VERSION = 0x0b;
142 #endif // PLUGINS_USBPRO_ROBEWIDGETDETECTOR_H_