User's Manual

Table Of Contents
RK-5424-5 Reference Kit User’s Guide 4-23
iBeanAPI.h
15. ibApi_RegisterEvent()
ibApi_RegisterEvent(
ibApi_APIHANDLE api_hdl,
ibApi_CALLBACK_FUNCTIONapi_callback
);
Registers a callback function to be called upon receipt of the specified asynchronous event.
See “Notes on Event Notification abd Event Masks” on page 4-20.
A pointer to a function which implements this type must be passed to ibApi_RegisterEvent( ).
Each event processed will result in a call to this callback. The event mask will contain a single
event indicator (ibApi_DEVICEEVENTTYPE). Use the indicator to determine how to cast
ibApi_CALLBACK_DATA*.
@param ibApi_EVENTMASK (input) event mask, set to only one event type
@param ibApi_CALLBACK_DATA* (input) event data
typedef void (*ibApi_CALLBACK_FUNCTION)(ibApi_EVENTMASK, ibApi_CALLBACK_DATA *);
Parameters:
api_hdl: (input) API handle returned from @link ibApi_Open().
api_callback: (input) Callback function to register for asynchronous events as defined by
prior call to ibApi_SetEventMask().
Return Value:
An ibApi_RESULT_SUCCESS if successful or an error code (<0) if unsuccessful.
16. ibApi_GetDevicePacketSequenceNumber()
ibApi_FUNC ibApi_GetDevicePacketSequenceNumber(
ibApi_APIHANDLE api_hdl,
ibApi_DEVICEID device_id
);
This function Gets a device packet sequence number that is carried by a upstream packet
sent from the device.
Parameters:
api_hdl: (input) API handle returned from ibApi_Open().
device_id: (input) The device id.
Return Value:
A 0 - 255 sequence number if successful, or an error code (<0) if failed.