User Manual

Table Of Contents
4-34 Millennial Net
Using the MeshScape API
5. ibApi_Utils_ConvertTextToDeviceId()
ibApi_FUNC ibApi_Utils_ConvertTextToDeviceId(
ibApi_CONST ibApi_CHAR *device_id_text,
ibApi_DEVICEID * device_id
);
This function parses a text string such as “1.2.3.4.5.6.7.8” and stores the result in the
device_id structure. If fewer than 8 digit groups are provided, the result is left-padded with
0’s.
Parameters:
device_id_text: (input) Buffer to be parsed.
device_id: (output) Structure to store the result.
Return Value:
ibApi_RESULT_SUCCESS if successful, error code (<0) if not.
6. ibApi_Utils_ConvertBatteryReadingToVoltage()
ibApi_FUNC ibApi_Utils_ConvertBatteryReadingToVoltage(
ibApi_DEVICEINFO info,
ibApi_UINT16 blRaw,
ibApi_FLOAT *blFloat
);
This function converts a device’s battery level reading from raw data to voltage.
Parameters:
info: (input) Device information.
blRaw: (input) Battery level reading in raw data.
blFloat: (output) Structure to store the battery level reading as a voltage.
Return Value:
ibApi_RESULT_SUCCESS if successful, error code (<0) if not.