2 #ifndef __accessoryGroup_H__ 3 #define __accessoryGroup_H__ 6 #include "Accessory.hpp" 29 GroupStateItem() { this->pAccessory = NULL; this->State = STATE_NONE; this->Delay = 0; }
35 GroupStateItem(
Accessory *inpAccessory, ACC_STATE inState,
unsigned int inDelay = 0) { this->pAccessory = inpAccessory; this->State = inState; this->Delay = inDelay; }
37 #ifdef ACCESSORIES_PRINT_ACCESSORIES 42 void printAccessory();
61 unsigned long startActionTime;
65 GroupState() { this->Id = UNDEFINED_ID; this->Synchronous =
false; }
72 GroupState(
unsigned long inId,
bool inSynchronous =
true);
95 unsigned long GetId()
const {
return this->Id; }
107 void Add(
Accessory *inpAccessory, ACC_STATE inState,
unsigned int inDelay = 0);
109 #ifdef ACCESSORIES_PRINT_ACCESSORIES 114 void printAccessory();
124 inline void SetNextGroup(
AccessoryGroup *inAccessory) { this->pNextGroup = inAccessory; }
125 inline AccessoryGroup *GetNextGroup()
const {
return this->pNextGroup; }
153 void AddStateItem(
unsigned long inId,
Accessory &inAccessory, ACC_STATE inState,
unsigned int inDelay = 0);
177 void Event(
unsigned long inId, ACCESSORIES_EVENT_TYPE inEvent = ACCESSORIES_EVENT_MOVEPOSITIONID,
int inData = 0);
184 static void EventAll(
unsigned long inId, ACCESSORIES_EVENT_TYPE inEvent = ACCESSORIES_EVENT_MOVEPOSITIONID,
int inData = 0);
210 bool Toggle(
unsigned long inId);
216 int EEPROMSave(
int inPos,
bool inSimulate =
false);
237 static int EEPROMSaveAll(
int inPos,
bool inSimulate =
false);
244 #ifdef ACCESSORIES_PRINT_ACCESSORIES 249 static void printGroups();
253 void printAccessory();
static int EEPROMSaveAll(int inPos, bool inSimulate = false)
int EEPROMLoad(int inPos)
bool Toggle(unsigned long inId)
bool IsActionItemPending()
static void EventAll(unsigned long inId, ACCESSORIES_EVENT_TYPE inEvent = ACCESSORIES_EVENT_MOVEPOSITIONID, int inData = 0)
void Event(unsigned long inId, ACCESSORIES_EVENT_TYPE inEvent = ACCESSORIES_EVENT_MOVEPOSITIONID, int inData = 0)
ACCSCHAINEDLISTITEM< GroupState > * GetItemByID(unsigned long inId) const
GroupState * GetByID(unsigned long inId) const
void AddRange(const AccessoryGroup &inGroup)
void AddStateItem(unsigned long inId, Accessory &inAccessory, ACC_STATE inState, unsigned int inDelay = 0)
void AddState(unsigned long inId, bool inSynchronous = true)
void StartAction(GroupState *inpState)
void AddState(GroupState *inpState)
static int EEPROMLoadAll(int inPos)
void Add(Accessory *inpAccessory, ACC_STATE inState, unsigned int inDelay = 0)
unsigned long GetId() const
bool IsActionItemPending()
static uint8_t GetCount()
GroupStateItem(Accessory *inpAccessory, ACC_STATE inState, unsigned int inDelay = 0)
int EEPROMSave(int inPos, bool inSimulate = false)