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"
52 hardware_version(other.hardware_version),
53 software_version(other.software_version),
54 eeprom_version(other.eeprom_version) {
58 uint8_t hardware_version;
59 uint8_t software_version;
60 uint8_t eeprom_version;
79 unsigned int timeout = 200);
86 class DiscoveryState {
89 discovery_state(INFO_SENT),
90 timeout_id(ola::thread::INVALID_TIMEOUT) {
100 widget_state discovery_state;
101 ola::thread::timeout_id timeout_id;
105 const unsigned int m_timeout_ms;
106 auto_ptr<SuccessHandler> m_callback;
107 auto_ptr<FailureHandler> m_failure_callback;
109 typedef std::map<DispatchingRobeWidget*, DiscoveryState> WidgetStateMap;
110 WidgetStateMap m_widgets;
115 unsigned int length);
118 unsigned int length);
121 unsigned int length);
127 void RemoveTimeout(DiscoveryState *discovery_state);
129 DiscoveryState *discovery_state);
132 static const uint32_t MODEL_MASK = 0xffff0000;
133 static const uint32_t RUI_DEVICE_PREFIX = 0x01000000;
134 static const uint32_t WTX_DEVICE_PREFIX = 0x02000000;
137 static const uint8_t RUI_MIN_UNLOCKED_SOFTWARE_VERSION = 0x14;
139 static const uint8_t WTX_MIN_SOFTWARE_VERSION = 0x0b;
144 #endif // PLUGINS_USBPRO_ROBEWIDGETDETECTOR_H_