User's Manual
Table Of Contents
- MeshScape™ RK-5424-5 Reference Kit for 2.4 GHz MeshScape Systems User's Guide
- Contents
- About This Guide
- 1: Introduction
- 2: Installing the MeshScape System
- 3: Running MeshScape Network Monitor
- MeshScape Network Monitor Overview
- Configuring a Node’s Operation
- Labeling an End Node or Mesh Node
- Configuring Persistence Attributes
- Selecting a Com Port on the Host PC
- Configuring Serial and ADC Data Formats
- Turning Event Tracking On/Off
- Broadcasting Data to All Nodes.
- Creating an Event Log File
- Viewing the Contents of an Event Log File
- Viewing MeshScape Statistics
- 4: Using the MeshScape API
- A: Running the Demo Application
- B: Using MeshScape Programmer
- Glossary
- Index
4-48 Millennial Net
Using the MeshScape API
* ibApi_GetDeviceInfo(). This allows compatibility with future API
* versions that implement additional fields.
*/
deviceinfo.struct_size = sizeof(deviceinfo);
CheckResult(ibApi_GetDeviceInfo(api_hdl,deviceids[i],&deviceinfo));
CheckResult(ibApi_Utils_ConvertDeviceIdToText(deviceids[i],
deviceid_text,sizeof(deviceid_text),MIN_DEVICEID_WORDS));
printf(" %10s fw=\"%s\" hw=\"%s\"\r\n", deviceid_text,
deviceinfo.firmware_version,deviceinfo.hardware_version);
}
/*
* List the routers.
*/
printf("\r\nROUTERS\r\n");
deviceids_count = CheckResult(ibApi_GetDeviceList(api_hdl, groupid,
ibApi_DEVICETYPE_ROUTER|ibApi_DEVICETYPE_ROUTERBEAN, deviceids,DEVICEIDS_MAX));
if (deviceids_count > DEVICEIDS_MAX)
deviceids_count = DEVICEIDS_MAX;
for (i=0; i<deviceids_count; ++i) {
/*
* Note that the struct_size must be assigned BEFORE calling
* ibApi_GetDeviceStatus().
*/
devicestatus.struct_size = sizeof(devicestatus);
CheckResult(ibApi_GetDeviceStatus(api_hdl,deviceids[i],&devicestatus));
CheckResult(ibApi_Utils_ConvertDeviceIdToText(deviceids[i],
deviceid_text,sizeof(deviceid_text),MIN_DEVICEID_WORDS));
printf(" %10s (%i hops)\r\n", deviceid_text, devicestatus.hop_count);
}
/*
* List the endpoints.
*/
printf("\r\nENDPOINTS\r\n");
deviceids_count = CheckResult(ibApi_GetDeviceList(api_hdl, groupid,
ibApi_DEVICETYPE_ENDPOINT, deviceids,DEVICEIDS_MAX));