user_heartbeat_device

Verifies communication with a device for host redundancy support.

The device_struct and address_struct are initialized by the Toolkit to refer to a valid device and address in that device. Depending on your protocol requirements, you may be able to read the data to verify communications.

You can find the template for this subroutine in:

usrtm_hrtbt.c

Syntax

void user_heartbeat_device (DEVICE_DATA *device_struct,
                            ADDR_DATA *address_struct,
                            int length,
                            int *comm_status,
                            int *status);

Input Parameters

device_struct

Is a pointer to the structure defining device data. DEVICE_DATA is a typedef to a structure defined in < inc_path/toolkit.h > .

address_struct

Is a pointer to a valid point address for the device. ADDR_DATA is a typedef to a structure defined in < inc_path/toolkit.h > .

length

Contains the number of bytes of data which should be readable at the specified address.

Output Parameters

comm_status

Indicates whether a status of TOOLKIT_FAILURE occurred as a result of a communication failure. Valid values are:

TOOLKIT_SUCCESS Failure is not due to communications failure.
TOOLKIT_FAILURE Failure is due to communications failure.

status

Indicates whether the function successfully obtained all of the requested information. Valid values are:

TOOLKIT_SUCCESS Function completed successfully.
TOOLKIT_FAILURE Function did not complete successfully. Check comm_status to see if the failure was the result of a communication failure.

Return Value

None.