@@ -119,37 +119,24 @@ The condition checking and expression evaluation are from left to right
119
119
120
120
The valid left, right operands and syntaxes are
121
121
122
- Oerand and Syntaxes Usages
123
-
124
- {CHANNEL ID} LED1 == false && STATUS == LED1
125
-
126
- values e.g. boolean, integer and float HUMID1 > 70 || LAMP1 == false
127
-
128
- millis millis > 200000 + VALUE1
129
-
130
- micros VALUE1 < micros - 1000000
131
-
132
- time e.g. hour:min: sec time > 12:00:00 && time < 15:30:00
133
-
134
- date e.g. month/day/year where month start with 0 date == 5/28/2021
135
-
136
- weekday e.g. 1 for monday and 7 for sunday weekday == 5
137
-
138
- day e.g. 1 to 31 day > 24
139
-
140
- month e.g. 0 to 11 month < 11
141
-
142
- year e.g. 2021 year == 2021
143
-
144
- hour e.g. 0 to 23 hour == 18
145
-
146
- min e.g. 0 to 59 min == 30
147
-
148
- sec e.g. 0 to 59 sec == 20
149
-
150
- change e.g the value of channel changed change(VALUE1)
151
-
152
- ! e.g. the opposite of expresion result !LED1 || !(time > 15:20:06)
122
+ | Oerand and Syntaxes | Usages |
123
+ | ------------- | ------------- |
124
+ | {CHANNEL ID} | LED1 == false && STATUS == LED1 |
125
+ | values e.g. boolean, integer and float | HUMID1 > 70 \|\| LAMP1 == false |
126
+ | millis | millis > 200000 + VALUE1 |
127
+ | micros | VALUE1 < micros - 1000000 |
128
+ | time e.g. hour:min: sec | time > 12:00:00 && time < 15:30:00 |
129
+ | date e.g. month/day/year where month start with 0 | date == 5/28/2021 |
130
+ | weekday e.g. 1 for monday and 7 for sunday | weekday == 5 |
131
+ | day e.g. 1 to 31 | day > 24 |
132
+ | month e.g. 0 to 11 | month < 11 |
133
+ | year e.g. 2021 | year == 2021 |
134
+ | hour e.g. 0 to 23 | hour == 18 |
135
+ | min e.g. 0 to 59 | min == 30 |
136
+ | sec e.g. 0 to 59 | sec == 20 |
137
+ | change e.g the value of channel changed | change(VALUE1) |
138
+ | ! e.g. the opposite of expresion result | !LED1 \|\| !(time > 15:20:06) |
139
+ | year e.g. 2021 | year == 2021 |
153
140
154
141
155
142
The format of statements (THEN and ELSE) and its expression.
@@ -160,32 +147,23 @@ The statement processing and expression evaluation are from left to right.
160
147
161
148
The valid left, right operands and syntaxes are
162
149
163
- Oerand and Syntaxes Usages
164
-
165
- {CHANNEL ID} LED1 = false, STATUS = 5 * 10
166
-
167
- values e.g. boolean, integer and float HUMID1 = 70
150
+ | Oerand and Syntaxes | Usages |
151
+ | ------------- | ------------- |
152
+ | {CHANNEL ID} | LED1 = false, STATUS = 5 * 10 |
153
+ | values e.g. boolean, integer and float | HUMID1 = 70 |
154
+ | millis | VALUE1 += millis |
155
+ | micros | VALUE1 \* = micros |
156
+ | delay | delay(1000), LED1 = true |
157
+ | | ;do non-blocking delay until timed out and set LED1 to true |
158
+ | func e.g. func(x,y,z) | func(0,10,'hello world') |
159
+ | where x is the index of callback function added with FireSense.addCallbackFunction | ;send the hello world text 10 times to function with index 0 |
160
+ | y is the number of iteration that function will be called as long as the conditions is true | |
161
+ | z is the message payload sent to the callback. | |
162
+ | The content of payload other than alphabet (A-Z, a-z and 1-9) should be in ''. | |
163
+ | Use {CHANNEL_ID} to insert the channel value into the text payload. | |
168
164
169
- millis VALUE1 += millis
170
165
171
- micros VALUE1 * = micros
172
166
173
- delay delay(1000), LED1 = true
174
- ;do non-blocking delay until timed out and set LED1 to true
175
-
176
- func e.g. func(x,y,z) func(0,10,'hello world')
177
- where x is the index of callback function added ;send the hello world text 10 times to function with index 0
178
- with FireSense.addCallbackFunction
179
-
180
- y is the number of iteration that function will be
181
- called as long as the conditions is true
182
-
183
- z is the message payload sent to the callback.
184
- The content of payload other than alphabet (A-Z, a-z
185
- and 1-9) should be in ''.
186
-
187
- Use {CHANNEL_ID} to insert the channel value into
188
- the text payload.
189
167
190
168
The supported assignment operators are
191
169
+=, -=, * =, /=, &=, |=
@@ -194,6 +172,7 @@ The supported assignment operators are
194
172
The supported comparision operators are
195
173
==, !=, >, <, >=, <=
196
174
175
+
197
176
``` cpp
198
177
void addCondition (struct firesense_condition_t cond, bool addToDatabase = true);
199
178
```
@@ -288,7 +267,7 @@ return **`String`** The unique id String of device.
288
267
289
268
The MIT License (MIT)
290
269
291
- Copyright (c) 2019, 2020, 2021 K. Suwatchai (Mobizt)
270
+ Copyright (c) 2021 K. Suwatchai (Mobizt)
292
271
293
272
294
273
Permission is hereby granted, free of charge, to any person returning a copy of
0 commit comments