28 #ifndef INCLUDE_OLA_RDM_ADVANCEDDIMMERRESPONDER_H_
29 #define INCLUDE_OLA_RDM_ADVANCEDDIMMERRESPONDER_H_
33 #include <ola/rdm/ResponderPersonality.h>
34 #include <ola/rdm/ResponderSettings.h>
58 class RDMOps :
public ResponderOps<AdvancedDimmerResponder> {
60 static RDMOps *Instance() {
62 instance =
new RDMOps();
68 static RDMOps *instance;
76 static const Personalities *Instance();
79 explicit Personalities(
const PersonalityList &personalities) :
83 static Personalities *instance;
96 uint16_t min_level_increasing;
97 uint16_t min_level_decreasing;
99 } __attribute__((packed));
101 struct preset_playback_s {
104 } __attribute__((packed));
106 struct preset_status_s {
108 uint16_t fade_up_time;
109 uint16_t fade_down_time;
112 } __attribute__((packed));
119 } __attribute__((packed));
121 typedef fail_mode_s startup_mode_s;
132 programmed(PRESET_NOT_PROGRAMMED) {
136 uint16_t fade_up_time;
137 uint16_t fade_down_time;
139 rdm_preset_programmed_mode programmed;
143 bool m_identify_state;
144 uint16_t m_start_address;
146 uint16_t m_maximum_level;
147 min_level_s m_min_level;
148 rdm_identify_mode m_identify_mode;
150 bool m_power_on_self_test;
154 LockManager m_lock_settings;
156 std::vector<Preset> m_presets;
157 uint16_t m_preset_scene;
158 uint8_t m_preset_level;
159 rdm_preset_merge_mode m_preset_merge_mode;
160 fail_mode_s m_fail_mode;
161 startup_mode_s m_startup_mode;
164 bool ValueBetweenRange(
const uint16_t value,
165 const uint16_t lower,
166 const uint16_t upper);
220 static const uint8_t DIMMER_RESOLUTION;
221 static const uint16_t LOWER_MIN_LEVEL;
222 static const uint16_t UPPER_MIN_LEVEL;
223 static const uint16_t LOWER_MAX_LEVEL;
224 static const uint16_t UPPER_MAX_LEVEL;
225 static const unsigned int PRESET_COUNT;
227 static const uint16_t MIN_FAIL_DELAY_TIME;
228 static const uint16_t MIN_FAIL_HOLD_TIME;
229 static const uint16_t MAX_FAIL_DELAY_TIME;
230 static const uint16_t MAX_FAIL_HOLD_TIME;
231 static const uint16_t MIN_STARTUP_DELAY_TIME;
232 static const uint16_t MIN_STARTUP_HOLD_TIME;
233 static const uint16_t MAX_STARTUP_DELAY_TIME;
234 static const uint16_t MAX_STARTUP_HOLD_TIME;
235 static const uint16_t INFINITE_TIME;
239 static const char* CURVES[];
240 static const char* RESPONSE_TIMES[];
241 static const char* LOCK_STATES[];
253 #endif // INCLUDE_OLA_RDM_ADVANCEDDIMMERRESPONDER_H_