-
Notifications
You must be signed in to change notification settings - Fork 0
/
GroupBundle.hpp
53 lines (39 loc) · 1017 Bytes
/
GroupBundle.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//
// GroupBundle.hpp
// GroupBundle
//
// Created by Sebastian Westemeyer on 06.01.18.
//
#ifndef GroupBundle_hpp
#define GroupBundle_hpp
#include "systemincludes.h"
class Actor;
class GroupActor;
class RCSwitch;
class GroupPresenter;
class GroupBundle {
public:
GroupBundle(RCSwitch *sender);
// add a new group
void addGroup(GroupActor *actor);
// add a new actor
void addActor(Actor *actor);
// toggle the given actor
void toggle(const byte id);
void switchGroup(const byte id, bool toState);
// handle switch by code
void handleSwitchCode(unsigned long code);
// print current JSON configuration
void printConfig(GroupPresenter* presenter);
static unsigned long triState2Decimal(const char *sCodeWord);
private:
// actor list
Actor** m_actors;
// group actor list
GroupActor** m_groups;
// number of actors
int m_numberOfActors;
// number of groups
int m_numberOfGroups;
};
#endif /* GroupBundle_hpp */