User's Manual

Table Of Contents
RK-5424-5 Reference Kit User’s Guide 4-11
iBeanAPI.h
11. ibApi_EVENTMASK
typedef ibApi_UINT32 ibApi_EVENTMASK;
#define ibApi_MAX_SERIAL_DATA_SIZE 255
#define ibApi_MAX_ADC_DATA_CHANNELS 4
#define ibApi_MAX_DIO_DATA_CHANNELS 4
#define ibApi_UNDEFINED_FIELD_VALUE 0xFF
#define ibApi_Serial_Receive_EVENT_DATA_TYPE 0x11
#define ibApi_ADC_EVENT_DATA_TYPE 0x22
#define ibApi_DIO_EVENT_DATA_TYPE 0x33
#define ibApi_Device_State_EVENT_DATA_TYPE 0x44
#define ibApi_Sampling_Interval_EVENT_DATA_TYPE 0x55
#define ibApi_Battery_Level_EVENT_DATA_TYPE 0x66
#define ibApi_Network_EVENT_DATA_TYPE 0x77
#define ibApi_Heartbeat_EVENT_DATA_TYPE 0x88
Use this structure to identify events passed to event callbacks.
12. ibApi_CALLBACK_DATA
typedef ibApi_UINT8 ibApi_CALLBACK_DATA;
ibApi_CALLBACK_DATA is a pointer which must be cast to one of the data types that are
described in the following sections.
13. ibApi_ADC_EVENT_DATA
typedef struct {
ibApi_UINT8 dataType; // Must be first!
ibApi_UINT8 status; // 1=enabled, 0=disabled, 0xFF=undefined
ibApi_DEVICEID deviceID;
ibApi_UINT8 channelMask; // 0 = no data
ibApi_UINT8 reserved; // for alignment
ibApi_FLOAT channelData[8];
}
This data structure will be passed to event callbacks to convey information about ADC
events.
Use the first argument ibApi_EVENTMASK to determine how to cast the callback data.