libRBR
v1.2.3
RBR instrument communication API
|
Instrument commands and structures pertaining to the communication interfaces of the instrument. More...
Go to the source code of this file.
Data Structures | |
struct | RBRInstrumentSerial |
Instrument serial command parameters. More... | |
struct | RBRInstrumentWiFi |
Instrument wifi command parameters. More... | |
Typedefs | |
typedef enum RBRInstrumentLink | RBRInstrumentLink |
Instrument link types. More... | |
typedef enum RBRInstrumentSerialBaudRate | RBRInstrumentSerialBaudRate |
Instrument serial baud rates. More... | |
typedef enum RBRInstrumentSerialMode | RBRInstrumentSerialMode |
Instrument serial modes. More... | |
typedef struct RBRInstrumentSerial | RBRInstrumentSerial |
Instrument serial command parameters. More... | |
typedef enum RBRInstrumentWiFiState | RBRInstrumentWiFiState |
The state of the Wi-Fi connection. More... | |
typedef struct RBRInstrumentWiFi | RBRInstrumentWiFi |
Instrument wifi command parameters. More... | |
Functions | |
const char * | RBRInstrumentLink_name (RBRInstrumentLink link) |
Get a human-readable string name for a communication link. More... | |
RBRInstrumentError | RBRInstrument_getLink (RBRInstrument *instrument, RBRInstrumentLink *link) |
Get the type of connectivity for the instrument connection. More... | |
const char * | RBRInstrumentSerialBaudRate_name (RBRInstrumentSerialBaudRate baud) |
Get a human-readable string name for a baud rate. More... | |
const char * | RBRInstrumentSerialMode_name (RBRInstrumentSerialMode mode) |
Get a human-readable string name for a serial mode. More... | |
RBRInstrumentError | RBRInstrument_getSerial (RBRInstrument *instrument, RBRInstrumentSerial *serial) |
Retrieve the current and available serial baud rates and modes. More... | |
RBRInstrumentError | RBRInstrument_setSerial (RBRInstrument *instrument, const RBRInstrumentSerial *serial) |
Reconfigure the instrument serial baud rate and mode. More... | |
RBRInstrumentError | RBRInstrument_sleep (RBRInstrument *instrument) |
Immediately shut down communications and implement any possible power-saving measures. More... | |
const char * | RBRInstrumentWiFiState_name (RBRInstrumentWiFiState state) |
Get a human-readable string name for a Wi-Fi connection state. More... | |
RBRInstrumentError | RBRInstrument_getWiFi (RBRInstrument *instrument, RBRInstrumentWiFi *wifi) |
Retrieve the current instrument Wi-Fi settings. More... | |
RBRInstrumentError | RBRInstrument_setWiFi (RBRInstrument *instrument, const RBRInstrumentWiFi *wifi) |
Reconfigure the instrument Wi-Fi settings. More... | |
Instrument commands and structures pertaining to the communication interfaces of the instrument.
typedef enum RBRInstrumentLink RBRInstrumentLink |
Instrument link types.
typedef struct RBRInstrumentSerial RBRInstrumentSerial |
Instrument serial
command parameters.
typedef enum RBRInstrumentSerialBaudRate RBRInstrumentSerialBaudRate |
Instrument serial baud rates.
Most of these baud rates are unsupported by the instrument, but are included for sake of completeness. Call RBRInstrument_getBaudRates() to determine which rates are supported by a given instrument.
typedef enum RBRInstrumentSerialMode RBRInstrumentSerialMode |
Instrument serial modes.
All modes are 8N1, use no flow control, and are full-duplex unless otherwise noted.
typedef struct RBRInstrumentWiFi RBRInstrumentWiFi |
Instrument wifi
command parameters.
typedef enum RBRInstrumentWiFiState RBRInstrumentWiFiState |
The state of the Wi-Fi connection.
enum RBRInstrumentLink |
Instrument link types.
Instrument serial baud rates.
Most of these baud rates are unsupported by the instrument, but are included for sake of completeness. Call RBRInstrument_getBaudRates() to determine which rates are supported by a given instrument.
Instrument serial modes.
All modes are 8N1, use no flow control, and are full-duplex unless otherwise noted.
The state of the Wi-Fi connection.
RBRInstrumentError RBRInstrument_getLink | ( | RBRInstrument * | instrument, |
RBRInstrumentLink * | link | ||
) |
Get the type of connectivity for the instrument connection.
[in] | instrument | the instrument connection |
[out] | link | the link type |
RBRInstrumentError RBRInstrument_getSerial | ( | RBRInstrument * | instrument, |
RBRInstrumentSerial * | serial | ||
) |
Retrieve the current and available serial baud rates and modes.
[in] | instrument | the instrument connection |
[out] | serial | the current and available serial parameters |
RBRInstrumentError RBRInstrument_getWiFi | ( | RBRInstrument * | instrument, |
RBRInstrumentWiFi * | wifi | ||
) |
Retrieve the current instrument Wi-Fi settings.
[in] | instrument | the instrument connection |
[out] | wifi | the current Wi-Fi parameters |
RBRInstrumentError RBRInstrument_setSerial | ( | RBRInstrument * | instrument, |
const RBRInstrumentSerial * | serial | ||
) |
Reconfigure the instrument serial baud rate and mode.
A hardware error will occur if the baud rate or mode is unsupported by the instrument. See RBRInstrumentSerial.availableBaudRates and RBRInstrumentSerial.availableSerialModes to determine supported rates/modes.
The new serial mode and/or baud rate will take effect immediately after the response to this command has been produced. Make sure you alter the configuration of your connection to the instrument correspondingly.
[in] | instrument | the instrument connection |
[in] | serial | the new serial parameters |
RBRInstrumentError RBRInstrument_setWiFi | ( | RBRInstrument * | instrument, |
const RBRInstrumentWiFi * | wifi | ||
) |
Reconfigure the instrument Wi-Fi settings.
For Logger3 instruments, this sends the values of RBRInstrumentWiFi.enabled, RBRInstrumentWiFi.powerTimeout, and RBRInstrumentWiFi.commandTimeout. For Logger2 instruments, this sends only the values of RBRInstrumentWiFi.powerTimeout and RBRInstrumentWiFi.commandTimeout as the RBRInstrumentWiFi.enabled parameter does not exist for that generation of instruments.
[in] | instrument | the instrument connection |
[out] | wifi | the new Wi-Fi parameters |
RBRInstrumentError RBRInstrument_sleep | ( | RBRInstrument * | instrument | ) |
Immediately shut down communications and implement any possible power-saving measures.
[in] | instrument | the instrument connection |
const char* RBRInstrumentLink_name | ( | RBRInstrumentLink | link | ) |
Get a human-readable string name for a communication link.
[in] | link | the communication link |
const char* RBRInstrumentSerialBaudRate_name | ( | RBRInstrumentSerialBaudRate | baud | ) |
Get a human-readable string name for a baud rate.
[in] | baud | the baud rate |
const char* RBRInstrumentSerialMode_name | ( | RBRInstrumentSerialMode | mode | ) |
Get a human-readable string name for a serial mode.
[in] | mode | the serial mode |
const char* RBRInstrumentWiFiState_name | ( | RBRInstrumentWiFiState | state | ) |
Get a human-readable string name for a Wi-Fi connection state.
[in] | state | the Wi-Fi connection state |