User Manual

Table Of Contents
RK-5409-5 Reference Kit User’s Guide 4-9
iBeanAPI.h
8. ibApi_DEVICEINFO
#define ibApi_MAX_VERSION_STRLEN 32
struct ibApi_DEVICEINFO_s {
ibApi_UINT16 struct_size;
ibApi_DEVICETYPE device_type;
ibApi_CHAR hardware_version[ibApi_MAX_VERSION_STRLEN];
ibApi_CHAR firmware_version[ibApi_MAX_VERSION_STRLEN];
};
typedef struct ibApi_DEVICEINFO_s ibApi_DEVICEINFO;
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 (end node, mesh node, 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_OFFLINE,
ibApi_DEVICESTATE_ONLINE,
ibApi_DEVICESTATE_REFRESHING,
};
typedef ibApi_UINT16 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.