#include "AccessoryGroup.hpp"
Public Member Functions | |
GroupState () | |
GroupState (unsigned long inId, bool inSynchronous = true) | |
void | begin () |
void | StartAction () |
void | ResetAction () |
bool | IsActionItemPending () |
unsigned long | GetId () const |
void | loop () |
void | Add (Accessory *inpAccessory, ACC_STATE inState, unsigned int inDelay = 0) |
This class describes a list of accessories, with an associated state, under one and only one Id.
Definition at line 48 of file AccessoryGroup.hpp.
|
inline |
Default constructor.
Definition at line 65 of file AccessoryGroup.hpp.
GroupState::GroupState | ( | unsigned long | inId, |
bool | inSynchronous = true |
||
) |
Full constructor.
inId | Id of this state. |
inSynchronous | If true, the movements of all accessories of the group will be done together. If false, each accessory will wait the end of the previous accessory movement (plus its delay) to start moving. Default is true. |
Definition at line 47 of file AccessoryGroup.cpp.
void GroupState::Add | ( | Accessory * | inpAccessory, |
ACC_STATE | inState, | ||
unsigned int | inDelay = 0 |
||
) |
Add a new state item.
inpAccessory | Address of the 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 76 of file AccessoryGroup.cpp.
void GroupState::begin | ( | ) |
Initialize the instance.
Definition at line 54 of file AccessoryGroup.cpp.
|
inline |
Gets the id of this state.
Definition at line 95 of file AccessoryGroup.hpp.
|
inline |
Checks if a state item has not been executed.
Definition at line 90 of file AccessoryGroup.hpp.
void GroupState::loop | ( | ) |
Main loop function.
Definition at line 112 of file AccessoryGroup.cpp.
|
inline |
Prepare for a future action
Definition at line 85 of file AccessoryGroup.hpp.
void GroupState::StartAction | ( | ) |
Starts a new action.
Definition at line 81 of file AccessoryGroup.cpp.