-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNAVFoundation.RmsEvents.axi
More file actions
490 lines (385 loc) · 22.3 KB
/
NAVFoundation.RmsEvents.axi
File metadata and controls
490 lines (385 loc) · 22.3 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
PROGRAM_NAME='NAVFoundation.RmsEvents'
/*
_ _ _ ___ __
| \ | | ___ _ __ __ _ __ _| |_ ___ / \ \ / /
| \| |/ _ \| '__/ _` |/ _` | __/ _ \ / _ \ \ / /
| |\ | (_) | | | (_| | (_| | || __// ___ \ V /
|_| \_|\___/|_| \__, |\__,_|\__\___/_/ \_\_/
|___/
MIT License
Copyright (c) 2010-2026 Norgate AV
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#IF_NOT_DEFINED __NAV_FOUNDATION_RMSEVENTS__
#DEFINE __NAV_FOUNDATION_RMSEVENTS__ 'NAVFoundation.RmsEvents'
#include 'NAVFoundation.Core.axi'
#include 'NAVFoundation.RmsUtils.axi'
#include 'NAVFoundation.ArrayUtils.axi'
#include 'NAVFoundation.ErrorLogUtils.axi'
// #DEFINE USING_NAV_RMS_ADAPTER_ONLINE_EVENT_PRE_CLIENT_CONNECTION_INIT_CALLBACK
// define_function NAVRmsAdapterOnlineEventPreClientConnectionInitCallback(_NAVRmsClient client, tdata args) {}
// #DEFINE USING_NAV_RMS_CLIENT_CONNECTION_INIT_EVENT_CALLBACK
// define_function NAVRmsClientConnectionInitEventCallback(_NAVRmsClient client, tdata args) {}
// #DEFINE USING_NAV_RMS_ADAPTER_ONLINE_EVENT_POST_CLIENT_CONNECTION_INIT_CALLBACK
// define_function NAVRmsAdapterOnlineEventPostClientConnectionInitCallback(_NAVRmsClient client, tdata args) {}
// #DEFINE USING_NAV_RMS_ADAPTER_OFFLINE_EVENT_CALLBACK
// define_function NAVRmsAdapterOfflineEventCallback(_NAVRmsClient client, tdata args) {}
// #DEFINE USING_NAV_RMS_ADAPTER_ONERROR_EVENT_CALLBACK
// define_function NAVRmsAdapterOnErrorEventCallback(_NAVRmsClient client, tdata args) {}
// #DEFINE USING_NAV_RMS_CLIENT_EXCEPTION_EVENT_CALLBACK
// define_function NAVRmsClientExceptionEventCallback(_NAVRmsClient client, tdata args) {}
// #DEFINE USING_NAV_RMS_CLIENT_ONLINE_EVENT_CALLBACK
// define_function NAVRmsClientOnlineEventCallback(_NAVRmsClient client, tdata args) {}
// #DEFINE USING_NAV_RMS_CLIENT_OFFLINE_EVENT_CALLBACK
// define_function NAVRmsClientOfflineEventCallback(_NAVRmsClient client, tdata args) {}
// #DEFINE USING_NAV_RMS_CLIENT_REGISTERED_EVENT_CALLBACK
// define_function NAVRmsClientRegisteredEventCallback(_NAVRmsClient client, tdata args) {}
// #DEFINE USING_NAV_RMS_CLIENT_CONNECTION_STATE_TRANSITION_EVENT_CALLBACK
// define_function NAVRmsClientConnectionStateTransitionEventCallback(_NAVRmsClient client, tdata args) {}
// #DEFINE USING_NAV_RMS_CLIENT_VERSIONS_EVENT_CALLBACK
// define_function NAVRmsClientVersionsEventCallback(_NAVRmsClient client, tdata args) {}
// #DEFINE USING_NAV_RMS_CLIENT_SYSTEM_POWER_ON_EVENT_CALLBACK
// define_function NAVRmsClientSystemPowerOnEventCallback(_NAVRmsClient client, tdata args) {}
// #DEFINE USING_NAV_RMS_CLIENT_SYSTEM_POWER_OFF_EVENT_CALLBACK
// define_function NAVRmsClientSystemPowerOffEventCallback(_NAVRmsClient client, tdata args) {}
// #DEFINE USING_NAV_RMS_CLIENT_SERVER_INFO_EVENT_CALLBACK
// define_function NAVRmsClientServerInfoEventCallback(_NAVRmsClient client, tdata args) {}
// #DEFINE USING_NAV_RMS_CLIENT_LOCATION_EVENT_CALLBACK
// define_function NAVRmsClientLocationEventCallback(_NAVRmsClient client, tdata args) {}
// #DEFINE USING_NAV_RMS_CLIENT_ASSETS_REGISTER_EVENT_CALLBACK
// define_function NAVRmsClientAssetsRegisterEventCallback(_NAVRmsClient client, tdata args) {}
// #DEFINE USING_NAV_RMS_CLIENT_ASSET_REGISTERED_EVENT_CALLBACK
// define_function NAVRmsClientAssetRegisteredEventCallback(_NAVRmsClient client, _NAVRmsRegisteredAsset asset) {}
// #DEFINE USING_NAV_RMS_CLIENT_ASSET_REGISTER_METADATA_CALLBACK
// define_function NAVRmsClientAssetRegisterMetadataCallback(_NAVRmsClient client, _NAVRmsRegisteredAsset asset) {}
// #DEFINE USING_NAV_RMS_CLIENT_ASSET_REGISTER_PARAMETERS_CALLBACK
// define_function NAVRmsClientAssetRegisterParametersCallback(_NAVRmsClient client, _NAVRmsRegisteredAsset asset) {}
// #DEFINE USING_NAV_RMS_CLIENT_ASSET_REGISTER_CONTROL_METHODS_CALLBACK
// define_function NAVRmsClientAssetRegisterControlMethodsCallback(_NAVRmsClient client, _NAVRmsRegisteredAsset asset) {}
// #DEFINE USING_NAV_RMS_CLIENT_ASSET_RELOCATED_EVENT_CALLBACK
// define_function NAVRmsClientAssetRelocatedEventCallback(_NAVRmsClient client, tdata args) {}
// #DEFINE USING_NAV_RMS_CLIENT_ASSET_METHOD_EXECUTE_EVENT_CALLBACK
// define_function NAVRmsClientAssetMethodExecuteEventCallback(_NAVRmsClient client, _NAVRmsAssetMethodExecuteEvent event) {}
// #DEFINE USING_NAV_RMS_CLIENT_CONFIG_CHANGE_EVENT_CALLBACK
// define_function NAVRmsClientConfigChangeEventCallback(_NAVRmsClient client, tdata args) {}
// #DEFINE USING_NAV_RMS_CLIENT_HOTLIST_COUNT_EVENT_CALLBACK
// define_function NAVRmsClientHotlistCountEventCallback(_NAVRmsClient client, tdata args) {}
// #DEFINE USING_NAV_RMS_CLIENT_MESSAGE_DISPLAY_EVENT_CALLBACK
// define_function NAVRmsClientMessageDisplayEventCallback(_NAVRmsClient client, tdata args) {}
// #DEFINE_USING_NAV_RMS_ADAPTER_BUTTON_PUSH_EVENT_CALLBACK
// define_function NAVRmsAdapterButtonPushEventCallback(_NAVRmsClient client, tbutton args) {}
// #DEFINE_USING_NAV_RMS_ADAPTER_BUTTON_RELEASE_EVENT_CALLBACK
// define_function NAVRmsAdapterButtonReleaseEventCallback(_NAVRmsClient client, tbutton args) {}
// #DEFINE_USING_NAV_RMS_ADAPTER_CHANNEL_ON_EVENT_CALLBACK
// define_function NAVRmsAdapterChannelOnEventCallback(_NAVRmsClient client, tchannel args) {}
// #DEFINE_USING_NAV_RMS_ADAPTER_CHANNEL_OFF_EVENT_CALLBACK
// define_function NAVRmsAdapterChannelOffEventCallback(_NAVRmsClient client, tchannel args) {}
// #DEFINE_USING_NAV_RMS_ADAPTER_LEVEL_EVENT_CALLBACK
// define_function NAVRmsAdapterLevelEventCallback(_NAVRmsClient client, tlevel args) {}
DEFINE_EVENT
#IF_DEFINED USING_RMS
data_event[vdvRms] {
online: {
NAVRmsClientInit(rmsClient, data)
#IF_DEFINED USING_NAV_RMS_ADAPTER_ONLINE_EVENT_PRE_CLIENT_CONNECTION_INIT_CALLBACK
NAVRmsAdapterOnlineEventPreClientConnectionInitCallback(rmsClient, data)
#END_IF
#IF_DEFINED USING_NAV_RMS_CLIENT_CONNECTION_INIT_EVENT_CALLBACK
NAVRmsClientConnectionInitEventCallback(rmsClient, data)
NAVRmsAdapterConnectionInit(rmsClient)
#ELSE
#warn 'USING_NAV_RMS_CLIENT_CONNECTION_INIT_EVENT_CALLBACK not defined'
#warn 'RMS Client will not be configured and will not connect to the RMS Server!!!'
#END_IF
#IF_DEFINED USING_NAV_RMS_ADAPTER_ONLINE_EVENT_POST_CLIENT_CONNECTION_INIT_CALLBACK
NAVRmsAdapterOnlineEventPostClientConnectionInitCallback(rmsClient, data)
#END_IF
NAVErrorLog(NAV_LOG_LEVEL_INFO,
"'RMS Adapter [', NAVDeviceToString(data.device), '] Adapter Device Online'")
}
offline: {
#IF_DEFINED USING_NAV_RMS_ADAPTER_OFFLINE_EVENT_CALLBACK
NAVRmsAdapterOfflineEventCallback(rmsClient, data)
#END_IF
NAVErrorLog(NAV_LOG_LEVEL_INFO,
"'RMS Adapter [', NAVDeviceToString(data.device), '] Adapter Device Offline'")
}
onerror: {
#IF_DEFINED USING_NAV_RMS_ADAPTER_ONERROR_EVENT_CALLBACK
NAVRmsAdapterOnErrorEventCallback(rmsClient, data)
#END_IF
NAVErrorLog(NAV_LOG_LEVEL_INFO,
"'RMS Adapter [', NAVDeviceToString(data.device), '] Adapter Device OnError: ', data.text")
}
command: {
stack_var _NAVSnapiMessage message
NAVParseSnapiMessage(data.text, message)
switch (upper_string(message.Header)) {
// Client Exception Notifications
case RMS_EVENT_EXCEPTION: {
rmsClient.Exception.Message = message.Parameter[1]
if (length_array(message.Parameter[2])) {
rmsClient.Exception.ThrownByCommand = message.Parameter[2]
}
#IF_DEFINED USING_NAV_RMS_CLIENT_EXCEPTION_EVENT_CALLBACK
NAVRmsClientExceptionEventCallback(rmsClient, data)
#END_IF
NAVRmsExceptionLog(rmsClient.Exception, data)
}
// Client Event Notifications
case RMS_EVENT_CLIENT_ONLINE: {
rmsClient.IsOnline = true
#IF_DEFINED USING_NAV_RMS_CLIENT_ONLINE_EVENT_CALLBACK
NAVRmsClientOnlineEventCallback(rmsClient, data)
#END_IF
NAVErrorLog(NAV_LOG_LEVEL_INFO,
"'RMS Client [', NAVDeviceToString(data.device), '] Client Online'")
}
case RMS_EVENT_CLIENT_REGISTERED: {
rmsClient.IsRegistered = true
#IF_DEFINED USING_NAV_RMS_CLIENT_REGISTERED_EVENT_CALLBACK
NAVRmsClientRegisteredEventCallback(rmsClient, data)
#END_IF
NAVErrorLog(NAV_LOG_LEVEL_INFO,
"'RMS Client [', NAVDeviceToString(data.device), '] Client Registered'")
}
case RMS_EVENT_CLIENT_OFFLINE: {
rmsClient.IsOnline = false
#IF_DEFINED USING_NAV_RMS_CLIENT_OFFLINE_EVENT_CALLBACK
NAVRmsClientOfflineEventCallback(rmsClient, data)
#END_IF
NAVErrorLog(NAV_LOG_LEVEL_INFO,
"'RMS Client [', NAVDeviceToString(data.device), '] Client Offline'")
}
case RMS_EVENT_CLIENT_STATE_TRANSITION: {
rmsClient.ConnectionState.OldState = message.Parameter[1]
rmsClient.ConnectionState.NewState = message.Parameter[2]
#IF_DEFINED USING_NAV_RMS_CLIENT_CONNECTION_STATE_TRANSITION_EVENT_CALLBACK
NAVRmsClientConnectionStateTransitionEventCallback(rmsClient, data)
#END_IF
NAVRmsClientConnectionStateLog(rmsClient.ConnectionState, data)
}
case RMS_EVENT_VERSION_REQUEST: {
#IF_DEFINED USING_NAV_RMS_CLIENT_VERSIONS_EVENT_CALLBACK
NAVRmsClientVersionsEventCallback(rmsClient, data)
#END_IF
NAVErrorLog(NAV_LOG_LEVEL_INFO,
"'RMS Client [', NAVDeviceToString(data.device), '] Version Information Request'")
}
case RMS_EVENT_SYSTEM_POWER_ON: {
#IF_DEFINED USING_NAV_RMS_CLIENT_SYSTEM_POWER_ON_EVENT_CALLBACK
NAVRmsClientSystemPowerOnEventCallback(rmsClient, data)
#END_IF
NAVErrorLog(NAV_LOG_LEVEL_INFO,
"'RMS Client [', NAVDeviceToString(data.device), '] System Power On'")
}
case RMS_EVENT_SYSTEM_POWER_OFF: {
#IF_DEFINED USING_NAV_RMS_CLIENT_SYSTEM_POWER_OFF_EVENT_CALLBACK
NAVRmsClientSystemPowerOffEventCallback(rmsClient, data)
#END_IF
NAVErrorLog(NAV_LOG_LEVEL_INFO,
"'RMS Client [', NAVDeviceToString(data.device), '] System Power Off'")
}
case NAV_RMS_CLIENT_EVENT_SERVER_INFO: {
rmsClient.ServerInformation.AppVersion = message.Parameter[1]
rmsClient.ServerInformation.DatabaseVersion = message.Parameter[2]
rmsClient.ServerInformation.TimesyncEnabled = NAVStringToBoolean(message.Parameter[3])
rmsClient.ServerInformation.SmtpEnabled = NAVStringToBoolean(message.Parameter[4])
// message.Parameter[5] is undocumented. It is a Boolean string value.
rmsClient.ServerInformation.MinPollTime = atoi(message.Parameter[6])
rmsClient.ServerInformation.MaxPollTime = atoi(message.Parameter[7])
#IF_DEFINED USING_NAV_RMS_CLIENT_SERVER_INFO_EVENT_CALLBACK
NAVRmsClientServerInfoEventCallback(rmsClient, data)
#END_IF
NAVRmsClientServerInformationLog(rmsClient.ServerInformation, data)
}
// Client Location Event Notifications
case RMS_EVENT_LOCATION_INFORMATION: {
rmsClient.Location.ClientDefaultLocation = NAVStringToBoolean(message.Parameter[1])
rmsClient.Location.Id = message.Parameter[2]
rmsClient.Location.Name = message.Parameter[3]
rmsClient.Location.Owner = message.Parameter[4]
rmsClient.Location.PhoneNumber = message.Parameter[5]
rmsClient.Location.Occupancy = message.Parameter[6]
rmsClient.Location.PrestigeName = message.Parameter[7]
rmsClient.Location.Timezone = message.Parameter[8]
rmsClient.Location.AssetLicensed = NAVStringToBoolean(message.Parameter[9])
#IF_DEFINED USING_NAV_RMS_CLIENT_LOCATION_EVENT_CALLBACK
NAVRmsClientLocationEventCallback(rmsClient, data)
#END_IF
NAVRmsClientLocationLog(rmsClient.Location, data)
}
// Client Config Change Event Notifications
case RMS_EVENT_CONFIGURATION_CHANGE: {
rmsClient.ConfigChange.Key = message.Parameter[1]
rmsClient.ConfigChange.Value = message.Parameter[2]
#IF_DEFINED USING_NAV_RMS_CLIENT_CONFIG_CHANGE_EVENT_CALLBACK
NAVRmsClientConfigChangeEventCallback(rmsClient, data)
#END_IF
NAVRmsClientConfigChangeLog(rmsClient.ConfigChange, data)
}
// Asset Registration Event Notifications
case RMS_EVENT_ASSETS_REGISTER: {
NAVErrorLog(NAV_LOG_LEVEL_INFO,
"'RMS Client [', NAVDeviceToString(data.device), '] Assets Register Request'")
#IF_DEFINED USING_NAV_RMS_CLIENT_ASSETS_REGISTER_EVENT_CALLBACK
NAVRmsClientAssetsRegisterEventCallback(rmsClient, data)
#END_IF
}
case RMS_EVENT_ASSET_REGISTERED: {
stack_var _NAVRmsRegisteredAsset asset
asset.Key = message.Parameter[1]
asset.Id = message.Parameter[2]
asset.NewRegistration = NAVStringToBoolean(message.Parameter[3])
NAVStringToDevice(message.Parameter[4], asset.Device)
if (asset.Device == 0:1:0) {
rmsClient.ClientKey = asset.Key
}
NAVRmsClientAssetRegisteredLog(asset, data)
#IF_DEFINED USING_NAV_RMS_CLIENT_ASSET_REGISTERED_EVENT_CALLBACK
NAVRmsClientAssetRegisteredEventCallback(rmsClient, asset)
#END_IF
#IF_DEFINED USING_NAV_RMS_CLIENT_ASSET_REGISTER_METADATA_CALLBACK
NAVRmsClientAssetRegisterMetadataCallback(rmsClient, asset)
#END_IF
#IF_DEFINED USING_NAV_RMS_CLIENT_ASSET_REGISTER_PARAMETERS_CALLBACK
NAVRmsClientAssetRegisterParametersCallback(rmsClient, asset)
#END_IF
#IF_DEFINED USING_NAV_RMS_CLIENT_ASSET_REGISTER_CONTROL_METHODS_CALLBACK
NAVRmsClientAssetRegisterControlMethodsCallback(rmsClient, asset)
#END_IF
}
case RMS_EVENT_ASSET_RELOCATED: {
NAVErrorLog(NAV_LOG_LEVEL_INFO,
"'RMS Client [', NAVDeviceToString(data.device), '] Asset Location Change: '")
NAVErrorLog(NAV_LOG_LEVEL_INFO,
"'RMS Client [', NAVDeviceToString(data.device), '] Asset Client Key: ', message.Parameter[1]")
NAVErrorLog(NAV_LOG_LEVEL_INFO,
"'RMS Client [', NAVDeviceToString(data.device), '] Asset ID: ', message.Parameter[2]")
NAVErrorLog(NAV_LOG_LEVEL_INFO,
"'RMS Client [', NAVDeviceToString(data.device), '] New Location ID: ', message.Parameter[3]")
#IF_DEFINED USING_NAV_RMS_CLIENT_ASSET_RELOCATED_EVENT_CALLBACK
NAVRmsClientAssetRelocatedEventCallback(rmsClient, data)
#END_IF
}
// Asset Parameter Event Notifications
// case RMS_EVENT_ASSET_PARAM_UPDATE: {
// NAVErrorLog(NAV_LOG_LEVEL_INFO,
// "'RMS Client [', NAVDeviceToString(data.device), '] Asset Parameter Update: '")
// NAVErrorLog(NAV_LOG_LEVEL_INFO,
// "'RMS Client [', NAVDeviceToString(data.device), '] Asset Client Key: ', message.Parameter[1]")
// NAVErrorLog(NAV_LOG_LEVEL_INFO,
// "'RMS Client [', NAVDeviceToString(data.device), '] Parameter Key: ', message.Parameter[2]")
// NAVErrorLog(NAV_LOG_LEVEL_INFO,
// "'RMS Client [', NAVDeviceToString(data.device), '] Change Operator: ', message.Parameter[3]")
// NAVErrorLog(NAV_LOG_LEVEL_INFO,
// "'RMS Client [', NAVDeviceToString(data.device), '] Change Value: ', message.Parameter[4]")
// }
// case RMS_EVENT_ASSET_PARAM_VALUE: {
// NAVErrorLog(NAV_LOG_LEVEL_INFO,
// "'RMS Client [', NAVDeviceToString(data.device), '] Asset Parameter Value: '")
// NAVErrorLog(NAV_LOG_LEVEL_INFO,
// "'RMS Client [', NAVDeviceToString(data.device), '] Asset Client Key: ', message.Parameter[1]")
// NAVErrorLog(NAV_LOG_LEVEL_INFO,
// "'RMS Client [', NAVDeviceToString(data.device), '] Parameter Key: ', message.Parameter[2]")
// NAVErrorLog(NAV_LOG_LEVEL_INFO,
// "'RMS Client [', NAVDeviceToString(data.device), '] Parameter Name: ', message.Parameter[3]")
// NAVErrorLog(NAV_LOG_LEVEL_INFO,
// "'RMS Client [', NAVDeviceToString(data.device), '] Parameter Value: ', message.Parameter[4]")
// }
// case RMS_EVENT_ASSET_PARAM_RESET: {
// NAVErrorLog(NAV_LOG_LEVEL_INFO,
// "'RMS Client [', NAVDeviceToString(data.device), '] Asset Parameter Reset: '")
// NAVErrorLog(NAV_LOG_LEVEL_INFO,
// "'RMS Client [', NAVDeviceToString(data.device), '] Asset Client Key: ', message.Parameter[1]")
// NAVErrorLog(NAV_LOG_LEVEL_INFO,
// "'RMS Client [', NAVDeviceToString(data.device), '] Parameter Key: ', message.Parameter[2]")
// NAVErrorLog(NAV_LOG_LEVEL_INFO,
// "'RMS Client [', NAVDeviceToString(data.device), '] Parameter Name: ', message.Parameter[3]")
// NAVErrorLog(NAV_LOG_LEVEL_INFO,
// "'RMS Client [', NAVDeviceToString(data.device), '] Parameter Value: ', message.Parameter[4]")
// }
// Asset Control Methods Event Notifications
case RMS_EVENT_ASSET_METHOD_EXECUTE: {
stack_var _NAVRmsAssetMethodExecuteEvent event
event.AssetKey = message.Parameter[1]
event.Method = message.Parameter[2]
if (length_array(message.Parameter) > 2) {
NAVArraySliceString(message.Parameter, 3, length_array(message.Parameter), event.Parameter)
}
NAVRmsClientAssetMethodExecuteLog(event, data)
#IF_DEFINED USING_NAV_RMS_CLIENT_ASSET_METHOD_EXECUTE_EVENT_CALLBACK
NAVRmsClientAssetMethodExecuteEventCallback(rmsClient, event)
#END_IF
}
// Hotlist Event Notifications
case RMS_EVENT_HOTLIST_RECORD_COUNT: {
rmsClient.Hotlist.ClientDefaultLocation = NAVStringToBoolean(message.Parameter[1])
rmsClient.Hotlist.LocationId = atoi(message.Parameter[2])
rmsClient.Hotlist.Count = atoi(message.Parameter[3])
#IF_DEFINED USING_NAV_RMS_CLIENT_HOTLIST_COUNT_EVENT_CALLBACK
NAVRmsClientHotlistCountEventCallback(rmsClient, data)
#END_IF
NAVRmsHotlistLog(rmsClient.Hotlist, data)
}
// Messaging Event Notifications
case RMS_EVENT_DISPLAY_MESSAGE: {
rmsClient.Message.Type = message.Parameter[1]
rmsClient.Message.Title = message.Parameter[2]
rmsClient.Message.Body = message.Parameter[3]
rmsClient.Message.TimeOutSeconds = atoi(message.Parameter[4])
rmsClient.Message.Modal = NAVStringToBoolean(message.Parameter[5])
rmsClient.Message.ResponseMessage = message.Parameter[6]
#IF_DEFINED USING_NAV_RMS_CLIENT_MESSAGE_DISPLAY_EVENT_CALLBACK
NAVRmsClientMessageDisplayEventCallback(rmsClient, data)
#END_IF
NAVRmsMessageDisplayLog(rmsClient.Message, data)
}
}
}
}
button_event[vdvRMS, 0] {
push: {
#IF_DEFINED USING_NAV_RMS_ADAPTER_BUTTON_PUSH_EVENT_CALLBACK
NAVRmsAdapterButtonPushEventCallback(rmsClient, button)
#END_IF
}
release: {
#IF_DEFINED USING_NAV_RMS_ADAPTER_BUTTON_RELEASE_EVENT_CALLBACK
NAVRmsAdapterButtonReleaseEventCallback(rmsClient, button)
#END_IF
}
}
channel_event[vdvRMS, 0] {
on: {
#IF_DEFINED USING_NAV_RMS_ADAPTER_CHANNEL_ON_EVENT_CALLBACK
NAVRmsAdapterChannelOnEventCallback(rmsClient, channel)
#END_IF
}
off: {
#IF_DEFINED USING_NAV_RMS_ADAPTER_CHANNEL_OFF_EVENT_CALLBACK
NAVRmsAdapterChannelOffEventCallback(rmsClient, channel)
#END_IF
}
}
level_event[vdvRMS, 0] {
#IF_DEFINED USING_NAV_RMS_ADAPTER_LEVEL_EVENT_CALLBACK
NAVRmsAdapterLevelEventCallback(rmsClient, level)
#END_IF
}
#END_IF
#END_IF // __NAV_FOUNDATION_RMSEVENTS__