User Manual
Table Of Contents
- RK-5409-5 Reference Kit for 916 MHz MeshScape™ Systems
- 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
- Configuring Sample Interval of Single Node
- Configuring Sample Interval of all Network Nodes
- Configuring Digital I/O Operation
- Configuring UART Operation
- Configuring AD (analog-to-digital) Converter Operation
- Configuring RS-232 Operation (MN-5409 only)
- Configuring RS-485 Operation (MN-5409 only)
- Using Watch Function to Display Configuration Information
- 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: Sample Application
- B: Performing Firmware Upgrades and Configuring Device IDs
- Glossary
- Index
4-46 Millennial Net
Using the MeshScape API
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 mesh nodes.
*/
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 end nodes.
*/
printf("\r\nENDPOINTS\r\n");
deviceids_count = CheckResult(ibApi_GetDeviceList(api_hdl, groupid,
ibApi_DEVICETYPE_ENDPOINT, deviceids,DEVICEIDS_MAX));
if (deviceids_count > DEVICEIDS_MAX)
deviceids_count = DEVICEIDS_MAX;
for (i=0; i<deviceids_count; ++i) {