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>
56 class RDMOps :
public ResponderOps<AdvancedDimmerResponder> {
58 static RDMOps *Instance() {
60 instance =
new RDMOps();
66 static RDMOps *instance;
74 static const Personalities *Instance();
77 explicit Personalities(
const PersonalityList &personalities) :
81 static Personalities *instance;
94 uint16_t min_level_increasing;
95 uint16_t min_level_decreasing;
97 } __attribute__((packed));
99 struct preset_playback_s {
102 } __attribute__((packed));
104 struct preset_status_s {
106 uint16_t fade_up_time;
107 uint16_t fade_down_time;
110 } __attribute__((packed));
117 } __attribute__((packed));
119 typedef fail_mode_s startup_mode_s;
130 programmed(PRESET_NOT_PROGRAMMED) {
134 uint16_t fade_up_time;
135 uint16_t fade_down_time;
137 rdm_preset_programmed_mode programmed;
141 bool m_identify_state;
142 uint16_t m_start_address;
144 uint16_t m_maximum_level;
145 min_level_s m_min_level;
146 rdm_identify_mode m_identify_mode;
148 bool m_power_on_self_test;
152 LockManager m_lock_settings;
154 std::vector<Preset> m_presets;
155 uint16_t m_preset_scene;
156 uint8_t m_preset_level;
157 rdm_preset_mergemode m_preset_mergemode;
158 fail_mode_s m_fail_mode;
159 startup_mode_s m_startup_mode;
162 bool ValueBetweenRange(
const uint16_t value,
163 const uint16_t lower,
164 const uint16_t upper);
218 static const uint8_t DIMMER_RESOLUTION;
219 static const uint16_t LOWER_MIN_LEVEL;
220 static const uint16_t UPPER_MIN_LEVEL;
221 static const uint16_t LOWER_MAX_LEVEL;
222 static const uint16_t UPPER_MAX_LEVEL;
223 static const unsigned int PRESET_COUNT;
225 static const uint16_t MIN_FAIL_DELAY_TIME;
226 static const uint16_t MIN_FAIL_HOLD_TIME;
227 static const uint16_t MAX_FAIL_DELAY_TIME;
228 static const uint16_t MAX_FAIL_HOLD_TIME;
229 static const uint16_t MIN_STARTUP_DELAY_TIME;
230 static const uint16_t MIN_STARTUP_HOLD_TIME;
231 static const uint16_t MAX_STARTUP_DELAY_TIME;
232 static const uint16_t MAX_STARTUP_HOLD_TIME;
233 static const uint16_t INFINITE_TIME;
237 static const char* CURVES[];
238 static const char* RESPONSE_TIMES[];
239 static const char* LOCK_STATES[];
251 #endif // INCLUDE_OLA_RDM_ADVANCEDDIMMERRESPONDER_H_