dnsDeviceProbe, dnsDeviceProbeSync

dnsDeviceProbe, dnsDeviceProbeSync — probe DeviceNet devices for configuration information.

Synopsis

(dnsDeviceProbe card_id [device [last_device]])
(dnsDeviceProbeSync card_id [device [last_device]])
	

Parameters

card_id
The target card ID (0..3).
device
(Optional) The MAC ID (0..63) of the first, or only, target device to probe. If not specified, then all 64 devices are probed.
last_device
(Optional) The MAC ID (0..63) of the last device to be probed. If not specified, then only the single specified device is probed.

Returns

If successful:

(dnsDeviceProbe card_id device_datai...)

where device_datai provides the data for the i'th device, formatted as follows:

(MAC_ID Output output_size Input input_size connection_flags)

Otherwise, one of the following error messages:

(error "dnsDeviceProbe DR_ERR_CARD_INVALID (time) invalid card: card_id")
(error "dnsDeviceProbe DR_ERR_NO_CARD (time) card not available")
(error "dnsDeviceProbeSync DVN_ERR_MSG_ILOCK (time) Device card_id:device
       msg interlock unavailable")
(error "dnsDeviceProbeSync DVN_ERR_MSG_TIMEOUT (time) Device card_id:device msg timeout")
(error "dnsDeviceProbeSync DVN_ERR_MSG_INTR (time) Device card_id:device msg SIGINTR")
(error "dnsDeviceProbeSync DVN_ERR_MSG_NOT_RCVD (time) Device card_id:device no msg received")
(error "dnsDeviceProbeSync DVN_ERR_MSG_CONNECTION (time) Device card_id:device
       Failed to open explicit connection")
(error "dnsDeviceProbeSync DVN_ERR_MSG_INTERNAL (time) Device card_id:device
       Internal msg error: Service service Errorcode error_code")
(error "dnsDeviceProbeSync DVN_ERR_MSG_DEVICE (time) Device card_id:device
       Device msg error: Service service Errorcode error_code")
(error "dnsDeviceProbe DVN_ERR_CMD_TIMEOUT (time) Cmd failed (timeout)")

Description

These commands query the DeviceNet device(s) for configuration information. If a device is not present, then it will not report any information.

Since this process can take some time, and since in most cases the potential impact of the delay on normal I/O processing would not be acceptable, the dnsDeviceProbe command will suspend the client and continue to process all commands from other clients and card events until the probing is complete.

The dnsDeviceProbeSync form of the command will force the driver to ignore other commands or events until all the specified devices have been probed, and is suitable for use in the configuration file to initialize the driver (before the driver enters the event loop).

Example

(dnsDeviceProbeSync 0 1 4)
  

returns:

(dnsDeviceProbeSync 0 (2 Output 6 Input 7 CONN_FLAG_P))

indicating that devices with MAC ID 1, 3, and 4 are not present.