#include "AccessoryGroup.hpp"
|
static void | EventAll (unsigned long inId, ACCESSORIES_EVENT_TYPE inEvent = ACCESSORIES_EVENT_MOVEPOSITIONID, int inData = 0) |
|
static bool | loops () |
|
static uint8_t | GetCount () |
|
static int | EEPROMSaveAll (int inPos, bool inSimulate = false) |
|
static int | EEPROMLoadAll (int inPos) |
|
This class describes a group of accessories. Each group defines some GroupState to set multiple accessories states with only one Id. Events handled :
id | type | data | effect |
Group state id | all | | Execute the group state |
Definition at line 126 of file AccessoryGroup.hpp.
void AccessoryGroup::AddRange |
( |
const AccessoryGroup & |
inGroup | ) |
|
Insert a full group into this one.
- Parameters
-
inGroup | group to insert. All states of inGroup will be added to this group. |
Definition at line 204 of file AccessoryGroup.cpp.
void AccessoryGroup::AddState |
( |
GroupState * |
inpState | ) |
|
|
inline |
void AccessoryGroup::AddState |
( |
unsigned long |
inId, |
|
|
bool |
inSynchronous = true |
|
) |
| |
|
inline |
Add a new state.
- Parameters
-
inId | id of this state. |
inSynchronous | |
Definition at line 152 of file AccessoryGroup.hpp.
void AccessoryGroup::AddStateItem |
( |
unsigned long |
inId, |
|
|
Accessory & |
inAccessory, |
|
|
ACC_STATE |
inState, |
|
|
unsigned int |
inDelay = 0 |
|
) |
| |
Add a new state item, into the state of the given id.
- Parameters
-
inId | id of the state to complete. |
inAccessory | Accessory. |
inState | state to reach. |
inDelay | The delay gives a duration of the movement, to ensure that this movement is finished before starting the next one.Only used in asynchronous group state. Default is 0. |
Definition at line 171 of file AccessoryGroup.cpp.
void AccessoryGroup::begin |
( |
| ) |
|
int AccessoryGroup::EEPROMLoad |
( |
int |
inPos | ) |
|
Reload the data of the group from the EEPROM.
static int AccessoryGroup::EEPROMLoadAll |
( |
int |
inPos | ) |
|
|
static |
Reload the data of all the groups from the EEPROM.
int AccessoryGroup::EEPROMSave |
( |
int |
inPos, |
|
|
bool |
inSimulate = false |
|
) |
| |
Save the data of this group in the EEPROM.
static int AccessoryGroup::EEPROMSaveAll |
( |
int |
inPos, |
|
|
bool |
inSimulate = false |
|
) |
| |
|
static |
Save the data of all the groups in the EEPROM.
void AccessoryGroup::Event |
( |
unsigned long |
inId, |
|
|
ACCESSORIES_EVENT_TYPE |
inEvent = ACCESSORIES_EVENT_MOVEPOSITIONID , |
|
|
int |
inData = 0 |
|
) |
| |
Execute a new event. Nothing appends if the Id is not in this group.
- Parameters
-
inId | Id of an accessory or an accessory item. |
inEvent | Type of the new event. Default is ACCESSORIES_EVENT_MOVEPOSITIONID. |
inData | Associated data to the event type. Default is 0. |
Definition at line 339 of file AccessoryGroup.cpp.
void AccessoryGroup::EventAll |
( |
unsigned long |
inId, |
|
|
ACCESSORIES_EVENT_TYPE |
inEvent = ACCESSORIES_EVENT_MOVEPOSITIONID , |
|
|
int |
inData = 0 |
|
) |
| |
|
static |
Loop through all AccessoryGroup and execute a new event.
- Parameters
-
inId | Id of an accessory or an accessory item. |
inEvent | Type of the new event. Default is ACCESSORIES_EVENT_MOVEPOSITIONID. |
inData | Associated data to the event type. Default is 0. |
Definition at line 314 of file AccessoryGroup.cpp.
GroupState * AccessoryGroup::GetByID |
( |
unsigned long |
inId | ) |
const |
uint8_t AccessoryGroup::GetCount |
( |
| ) |
|
|
static |
bool AccessoryGroup::IsActionItemPending |
( |
| ) |
|
Checks if a state item has not been executed.
- Returns
- true if at least one accessory should still move.
Definition at line 252 of file AccessoryGroup.cpp.
bool AccessoryGroup::loop |
( |
| ) |
|
Main loop function.
- Returns
- true if something has been done.
Definition at line 281 of file AccessoryGroup.cpp.
bool AccessoryGroup::loops |
( |
| ) |
|
|
static |
void AccessoryGroup::ResetAction |
( |
| ) |
|
|
inline |
void AccessoryGroup::StartAction |
( |
GroupState * |
inpState | ) |
|
Starts a new action.
- Parameters
-
inpState | address of the starting state. |
Definition at line 257 of file AccessoryGroup.cpp.
bool AccessoryGroup::Toggle |
( |
unsigned long |
inId | ) |
|
The documentation for this class was generated from the following files: