User Manual

Table Of Contents
EK-5209-5 Evaluation Kit User’s Guide A-7
iBeanAPI.h
This data structure is used by ibApi_GetDeviceInfo() to report static device attributes
that are fixed at manufacturing time.
Structure Fields:
struct_size The value sizeof (ibApi_DEVICEINFO) should be assigned to this
field prior to calling ibApi_GetDeviceInfo(). This allows future
versions of the API to extend the struct without breaking binary
compatibility.
device_type The type of the device (endpoint, router, etc.).
hardware_version These two fields report the firmware and hardware version strings for
firmware_version various network devices, which are useful for diagnostic purposes. An
empty string may be assigned if the device does not support version
reporting.
9. ibApi_DEVICESTATE
enum ibApi_DEVICESTATE_e {
ibApi_DEVICESTATE_ONLINE,
ibApi_DEVICESTATE_OFFLINE,
ibApi_DEVICESTATE_CONNECTING,
ibApi_DEVICESTATE_REFRESHING,
ibApi_DEVICESTATE_LATE
};
typedef enum ibApi_DEVICESTATE_e ibApi_DEVICESTATE;
These functions are used with ibApi_GetDeviceState(). When a command is issued
to modify a network device, a series of network communications must occur before the
change will take effect. During this time period the said to be “refreshing”, and the actual
device state may be different from values visible to the API. The refresh time depends on
many factors such as sampling interval, traffic level, network topology, etc.
10. ibApi_DEVICESTATUS
struct ibApi_DEVICESTATUS_s {
ibApi_UINT32 struct_size;
ibApi_UINT16 hop_count;
ibApi_DEVICEID first_hop_router;
ibApi_DEVICEID last_hop_router;
ibApi_FLOAT battery_level;
ibApi_DEVICESTATE state;
ibApi_GROUPID group_id;
};
typedef struct ibApi_DEVICESTATUS_s ibApi_DEVICESTATUS;