User Manual

Table Of Contents
A-8 EK-5209-5 Evaluation Kit User’s Guide
This struct is used by ibApi_FUNC ibApi_GetDeviceStatus() to report read-only
device properties that change with time.
Structure Fields:
struct_size The value size of (ibApi_DEVICESTATUS) should be assigned to this
field prior to calling ibApi_GetDeviceStatus(). This allows
future versions of the API to extend the struct without breaking binary
compatibility.
hop_count The hop count measures a device's topological distance from the
gateway. If the device talking directly to the gateway (i.e., no routers),
then the hop count is 1.
first_hop_router These fields store the device ID of the first and last router that the
device's packets passed through on their way to the gateway. If the
hop count is 1, then these fields are NULL.
last_hop_router These fields store the device ID of the first and last router that the
device's packets passed through on their way to the gateway. If the
hop count is 1, then these fields are NULL.
battery_level This reports the device battery level measured in volts. The precision is
device dependent and typically nonlinear. If battery information is
unavailable, the value is 0.
state The device state. See ibApi_DEVICESTATE documentation for details.
group_id This reports the group ID currently assigned to the device.
11. ibApi_DEVICEEVENTTYPE
enum ibApi_DEVICEEVENTTYPE_e {
ibApi_DEVICEEVENTTYPE_ALL = 0xffffffff
};
typedef enum ibApi_DEVICEEVENTTYPE_e
ibApi_DEVICEEVENTTYPE;
In a future release, it will be possible to filter the events reported by
ibApi_WaitForDeviceEvent() using a bitwise “OR” of the event types defined in this
enum. For the current release, the parameter should always be
ibApi_DEVICEEVENTTYPE_ALL.
12. ibApi_VERSION
typedef ibApi_UINT32 ibApi_VERSION;
#define ibApi_MAKE_VERSION(MAJOR,MINOR,RELEASE)
((ibApi_VERSION)((MAJOR<<16)|(MINOR<<8)|RELEASE))
#define ibApi_GET_VERSION_MAJOR(VER) ((VER>>16) & 0xff)
#define ibApi_GET_VERSION_MINOR(VER) ((VER>>8) & 0xff)
#define ibApi_GET_VERSION_RELEASE(VER) (VER & 0xff)