Processes the received unsolicited data.
Syntax
int dcrp_rcv_unsolicited_data(device_id, addr_data,
sizeof_data, data_buffer, status)
char *device_id;
ADDR_DATA *addr_data;
int sizeof_data
char *data_buffer;
int *status;
Input Parameters
device_id
Contains the Device ID for the device originating the unsolicited data.
addr_data
Is a pointer to the address from which the data was read. ADDR_DATA is a typedef to a structure defined in <inc_path/toolkit.h>.
sizeof_data
Is the number of bytes of data being received.
data_buffer
Is the pointer to the buffer containing the unsolicited data.
For data from bit (TOOLKIT_BIT) domains, bit data should be packed into bytes so that the leftmost bit is the most significant.
For domains whose element size is greater than one byte, the bytes should be ordered in the same way as ordered by the underlying operating system on which the enabler is to run.
The caller is responsible for managing the data buffer (this might include allocating and de-allocating the space or using a static data structure to maintain the data).
The data buffer should not exceed TOOLKIT_MAX_INTERNAL_BUFFER bytes.
Output Parameters
status
Contains the function completion status. Valid values are:
TOOLKIT_SUCCESS |
Function completed successfully. |
TOOLKIT_FAILURE |
Function not completed. |
Return Value
This subroutine returns one of the following:
TOOLKIT_SUCCESS |
Function completed successfully. |
TOOLKIT_FAILURE |
Function not completed successfully. |
Device Communications Toolkit other subroutines. |