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-43
Example API Code
ListDevicesVC7 Code
The C file containing the code shown here can be found in the Programs directory:
Programs\MeshScape\examples\src\ListDevices
/*
* ListDevices.c
*
* Copyright (c) 2000-2005 Millennial Net, Inc. All Rights Reserved.
* Reproduction or modification is strictly prohibited without express
* written consent of Millennial Net.
*
* This example illustrates the basic operations of connecting to the i-Bean
* API and obtaining basic information about the devices in the network.
* It prints out the list of gateways, mesh nodes, and end nodes currently
* participating in the network, along with some information about each
* device.
*
* This project was built using Microsoft Visual C++ version 7.1, but should
* be compatible with other similar compiler versions.
*/
#include <iBeanAPI.h>
#include <iBeanAPI_IO.h>
#include <iBeanAPI_Utils.h>
#include <stdio.h>
#include <stdlib.h>
#ifndef __GNUC__
#include <conio.h>
#else
#include <mingw/conio.h>
/* #include <mingw/conio.h> */
#endif
/*
* This is the number of "words" in a network address. For example, the
* address "127.0.1" contains three words. The i-Bean protocol supports
* up to 8 words (64-bits), but the actual maximum is reduced in some
* product releases to optimize the packet size.
*/
#define MIN_DEVICEID_WORDS 3