NewAskSin
 All Classes Files Functions Variables Groups Pages
Dimmer.h
1 //- -----------------------------------------------------------------------------------------------------------------------
2 // AskSin driver implementation
3 // 2013-08-03 <trilu@gmx.de> Creative Commons - http://creativecommons.org/licenses/by-nc-sa/3.0/de/
4 //- -----------------------------------------------------------------------------------------------------------------------
5 //- AskSin dimmer class ----------------------------------------------------------------------------------------------------
6 //- with a lot of support from martin876 at FHEM forum
7 //- -----------------------------------------------------------------------------------------------------------------------
8 
9 #ifndef _DIMMER_H
10 #define _DIMMER_H
11 
12 #include "AS.h"
13 #include "HAL.h"
14 
15 // default settings for list3 or list4
16 
17 // 01 00 02 00 03 00 04 32 05 64 06 00 07 FF 08 00 09 FF 0A 01 0B 12 0C 22 0D 23 0E 20 0F 00
18 // 10 14 11 C8 12 0A 13 05 14 05 15 00 16 C8 17 0A 18 0A 19 04 1A 04 26 00 27 14 28 52 29 63
19 // 81 00 82 00 83 00 84 32 85 64 86 00 87 FF 88 00 89 FF 8A 24 8B 12 8C 22 8D 23 8E 20 8F 00
20 // 90 14 91 C8 92 0A 93 05 94 05 95 00 96 C8 97 0A 98 0A 99 04 9A 04 A6 20 A7 14 A8 52 A9 63
21 const uint8_t peerEven[] = { // cnl 2, 4, 6
22  // 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, - 15 bytes
23  // 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E, - 15 bytes
24  // 0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, - 15 bytes
25  // 0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E, - 15 bytes
26 
27  0x00,0x00,0x00,0x32,0x64,0x00,0xFF,0x00,0xFF,0x01,0x12,0x22,0x23,0x20,0x00,
28  0x14,0xC8,0x0A,0x05,0x05,0x00,0xC8,0x0A,0x0A,0x04,0x04,0x00,0x14,0x52,0x63,
29  0x00,0x00,0x00,0x32,0x64,0x00,0xFF,0x00,0xFF,0x24,0x12,0x22,0x23,0x20,0x00,
30  0x14,0xC8,0x0A,0x05,0x05,0x00,0xC8,0x0A,0x0A,0x04,0x04,0x20,0x14,0x52,0x63,
31 };
32 
33 
34 // 01 00 02 00 03 00 04 32 05 64 06 00 07 FF 08 00 09 FF 0A 01 0B 44 0C 54 0D 64 0E 20 0F 00
35 // 10 14 11 C8 12 0A 13 05 14 05 15 00 16 C8 17 0A 18 0A 19 04 1A 04 26 00 27 14 28 52 29 63
36 // 81 00 82 00 83 00 84 32 85 64 86 00 87 0A 88 00 89 FF 8A A5 8B 44 8C 54 8D 64 8E 20 8F 00
37 // 90 14 91 C8 92 0A 93 05 94 05 95 00 96 C8 97 0A 98 0A 99 04 9A 04 A6 20 A7 14 A8 52 A9 63
38 const uint8_t peerOdd[] = { // cnl 1, 3, 5
39  // 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, - 15 bytes
40  // 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E, - 15 bytes
41  // 0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, - 15 bytes
42  // 0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E, - 15 bytes
43 
44  0x00,0x00,0x00,0x32,0x64,0x00,0xFF,0x00,0xFF,0x01,0x44,0x54,0x64,0x20,0x00,
45  0x14,0xC8,0x0A,0x05,0x05,0x00,0xC8,0x0A,0x0A,0x04,0x04,0x00,0x14,0x52,0x63,
46  0x00,0x00,0x00,0x32,0x64,0x00,0x0A,0x00,0xFF,0xA5,0x44,0x54,0x64,0x20,0x00,
47  0x14,0xC8,0x0A,0x05,0x05,0x00,0xC8,0x0A,0x0A,0x04,0x04,0x20,0x14,0x52,0x63,
48 };
49 
50 // 01 00 02 00 03 00 04 32 05 64 06 00 07 FF 08 00 09 FF 0A 01 0B 14 0C 52 0D 63 0E 20 0F 00
51 // 10 14 11 C8 12 0A 13 05 14 05 15 00 16 C8 17 0A 18 0A 19 04 1A 04 26 00 27 14 28 52 29 63
52 // 81 00 82 00 83 00 84 32 85 64 86 00 87 FF 88 00 89 FF 8A 26 8B 14 8C 52 8D 63 8E 20 8F 00
53 // 90 14 91 C8 92 0A 93 05 94 05 95 00 96 C8 97 0A 98 0A 99 04 9A 04 A6 20 A7 14 A8 52 A9 63
54 const uint8_t peerSingle[] = {
55  // 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, - 15 bytes
56  // 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E, - 15 bytes
57  // 0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, - 15 bytes
58  // 0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E, - 15 bytes
59 
60  0x00,0x00,0x00,0x32,0x64,0x00,0xff,0x00,0xff,0x01,0x14,0x52,0x63,0x20,0x00,
61  0x14,0xC8,0x0A,0x05,0x05,0x00,0xC8,0x0A,0x0A,0x04,0x04,0x00,0x14,0x52,0x63,
62  0x00,0x00,0x00,0x32,0x64,0x00,0xFF,0x00,0xFF,0x26,0x14,0x52,0x63,0x20,0x00,
63  0x14,0xC8,0x0A,0x05,0x05,0x00,0xC8,0x0A,0x0A,0x04,0x04,0x20,0x14,0x52,0x63,
64 };
65 
66 
67 class Dimmer {
68  //- user code here ------------------------------------------------------------------------------------------------------
69  public://----------------------------------------------------------------------------------------------------------------
70  protected://-------------------------------------------------------------------------------------------------------------
71  private://---------------------------------------------------------------------------------------------------------------
72 
73  struct s_lstCnl {
74  // 0x30,0x32,0x34,0x35,0x56,0x57,0x58,0x59,
75  uint8_t transmitTryMax :8; // 0x30, s:0, e:8
76  uint8_t ovrTempLvl :8; // 0x32, s:0, e:8
77  uint8_t redTempLvl :8; // 0x34, s:0, e:8
78  uint8_t redLvl :8; // 0x35, s:0, e:8
79  uint8_t powerUpAction :1; // 0x56, s:0, e:1
80  uint8_t :7; // 0x56, s:1, e:8
81  uint8_t statusInfoMinDly :5; // 0x57, s:0, e:5
82  uint8_t statusInfoRandom :3; // 0x57, s:5, e:8
83  uint8_t characteristic :1; // 0x58, s:0, e:1
84  uint8_t :7; // 0x58, s:1, e:8
85  uint8_t logicCombination :5; // 0x59, s:0, e:5
86  uint8_t :3; // 0x59, s:5, e:8
87  } lstCnl;
88 
89  struct s_lstPeer {
90  // 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x26,0x27,0x28,0x29,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0xa6,0xa7,0xa8,0xa9,
91  uint8_t shCtRampOn :4; // 0x01, s:0, e:4
92  uint8_t shCtRampOff :4; // 0x01, s:4, e:8
93  uint8_t shCtDlyOn :4; // 0x02, s:0, e:4
94  uint8_t shCtDlyOff :4; // 0x02, s:4, e:8
95  uint8_t shCtOn :4; // 0x03, s:0, e:4
96  uint8_t shCtOff :4; // 0x03, s:4, e:8
97  uint8_t shCtValLo :8; // 0x04, s:0, e:0
98  uint8_t shCtValHi :8; // 0x05, s:0, e:0
99  uint8_t shOnDly :8; // 0x06, s:0, e:0
100  uint8_t shOnTime :8; // 0x07, s:0, e:0
101  uint8_t shOffDly :8; // 0x08, s:0, e:0
102  uint8_t shOffTime :8; // 0x09, s:0, e:0
103  uint8_t shActionTypeDim :4; // 0x0a, s:0, e:4
104  uint8_t :2; // 0x0a, s:4, e:6
105  uint8_t shOffTimeMode :1; // 0x0a, s:6, e:7
106  uint8_t shOnTimeMode :1; // 0x0a, s:7, e:8
107  uint8_t shDimJtOn :4; // 0x0b, s:0, e:4
108  uint8_t shDimJtOff :4; // 0x0b, s:4, e:8
109  uint8_t shDimJtDlyOn :4; // 0x0c, s:0, e:4
110  uint8_t shDimJtDlyOff :4; // 0x0c, s:4, e:8
111  uint8_t shDimJtRampOn :4; // 0x0d, s:0, e:4
112  uint8_t shDimJtRampOff :4; // 0x0d, s:4, e:8
113  uint8_t :5; // 0x0e, s:0, e:5
114  uint8_t shOffDlyBlink :1; // 0x0e, s:5, e:6
115  uint8_t shOnLvlPrio :1; // 0x0e, s:6, e:7
116  uint8_t shOnDlyMode :1; // 0x0e, s:7, e:8
117  uint8_t shOffLevel :8; // 0x0f, s:0, e:0
118  uint8_t shOnMinLevel :8; // 0x10, s:0, e:0
119  uint8_t shOnLevel :8; // 0x11, s:0, e:0
120  uint8_t shRampSstep :8; // 0x12, s:0, e:0
121  uint8_t shRampOnTime :8; // 0x13, s:0, e:0
122  uint8_t shRampOffTime :8; // 0x14, s:0, e:0
123  uint8_t shDimMinLvl :8; // 0x15, s:0, e:0
124  uint8_t shDimMaxLvl :8; // 0x16, s:0, e:0
125  uint8_t shDimStep :8; // 0x17, s:0, e:0
126  uint8_t shOffDlyStep :8; // 0x18, s:0, l:8
127  uint8_t shOffDlyNewTime :8; // 0x19, s:0, e:0
128  uint8_t shOffDlyOldTime :8; // 0x1a, s:0, e:0
129  uint8_t shDimElsActionType :4; // 0x26, s:0, e:4
130  uint8_t :2; // 0x26, s:4, e:6
131  uint8_t shDimElsOffTimeMd :1; // 0x26, s:6, e:7
132  uint8_t shDimElsOnTimeMd :1; // 0x26, s:7, e:8
133  uint8_t shDimElsJtOn :4; // 0x27, s:0, e:4
134  uint8_t shDimElsJtOff :4; // 0x27, s:4, e:8
135  uint8_t shDimElsJtDlyOn :4; // 0x28, s:0, e:4
136  uint8_t shDimElsJtDlyOff :4; // 0x28, s:4, e:8
137  uint8_t shDimElsJtRampOn :4; // 0x29, s:0, e:4
138  uint8_t shDimElsJtRampOff :4; // 0x29, s:4, e:8
139  uint8_t lgCtRampOn :4; // 0x81, s:0, e:4
140  uint8_t lgCtRampOff :4; // 0x81, s:4, e:8
141  uint8_t lgCtDlyOn :4; // 0x82, s:0, e:4
142  uint8_t lgCtDlyOff :4; // 0x82, s:4, e:8
143  uint8_t lgCtOn :4; // 0x83, s:0, e:4
144  uint8_t lgCtOff :4; // 0x83, s:4, e:8
145  uint8_t lgCtValLo :8; // 0x84, s:0, e:0
146  uint8_t lgCtValHi :8; // 0x85, s:0, e:0
147  uint8_t lgOnDly :8; // 0x86, s:0, e:0
148  uint8_t lgOnTime :8; // 0x87, s:0, e:0
149  uint8_t lgOffDly :8; // 0x88, s:0, e:0
150  uint8_t lgOffTime :8; // 0x89, s:0, e:0
151  uint8_t lgActionTypeDim :4; // 0x8a, s:0, e:4
152  uint8_t :1; // 0x8a, s:4, e:5
153  uint8_t lgMultiExec :1; // 0x8a, s:5, e:6
154  uint8_t lgOffTimeMode :1; // 0x8a, s:6, e:7
155  uint8_t lgOnTimeMode :1; // 0x8a, s:7, e:8
156  uint8_t lgDimJtOn :4; // 0x8b, s:0, e:4
157  uint8_t lgDimJtOff :4; // 0x8b, s:4, e:8
158  uint8_t lgDimJtDlyOn :4; // 0x8c, s:0, e:4
159  uint8_t lgDimJtDlyOff :4; // 0x8c, s:4, e:8
160  uint8_t lgDimJtRampOn :4; // 0x8d, s:0, e:4
161  uint8_t lgDimJtRampOff :4; // 0x8d, s:4, e:8
162  uint8_t :5; // 0x8e, s:0, e:5
163  uint8_t lgOffDlyBlink :1; // 0x8e, s:5, e:6
164  uint8_t lgOnLvlPrio :1; // 0x8e, s:6, e:7
165  uint8_t lgOnDlyMode :1; // 0x8e, s:7, e:8
166  uint8_t lgOffLevel :8; // 0x8f, s:0, e:0
167  uint8_t lgOnMinLevel :8; // 0x90, s:0, e:0
168  uint8_t lgOnLevel :8; // 0x91, s:0, e:0
169  uint8_t lgRampSstep :8; // 0x92, s:0, e:0
170  uint8_t lgRampOnTime :8; // 0x93, s:0, e:0
171  uint8_t lgRampOffTime :8; // 0x94, s:0, e:0
172  uint8_t lgDimMinLvl :8; // 0x95, s:0, e:0
173  uint8_t lgDimMaxLvl :8; // 0x96, s:0, e:0
174  uint8_t lgDimStep :8; // 0x97, s:0, e:0
175  uint8_t lgOffDlyStep :8; // 0x98, s:0, l:8
176  uint8_t lgOffDlyNewTime :8; // 0x99, s:0, e:0
177  uint8_t lgOffDlyOldTime :8; // 0x9a, s:0, e:0
178  uint8_t lgDimElsActionType :4; // 0xa6, s:0, e:4
179  uint8_t :2; // 0xa6, s:5, e:6
180  uint8_t lgDimElsOffTimeMd :1; // 0xa6, s:6, e:7
181  uint8_t lgDimElsOnTimeMd :1; // 0xa6, s:7, e:8
182  uint8_t lgDimElsJtOn :4; // 0xa7, s:0, e:4
183  uint8_t lgDimElsJtOff :4; // 0xa7, s:4, e:8
184  uint8_t lgDimElsJtDlyOn :4; // 0xa8, s:0, e:4
185  uint8_t lgDimElsJtDlyOff :4; // 0xa8, s:4, e:8
186  uint8_t lgDimElsJtRampOn :4; // 0xa9, s:0, e:4
187  uint8_t lgDimElsJtRampOff :4; // 0xa9, s:4, e:8
188  } lstPeer;
189 
190  struct s_l3 {
191  // 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x26,0x27,0x28,0x29,
192  // 0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0xa6,0xa7,0xa8,0xa9,
193  uint8_t ctRampOn :4; // 0x01,0x81, s:0, e:4
194  uint8_t ctRampOff :4; // 0x01,0x81, s:4, e:8
195  uint8_t ctDlyOn :4; // 0x02,0x82, s:0, e:4
196  uint8_t ctDlyOff :4; // 0x02,0x82, s:4, e:8
197  uint8_t ctOn :4; // 0x03,0x83, s:0, e:4
198  uint8_t ctOff :4; // 0x03,0x83, s:4, e:8
199  uint8_t ctValLo :8; // 0x04,0x84, s:0, e:0
200  uint8_t ctValHi :8; // 0x05,0x85, s:0, e:0
201  uint8_t onDly :8; // 0x06,0x86, s:0, e:0
202  uint8_t onTime :8; // 0x07,0x87, s:0, e:0
203  uint8_t offDly :8; // 0x08,0x88, s:0, e:0
204  uint8_t offTime :8; // 0x09,0x89, s:0, e:0
205  uint8_t actionType :4; // 0x0a,0x8a, s:0, e:4
206  uint8_t :1; // 0x0a,0x8a, s:4. e:5
207  uint8_t lgMultiExec :1; // 0x0a,0x8a, s:5, e:6
208  uint8_t offTimeMode :1; // 0x0a,0x8a, s:6, e:7
209  uint8_t onTimeMode :1; // 0x0a,0x8a, s:7, e:8
210  uint8_t jtOn :4; // 0x0b,0x8b, s:0, e:4
211  uint8_t jtOff :4; // 0x0b,0x8b, s:4, e:8
212  uint8_t jtDlyOn :4; // 0x0c,0x8c, s:0, e:4
213  uint8_t jtDlyOff :4; // 0x0c,0x8c, s:4, e:8
214  uint8_t jtRampOn :4; // 0x0d,0x8d, s:0, e:4
215  uint8_t jtRampOff :4; // 0x0d,0x8d, s:4, e:8
216  uint8_t :5; // 0x0e,0x8e, s:0, e:5
217  uint8_t offDlyBlink :1; // 0x0e,0x8e, s:5, e:6
218  uint8_t onLvlPrio :1; // 0x0e,0x8e, s:6, e:7
219  uint8_t onDlyMode :1; // 0x0e,0x8e, s:7, e:8
220  uint8_t offLevel :8; // 0x0f,0x8f, s:0, e:0
221  uint8_t onMinLevel :8; // 0x10,0x90, s:0, e:0
222  uint8_t onLevel :8; // 0x11,0x91, s:0, e:0
223  uint8_t rampSstep :8; // 0x12,0x92, s:0, e:0
224  uint8_t rampOnTime :8; // 0x13,0x93, s:0, e:0
225  uint8_t rampOffTime :8; // 0x14,0x94, s:0, e:0
226  uint8_t dimMinLvl :8; // 0x15,0x95, s:0, e:0
227  uint8_t dimMaxLvl :8; // 0x16,0x96, s:0, e:0
228  uint8_t dimStep :8; // 0x17,0x97, s:0, e:0
229  uint8_t offDlyStep :8; // 0x18,0x98, s:0, l:8
230  uint8_t offDlyNewTime :8; // 0x19,0x99, s:0, e:0
231  uint8_t offDlyOldTime :8; // 0x1a,0x9a, s:0, e:0
232  uint8_t elsActionType :4; // 0x26,0xa6, s:0, e:4
233  uint8_t :2; // 0x26,0xa6, s:4, e:6
234  uint8_t elsOffTimeMd :1; // 0x26,0xa6, s:6, e:7
235  uint8_t elsOnTimeMd :1; // 0x26,0xa6, s:7, e:8
236  uint8_t elsJtOn :4; // 0x27,0xa7, s:0, e:4
237  uint8_t elsJtOff :4; // 0x27,0xa7, s:4, e:8
238  uint8_t elsJtDlyOn :4; // 0x28,0xa8, s:0, e:4
239  uint8_t elsJtDlyOff :4; // 0x28,0xa8, s:4, e:8
240  uint8_t elsJtRampOn :4; // 0x29,0xa9, s:0, e:4
241  uint8_t elsJtRampOff :4; // 0x29,0xa9, s:4, e:8
242  } *l3;
243 
244  void (*fInit)(void); // pointer to init function in main sketch
245  void (*fSwitch)(uint8_t,uint8_t); // pointer to switch function (PWM) in main sketch, first value is PWM level, second the characteristics
246 
247  uint8_t *pTemp; // pointer to temperature byte in main sketch
248 
249  uint8_t sendStat :2; // is there a status to be send, 1 indicates an ACK, 2 a status message
250  uint16_t msgDelay;
251  waitTimer msgTmr; // message timer for sending status
252 
253  waitTimer delayTmr; // delay timer for on,off and delay time
254  uint16_t rampTme, duraTme; // time store for trigger 11
255 
256  uint8_t setStat; // status to set on the PWM channel
257  uint32_t adjDlyPWM; // timer to follow in adjPWM function
258  uint16_t characteristicStat; // depends on list1 characteristic setting
259  waitTimer adjTmr; // timer for adjustment of PWM
260 
261  //uint8_t oldStat; // remember modStat in delay off blink function
262  uint8_t activeOffDlyBlink :1; // activate off delay blinking
263  uint8_t statusOffDlyBlink :1; // remember led off cycle
264  uint8_t directionDim :1; // used in toogleDim function
265 
266  uint8_t cnt; // message counter for type 40 message
267  uint8_t curStat:4, nxtStat:4; // current state and next state
268 
269  public://----------------------------------------------------------------------------------------------------------------
270  //- user defined functions ----------------------------------------------------------------------------------------------
271 
272  void config(void Init(), void Switch(uint8_t,uint8_t), uint8_t temperature); // configures the module, jump addresses, etc
273 
274  void trigger11(uint8_t setValue, uint8_t *rampTime, uint8_t *duraTime); // messages coming from master
275  void trigger40(uint8_t msgLng, uint8_t msgCnt); // messages coming from switch
276  void trigger41(uint8_t msgBLL, uint8_t msgCnt, uint8_t msgVal); // messages coming from sensor
277 
278  private://---------------------------------------------------------------------------------------------------------------
279  void toggleDim(void); // dim up or down with one key
280  void upDim(void); // up dim procedure
281  void downDim(void); // down dim procedure
282 
283  void adjPWM(void); // adjusts PWM value in a regular manner
284  void blinkOffDly(void); // polling function to blink led while in off delay
285  void sendStatus(void); // send status function
286  void dimPoll(void); // dimmer polling function
287 
288  //- helpers defined functions -------------------------------------------------------------------------------------------
289  void showStruct(void);
290 
291 
292  public://----------------------------------------------------------------------------------------------------------------
293  //- mandatory functions for every new module to communicate within AS protocol stack ------------------------------------
294  uint8_t modStat; // module status byte, needed for list3 modules to answer status requests
295  uint8_t modDUL; // module down up low battery byte
296  uint8_t regCnl; // holds the channel for the module
297 
298  AS *hm; // pointer to HM class instance
299 
300  void setToggle(void); // toggle the module initiated by config button
301  void configCngEvent(void); // list1 on registered channel had changed
302  void pairSetEvent(uint8_t *data, uint8_t len); // pair message to specific channel, handover information for value, ramp time and so on
303  void pairStatusReq(void); // event on status request
304  void peerMsgEvent(uint8_t type, uint8_t *data, uint8_t len); // peer message was received on the registered channel, handover the message bytes and length
305 
306  void poll(void); // poll function, driven by HM loop
307 
308  //- predefined, no reason to touch ------------------------------------------------------------------------------------
309  void regInHM(uint8_t cnl, uint8_t lst, AS *instPtr); // register this module in HM on the specific channel
310  void hmEventCol(uint8_t by3, uint8_t by10, uint8_t by11, uint8_t *data, uint8_t len);// call back address for HM for informing on events
311  void peerAddEvent(uint8_t *data, uint8_t len); // peer was added to the specific channel, 1st and 2nd byte shows peer channel, third and fourth byte shows peer index
312  void firstStart(void); // first start detection, to write list1
313 };
314 
315 
316 #endif
Main class for implementation of the AskSin protocol stack. Every device needs exactly one instance o...
Definition: AS.h:39
Timer class for non-blocking delays.
Definition: AS.h:200
Definition: Dimmer.h:67