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;
61 hardware_version = other.hardware_version;
62 software_version = other.software_version;
63 eeprom_version = other.eeprom_version;
81 SuccessHandler *on_success,
82 FailureHandler *on_failure,
83 unsigned int timeout = 200);
86 bool Discover(ola::io::ConnectedDescriptor *descriptor);
90 class DiscoveryState {
93 discovery_state(INFO_SENT),
104 widget_state discovery_state;
109 const unsigned int m_timeout_ms;
110 std::auto_ptr<SuccessHandler> m_callback;
111 std::auto_ptr<FailureHandler> m_failure_callback;
113 typedef std::map<DispatchingRobeWidget*, DiscoveryState> WidgetStateMap;
114 WidgetStateMap m_widgets;
119 unsigned int length);
122 unsigned int length);
125 unsigned int length);
131 void RemoveTimeout(DiscoveryState *discovery_state);
133 DiscoveryState *discovery_state);
136 static const uint32_t MODEL_MASK = 0xffff0000;
137 static const uint32_t RUI_DEVICE_PREFIX = 0x01000000;
138 static const uint32_t WTX_DEVICE_PREFIX = 0x02000000;
141 static const uint8_t RUI_MIN_UNLOCKED_SOFTWARE_VERSION = 0x14;
143 static const uint8_t WTX_MIN_SOFTWARE_VERSION = 0x0b;
148 #endif // PLUGINS_USBPRO_ROBEWIDGETDETECTOR_H_ static const timeout_id INVALID_TIMEOUT
An invalid / uninitialized timeout_id.
Definition: SchedulerInterface.h:39
Combines the ExecutorInterface and the SchedulerInterface.
Definition: SchedulingExecutorInterface.h:33
A BidirectionalFileDescriptor that also generates notifications when closed.
Definition: Descriptor.h:282
A RDM unique identifier (UID).
void * timeout_id
A timeout handle which can later be used to cancel a timeout.
Definition: SchedulerInterface.h:34
A 2 argument callback which can be called multiple times.
Definition: Callback.h:1895
Represents a RDM UID.
Definition: UID.h:57
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
A 1 argument callback which can be called multiple times.
Definition: Callback.h:992