libRBR  v1.2.3
RBR instrument communication API
RBRInstrumentCommunication.h
Go to the documentation of this file.
1 
14 #ifndef LIBRBR_RBRINSTRUMENTCOMMUNICATION_H
15 #define LIBRBR_RBRINSTRUMENTCOMMUNICATION_H
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
27 typedef enum RBRInstrumentLink
28 {
40 
49 
61  RBRInstrument *instrument,
62  RBRInstrumentLink *link);
63 
77 {
111 
120 
133 {
149 
158 
166 typedef struct RBRInstrumentSerial
167 {
201 
214  RBRInstrumentSerial *serial);
215 
239  const RBRInstrumentSerial *serial);
240 
251 
258 {
270 
279 
287 typedef struct RBRInstrumentWiFi
288 {
294  bool enabled;
310  int32_t powerTimeout;
318  int32_t commandTimeout;
329 
343  RBRInstrumentWiFi *wifi);
344 
367  const RBRInstrumentWiFi *wifi);
368 
369 #ifdef __cplusplus
370 }
371 #endif
372 
373 #endif /* LIBRBR_RBRINSTRUMENTCOMMUNICATION_H */
RBRINSTRUMENT_SERIAL_BAUD_1200
@ RBRINSTRUMENT_SERIAL_BAUD_1200
Definition: RBRInstrumentCommunication.h:85
RBRInstrumentWiFi
Instrument wifi command parameters.
Definition: RBRInstrumentCommunication.h:287
RBRInstrumentWiFiState
RBRInstrumentWiFiState
The state of the Wi-Fi connection.
Definition: RBRInstrumentCommunication.h:257
RBRINSTRUMENT_SERIAL_BAUD_19200
@ RBRINSTRUMENT_SERIAL_BAUD_19200
Definition: RBRInstrumentCommunication.h:93
RBRINSTRUMENT_WIFI_OFF
@ RBRINSTRUMENT_WIFI_OFF
The Wi-Fi radio is powered down.
Definition: RBRInstrumentCommunication.h:264
RBRInstrumentSerialBaudRate
RBRInstrumentSerialBaudRate
Instrument serial baud rates.
Definition: RBRInstrumentCommunication.h:76
RBRInstrument_getSerial
RBRInstrumentError RBRInstrument_getSerial(RBRInstrument *instrument, RBRInstrumentSerial *serial)
Retrieve the current and available serial baud rates and modes.
RBRInstrument_setWiFi
RBRInstrumentError RBRInstrument_setWiFi(RBRInstrument *instrument, const RBRInstrumentWiFi *wifi)
Reconfigure the instrument Wi-Fi settings.
RBRINSTRUMENT_SERIAL_BAUD_2400
@ RBRINSTRUMENT_SERIAL_BAUD_2400
Definition: RBRInstrumentCommunication.h:87
RBRINSTRUMENT_WIFI_NA
@ RBRINSTRUMENT_WIFI_NA
The Wi-Fi connection is disabled.
Definition: RBRInstrumentCommunication.h:260
RBRINSTRUMENT_SERIAL_MODE_RS485H
@ RBRINSTRUMENT_SERIAL_MODE_RS485H
Definition: RBRInstrumentCommunication.h:141
RBRINSTRUMENT_SERIAL_BAUD_230400
@ RBRINSTRUMENT_SERIAL_BAUD_230400
Definition: RBRInstrumentCommunication.h:103
RBRINSTRUMENT_SERIAL_BAUD_921600
@ RBRINSTRUMENT_SERIAL_BAUD_921600
Definition: RBRInstrumentCommunication.h:107
RBRInstrumentWiFi
struct RBRInstrumentWiFi RBRInstrumentWiFi
Instrument wifi command parameters.
RBRInstrumentWiFi::baudRate
const RBRInstrumentSerialBaudRate baudRate
The speed of the internal connection between the instrument's CPU and the Wi-Fi radio.
Definition: RBRInstrumentCommunication.h:327
RBRInstrument_getLink
RBRInstrumentError RBRInstrument_getLink(RBRInstrument *instrument, RBRInstrumentLink *link)
Get the type of connectivity for the instrument connection.
RBRInstrumentId::mode
char mode[RBRINSTRUMENT_ID_MODE_MAX+1]
Definition: RBRInstrument.h:291
RBRINSTRUMENT_SERIAL_MODE_NONE
@ RBRINSTRUMENT_SERIAL_MODE_NONE
Definition: RBRInstrumentCommunication.h:135
RBRINSTRUMENT_SERIAL_BAUD_460800
@ RBRINSTRUMENT_SERIAL_BAUD_460800
Definition: RBRInstrumentCommunication.h:105
RBRInstrumentLink
RBRInstrumentLink
Instrument link types.
Definition: RBRInstrumentCommunication.h:27
RBRInstrumentSerialBaudRate_name
const char * RBRInstrumentSerialBaudRate_name(RBRInstrumentSerialBaudRate baud)
Get a human-readable string name for a baud rate.
RBRInstrumentSerial::mode
RBRInstrumentSerialMode mode
The serial mode of the instrument.
Definition: RBRInstrumentCommunication.h:171
RBRINSTRUMENT_WIFI_ON
@ RBRINSTRUMENT_WIFI_ON
The Wi-Fi radio is powered up and ready to communicate.
Definition: RBRInstrumentCommunication.h:262
RBRINSTRUMENT_SERIAL_BAUD_57600
@ RBRINSTRUMENT_SERIAL_BAUD_57600
Definition: RBRInstrumentCommunication.h:99
RBRINSTRUMENT_LINK_COUNT
@ RBRINSTRUMENT_LINK_COUNT
Definition: RBRInstrumentCommunication.h:36
RBRInstrumentWiFi::enabled
bool enabled
Enables or disables Wi-Fi connectivity.
Definition: RBRInstrumentCommunication.h:294
RBRINSTRUMENT_SERIAL_BAUD_9600
@ RBRINSTRUMENT_SERIAL_BAUD_9600
Definition: RBRInstrumentCommunication.h:91
RBRINSTRUMENT_SERIAL_BAUD_300
@ RBRINSTRUMENT_SERIAL_BAUD_300
Definition: RBRInstrumentCommunication.h:81
RBRInstrumentSerial::availableModes
const RBRInstrumentSerialMode availableModes
Serial modes which the instrument can use.
Definition: RBRInstrumentCommunication.h:199
RBRINSTRUMENT_WIFI_COUNT
@ RBRINSTRUMENT_WIFI_COUNT
Definition: RBRInstrumentCommunication.h:266
RBRInstrumentSerial
struct RBRInstrumentSerial RBRInstrumentSerial
Instrument serial command parameters.
RBRInstrumentError
RBRInstrumentError
Errors which can be returned from library functions.
Definition: RBRInstrument.h:200
RBRINSTRUMENT_LINK_WIFI
@ RBRINSTRUMENT_LINK_WIFI
Definition: RBRInstrumentCommunication.h:34
RBRInstrumentSerial
Instrument serial command parameters.
Definition: RBRInstrumentCommunication.h:166
RBRINSTRUMENT_SERIAL_MODE_UART_IDLE_LOW
@ RBRINSTRUMENT_SERIAL_MODE_UART_IDLE_LOW
Definition: RBRInstrumentCommunication.h:145
RBRINSTRUMENT_LINK_USB
@ RBRINSTRUMENT_LINK_USB
Definition: RBRInstrumentCommunication.h:30
RBRINSTRUMENT_UNKNOWN_LINK
@ RBRINSTRUMENT_UNKNOWN_LINK
Definition: RBRInstrumentCommunication.h:38
RBRInstrumentSerialMode_name
const char * RBRInstrumentSerialMode_name(RBRInstrumentSerialMode mode)
Get a human-readable string name for a serial mode.
RBRINSTRUMENT_SERIAL_BAUD_MAX
@ RBRINSTRUMENT_SERIAL_BAUD_MAX
Definition: RBRInstrumentCommunication.h:109
RBRInstrumentWiFiState_name
const char * RBRInstrumentWiFiState_name(RBRInstrumentWiFiState state)
Get a human-readable string name for a Wi-Fi connection state.
RBRINSTRUMENT_UNKNOWN_WIFI
@ RBRINSTRUMENT_UNKNOWN_WIFI
Definition: RBRInstrumentCommunication.h:268
RBRInstrumentWiFi::state
const RBRInstrumentWiFiState state
The state of the Wi-Fi radio.
Definition: RBRInstrumentCommunication.h:302
RBRINSTRUMENT_SERIAL_MODE_MAX
@ RBRINSTRUMENT_SERIAL_MODE_MAX
Definition: RBRInstrumentCommunication.h:147
RBRINSTRUMENT_LINK_SERIAL
@ RBRINSTRUMENT_LINK_SERIAL
Definition: RBRInstrumentCommunication.h:32
RBRINSTRUMENT_SERIAL_MODE_RS232
@ RBRINSTRUMENT_SERIAL_MODE_RS232
Definition: RBRInstrumentCommunication.h:137
RBRINSTRUMENT_SERIAL_BAUD_4800
@ RBRINSTRUMENT_SERIAL_BAUD_4800
Definition: RBRInstrumentCommunication.h:89
RBRINSTRUMENT_SERIAL_BAUD_38400
@ RBRINSTRUMENT_SERIAL_BAUD_38400
Definition: RBRInstrumentCommunication.h:97
RBRINSTRUMENT_SERIAL_BAUD_600
@ RBRINSTRUMENT_SERIAL_BAUD_600
Definition: RBRInstrumentCommunication.h:83
RBRINSTRUMENT_SERIAL_BAUD_28800
@ RBRINSTRUMENT_SERIAL_BAUD_28800
Definition: RBRInstrumentCommunication.h:95
RBRInstrument_getWiFi
RBRInstrumentError RBRInstrument_getWiFi(RBRInstrument *instrument, RBRInstrumentWiFi *wifi)
Retrieve the current instrument Wi-Fi settings.
RBRInstrumentWiFi::commandTimeout
int32_t commandTimeout
How long the instrument will wait between commands after the first command before powering down the W...
Definition: RBRInstrumentCommunication.h:318
RBRInstrumentLink_name
const char * RBRInstrumentLink_name(RBRInstrumentLink link)
Get a human-readable string name for a communication link.
RBRInstrument_setSerial
RBRInstrumentError RBRInstrument_setSerial(RBRInstrument *instrument, const RBRInstrumentSerial *serial)
Reconfigure the instrument serial baud rate and mode.
RBRInstrument_sleep
RBRInstrumentError RBRInstrument_sleep(RBRInstrument *instrument)
Immediately shut down communications and implement any possible power-saving measures.
RBRINSTRUMENT_SERIAL_MODE_RS485F
@ RBRINSTRUMENT_SERIAL_MODE_RS485F
Definition: RBRInstrumentCommunication.h:139
RBRInstrument
Core library context object.
Definition: RBRInstrument.h:591
RBRInstrumentSerialMode
RBRInstrumentSerialMode
Instrument serial modes.
Definition: RBRInstrumentCommunication.h:132
RBRInstrumentSerial::baudRate
RBRInstrumentSerialBaudRate baudRate
The baud rate of the instrument.
Definition: RBRInstrumentCommunication.h:169
RBRINSTRUMENT_SERIAL_MODE_UART
@ RBRINSTRUMENT_SERIAL_MODE_UART
Definition: RBRInstrumentCommunication.h:143
RBRInstrumentWiFi::powerTimeout
int32_t powerTimeout
How long the instrument will wait for a valid command after first powering up the Wi-Fi radio before ...
Definition: RBRInstrumentCommunication.h:310
RBRInstrumentSerial::availableBaudRates
const RBRInstrumentSerialBaudRate availableBaudRates
Serial baud rates which the instrument can use.
Definition: RBRInstrumentCommunication.h:185
RBRINSTRUMENT_SERIAL_BAUD_NONE
@ RBRINSTRUMENT_SERIAL_BAUD_NONE
Definition: RBRInstrumentCommunication.h:79
RBRINSTRUMENT_SERIAL_BAUD_115200
@ RBRINSTRUMENT_SERIAL_BAUD_115200
Definition: RBRInstrumentCommunication.h:101