DEVICE_COMMUNICATING, DATA_INITIALIZED Confusion
NZRob
Posts: 70
Hi Guys,
I am a bit confused about these 2 channels - I am sure this has come up but typing these into the search brings up almost every post. If there is somewhere this is discussed somewhere - feel free to point me at it.
Standard SNAPI help in the Module Listener section
Channel 252 - DATA_INITIALIZED
Feedback Channel: Module data is synchronized with device while channel is on
Channel 251 - DEVICE_COMMUNICATING
Feedback Channel: Communication is established with device while channel is on
My interpretation of these 2 channels is:
Data_Initialized - After first connecting the module to device - info is pasted back/forward and when both are synced
then this channel is turned ON - turned OFF when one of the following happens: REINIT/reboot(or reload which reboots). This being clear by the 'ed' on the end - so it was initialized so now on.
Device_Communicating - When the device replies to a send string then this channel is set to ON. If no response after x time then turn OFF(simplistic description - I send the command 3 times then flag and try next command - if 3 commands fail then delay and REINIT). So if the device is talking back then this is communicating and when stops responding then set off.
Thought this was sorted until I come to RMS. I am using 3.3.33 - this may have been fixed in Enterprise but not sure.
RMSCommon.axi Line 175
// Duet Device Feedback Channel:
// Communication is established with device and device is initialized while channel is on
RMS_DUET_CH_DATA_INITIALIZED = 252 (* - added in v3.3 to support Duet VDV API *)
RMSModuleBase.ini Line 705
(*******************************************)
(* Channel: Duet virtual device *)
(* Duet Device Feedback Channel *)
(* Communication is established *)
(* with device and device is *)
(* initialized while channel is *)
(* on. (CH.252) *)
(* - added in v3.3 to support Duet VDV API *)
(*******************************************)
CHANNEL_EVENT[vdvDeviceModule,RMS_DUET_CH_DATA_INITIALIZED] // CH.252
{
ON:
{
// the Duet device is communicating
CANCEL_WAIT 'RMSCommTo'
RMSDeviceSetCommStatus(TRUE)
}
OFF:
{
// the Duet device is not communicating
// If not ignoring comms, set the communicating parameter to 'False'
IF (!bRMSIgnoreComms)
{
CANCEL_WAIT 'RMSCommTo'
RMSDeviceSetCommStatus(FALSE)
}
}
}
So Device online/offline in RMS 3.3 tracks Data_Initialized and not communicating. I had a device die and RMS tracked it as fine. This would imply that according RMS, I should be using Initialized to track if online/offline.
I can program to track if using RMS 3.3 and change this channel functions but thought I would ask first.
Any help in clarifying this for me?
Cheers Rob
I am a bit confused about these 2 channels - I am sure this has come up but typing these into the search brings up almost every post. If there is somewhere this is discussed somewhere - feel free to point me at it.
Standard SNAPI help in the Module Listener section
Channel 252 - DATA_INITIALIZED
Feedback Channel: Module data is synchronized with device while channel is on
Channel 251 - DEVICE_COMMUNICATING
Feedback Channel: Communication is established with device while channel is on
My interpretation of these 2 channels is:
Data_Initialized - After first connecting the module to device - info is pasted back/forward and when both are synced
then this channel is turned ON - turned OFF when one of the following happens: REINIT/reboot(or reload which reboots). This being clear by the 'ed' on the end - so it was initialized so now on.
Device_Communicating - When the device replies to a send string then this channel is set to ON. If no response after x time then turn OFF(simplistic description - I send the command 3 times then flag and try next command - if 3 commands fail then delay and REINIT). So if the device is talking back then this is communicating and when stops responding then set off.
Thought this was sorted until I come to RMS. I am using 3.3.33 - this may have been fixed in Enterprise but not sure.
RMSCommon.axi Line 175
// Duet Device Feedback Channel:
// Communication is established with device and device is initialized while channel is on
RMS_DUET_CH_DATA_INITIALIZED = 252 (* - added in v3.3 to support Duet VDV API *)
RMSModuleBase.ini Line 705
(*******************************************)
(* Channel: Duet virtual device *)
(* Duet Device Feedback Channel *)
(* Communication is established *)
(* with device and device is *)
(* initialized while channel is *)
(* on. (CH.252) *)
(* - added in v3.3 to support Duet VDV API *)
(*******************************************)
CHANNEL_EVENT[vdvDeviceModule,RMS_DUET_CH_DATA_INITIALIZED] // CH.252
{
ON:
{
// the Duet device is communicating
CANCEL_WAIT 'RMSCommTo'
RMSDeviceSetCommStatus(TRUE)
}
OFF:
{
// the Duet device is not communicating
// If not ignoring comms, set the communicating parameter to 'False'
IF (!bRMSIgnoreComms)
{
CANCEL_WAIT 'RMSCommTo'
RMSDeviceSetCommStatus(FALSE)
}
}
}
So Device online/offline in RMS 3.3 tracks Data_Initialized and not communicating. I had a device die and RMS tracked it as fine. This would imply that according RMS, I should be using Initialized to track if online/offline.
I can program to track if using RMS 3.3 and change this channel functions but thought I would ask first.
Any help in clarifying this for me?
Cheers Rob
0
Comments