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
RK-5409-5 Reference Kit User’s Guide 4-47
Example API Code
CheckResult(ibApi_Utils_ConvertDeviceIdToText(deviceids[i],
deviceid_text,sizeof(deviceid_text),MIN_DEVICEID_WORDS));
sampling_interval = CheckResult(ibApi_GetSamplingInterval(api_hdl,deviceids[i]));
printf(" %10s (%i ms)\r\n", deviceid_text, sampling_interval);
}
}
/***************************************************************************/
int main() {
/*
* This handle represents the current API session.
*/
ibApi_APIHANDLE api_hdl;
ibApi_VERSION api_version;
api_version = ibApi_GetApiVersion();
printf("\r\nInitializing API Version %i.%i.%i\r\n\r\n",
ibApi_GET_VERSION_MAJOR(api_version),
ibApi_GET_VERSION_MINOR(api_version),
ibApi_GET_VERSION_RELEASE(api_version)
);
/*
* ibApi_Open() is called to begin the session. Your application
* should ensure that ibApi_Close() is called to release the handle
* before exiting.
*/
api_hdl = CheckResult(ibApi_Open(ibApi_EXPECTED_VERSION,"local",""));
ListDevices(api_hdl);
CheckResult(ibApi_Close(api_hdl));
WaitForKey();
return 0;
}