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-34 Millennial Net
Using the MeshScape API
14. ibApi_IO_ReadSerial()
ibApi_FUNC ibApi_IO_ReadSerial (
ibApi_APIHANDLE api_hdl,
ibApi_DEVICEID device_id,
ibApi_UINT8 buffer[],
ibApi_UINT16 buffer_size,
ibApi_UINT8 *seq_num
);
For the given device, this retrieves the user data packet that arrived most recently. The
ibApi_IO_SERIALMODE setting must have been previously something other than
ibApi_IO_SERIALMODE_DISABLED. The input buffer holds a single packet (i.e., an
arriving packet overwrites the previous one). Lost packets can be detected by gaps in the
sequence numbers, which increment whenever a packet is received. If no new data is
available, then the return value is 0.
Parameters:
api_hdl: (input) API handle returned from ibApi_Open().
device_id: (input) ID of the device to be accessed.
buffer[ ]: (output) Buffer to store the incoming user data packet.
buffer_size: (input) Maximum size for buffer[ ].
seq_num: (output) Pointer to sequence number identifying this packet, or NULL if this
information is not needed.
Return Value:
Error code or the actual size of the result (which could exceed buffer_size if the written data
was truncated)
15. ibApi_IO_SetDeviceConfigAndData()
ibApi_FUNC ibApi_IO_SetDeviceConfigAndData(
ibApi_APIHANDLE api_hdl,
ibApi_DEVICEID device_id,
ibApi_deviceSetConfigAndData *config_data
);
This function is used to make several configuration and data requests to a device at one
time.
Parameters:
api_hdl: (input) API handle returned from @link ibApi_Open()
device_id: (input) the ID of the device to be accessed
config_data: (input) User requested configuration.