RSF-1 C/C++ API  v3.9.7
RSF-1 API Reference
 All Data Structures Functions Enumerations Enumerator Pages
Main Page

Introduction

This API (Application Programming Interface) document contains pages corresponding to the item in the navigation bar and the side-bar. It is highly recommended that this page and the others listed in the Related Pages section are read before using the API.

Reading data from RSF

Many of the commands in the API read data from a node running RSF. In order to read data the API uses the rsf1::rsf.readrsf() command in order to read data from a node and the rsf1::rsf.setip() command to determine which node to read data from. The API will attempt to read from the localhost "127.0.0.1" by default. If you want to change the IP that should be used to read data call either readrsf() or setip() with the IP given as an argument. All future read requests will use this IP to read data from until readrsf() or setip() are called with a different IP.

In order to ensure these commands execute efficiently and are resilient to common errors the API supports the following features:

Retries

The retry count is the number of retries you want the API commands to perform when sending commands. Retries will occur when RSF-1 is busy handling another command that has been sent within the same poll period or if RSF-1 has failed to respond within the defined time-frame (if a network communications issue has occurred for example).

Expiration

The returned information from the read methods will be up to date only up to poll period, which means calling a read method immediately after sending a command may give unexpected results.

Threading

Commands such as move_service() or some commands that send signals to the RSF PID can run in a separate thread as these commands can take some time to complete or need to allow time to ensure signals are send and recieved correctly. Any command that reads from RSF is thread safe. Caution must be used in using multiple threads which call the remaining methods, (which are not already thread safe since it would not be natural to use these methods in multiple threads).

RSF-1 API Reference Guide