... | ... |
@@ -221,31 +221,33 @@ To register your alerts you have two ways: |
221 | 221 |
#### set the alerts in `/instrumentation/zkv1000/alerts/warnings` |
222 | 222 |
This way they are registered at start |
223 | 223 |
|
224 |
+```xml |
|
224 | 225 |
<warnings> |
225 | 226 |
<warning> |
226 |
- <script><![CDATA[ |
|
227 |
+ <script><![CDATA[ |
|
227 | 228 |
getprop('/foo/bar/baz/value') and getprop('/foo/bar/baz/value[1]') > 5; |
228 |
- ]]></script> |
|
229 |
+ ]]></script> |
|
229 | 230 |
<message>TEST 1</message> |
230 | 231 |
<!-- <speaker/> TO USE THE MESSAGE AS VOICE --> |
231 | 232 |
<level>0</level> |
232 | 233 |
</warning> |
233 | 234 |
<warning> |
234 |
- <script><![CDATA[ |
|
235 |
+ <script><![CDATA[ |
|
235 | 236 |
getprop('/foo/bar/baz/value[3]') == 'foobar' or getprop('/foo/bar/baz/value[2]') < 10; |
236 |
- ]]></script> |
|
237 |
+ ]]></script> |
|
237 | 238 |
<message>TEST 2</message> |
238 | 239 |
<level>1</level> |
239 | 240 |
<!-- <speaker>this is only for testing</speaker> TO USE A SPECIFIC VOICE MESSAGE --> |
240 | 241 |
</warning> |
241 | 242 |
<warning> |
242 |
- <script><![CDATA[ |
|
243 |
+ <script><![CDATA[ |
|
243 | 244 |
return getprop('/foo/bar/baz/value[4]') == 5 or getprop('/foo/bar/baz/value[5]'); |
244 |
- ]]></script> |
|
245 |
+ ]]></script> |
|
245 | 246 |
<message>TEST 3</message> |
246 | 247 |
<level>2</level> |
247 | 248 |
</warning> |
248 | 249 |
</warnings> |
250 |
+``` |
|
249 | 251 |
|
250 | 252 |
#### or use the integrated API |
251 | 253 |
Actually not yet tested, but you can register new alerts somewhere in your Nasal code with the following: |