-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGroupActor.hpp
61 lines (44 loc) · 1.17 KB
/
GroupActor.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
54
55
56
57
58
59
60
61
//
// GroupActor.hpp
// GroupActor
//
// Created by Sebastian Westemeyer on 06.01.18.
//
#ifndef GroupActor_hpp
#define GroupActor_hpp
#include <RCSwitch.h>
#include "Actor.hpp"
class GroupBundle;
class GroupActor : public Actor {
public:
GroupActor(GroupBundle *bundle, const byte id, const byte section, unsigned long codeOn, unsigned long codeOff);
// get bundle id
const byte getId() const;
// get bundle section id
const byte getSectionId() const;
// switch actor on
virtual void switchOn();
// switch actor off
virtual void switchOff();
// add an additional actor to group
GroupActor* addActor(Actor *newActor);
// toggle state
bool toggle(const byte id);
// switch this group to a state if it matches
bool switchGroup(const byte id, bool toState);
// private methods
private:
// private members
private:
// group actor id
const byte m_id;
// webservice section key
const byte m_section;
// list of actors in this group
Actor** m_actors;
// number of items in list of actors
int m_numberOfActors;
// current group state
bool m_state;
};
#endif /* GroupActor_hpp */