User Manual
Table Of Contents
- About This Guide
- Introduction
- Kit Installation
- iB-5209 Network Monitor Operations
- iB-5209 Network Monitor Overview
- Setting Thread Priority
- Configuring a Node’s Operation
- Using Watch function to display current I/O information
- 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 (RT-5209 only)
- Configuring RS-485 Operation (RT-5209 only)
- Labeling i-Bean Endpoint or i-Bean Router
- Creating an Event Log File
- Configure Persistence Attributes
- Configure Serial and ADC Data Formats
- Select Com Port on Host PC
- View Monitor Statistics
- View Contents of Event Log File
- Enable Multiple Capture
- API Functions
- Sample Application
A-22 EK-5209-5 Evaluation Kit User’s Guide
11. ibApi_IO_GetSerialBufferStatus()
ibApi_FUNC ibApi_IO_GetSerialBufferStatus (
ibApi_APIHANDLE api_hdl,
ibApi_DEVICEID device_id,
ibApi_IOMODE io_mode
);
For the given device, this function retrieves the status of the out going serial data buffer. The
return value gives the number of empty packet slots in the buffer. A negative return value
denotes an error and a zero return value means there is currently no out going empty packet
slots.
Parameters:
api_hdl: (input) API handle returned from ibApi_Open().
device_id: (input) ID of the device to be accessed.
io_mode: (input) Data direction to be accessed.
Return Value:
The empty out going packet slots if successful, or an error code (<0) if not.
12. ibApi_IO_WriteSerial()
ibApi_FUNC ibApi_IO_WriteSerial (
ibApi_APIHANDLE api_hdl,
ibApi_DEVICEID device_id,
ibApi_UINT8 buffer[],
ibApi_UINT8 buffer_size
);
This writes a user data packet to the specified device handle. The
ibApi_FIELDID_USERDATAMODE field must have been previously set to something other
than ibApi_USERDATAMODE_DISABLED. (Note that on some devices, this will disable other
peripherals, such as DIO.) The specific contents of the user data block and its maximum size
are application defined. The buffer_size variable determines the number of bytes sent (note
that NULL bytes receive no special interpretation.) To query the maximum payload size, call
ibApi_WriteSerialData() with buffer_size=0.
Parameters:
api_hdl: (input) API handle returned from ibApi_Open().
device_id: (input) ID of the device to be accessed.
buffer: (input) User data packet to transmit.
buffer_size: (input) Number of bytes in the user data packet.
Return Value:
The maximum buffer size if successful, or an error code (<0) if not.