libRBR
v1.2.3
RBR instrument communication API
|
Core library context object. More...
#include <RBRInstrument.h>
Data Fields | |
struct RBRInstrumentId | id |
The instrument identifier. More... | |
RBRInstrumentGeneration | generation |
The generation of the instrument. More... | |
RBRInstrumentCallbacks | callbacks |
The set of callbacks to be used by the connection. | |
RBRInstrumentDateTime | commandTimeout |
The command timeout in milliseconds. More... | |
void * | userData |
Arbitrary user data; useful in callbacks. | |
int32_t | commandBufferLength |
The number of used bytes in the command buffer. | |
int32_t | responseBufferLength |
The number of used bytes in the response buffer. | |
RBRInstrumentDateTime | lastActivityTime |
The time at which instrument communication last occurred. More... | |
int32_t | lastResponseLength |
The length in bytes of the most recent response. More... | |
uint8_t | commandBuffer [RBRINSTRUMENT_COMMAND_BUFFER_MAX] |
The next command to be sent to the instrument. More... | |
uint8_t | responseBuffer [RBRINSTRUMENT_RESPONSE_BUFFER_MAX] |
Data received from the instrument. More... | |
RBRInstrumentResponse | response |
The most recent response received from the instrument. More... | |
bool | managedAllocation |
Whether the instance memory was dynamically allocated by the constructor. | |
Core library context object.
Users are strongly discouraged from accessing the fields of this structure directly as layout and field availability maybe unstable from version to version. Getter and setter functions are available for safely reading from and writing to fields where necessary.
uint8_t RBRInstrument::commandBuffer[RBRINSTRUMENT_COMMAND_BUFFER_MAX] |
The next command to be sent to the instrument.
Intentionally not a char
array to discourage the use of str
functions. Commands may contain binary data and should not be assumed to be null-terminated.
RBRInstrumentDateTime RBRInstrument::commandTimeout |
The command timeout in milliseconds.
See Timeouts for details on how the library handles timeouts.
RBRInstrumentGeneration RBRInstrument::generation |
The generation of the instrument.
Detected while establishing the instrument connection.
struct RBRInstrumentId RBRInstrument::id |
The instrument identifier.
Cached every time RBRInstrument_getId() is called.
RBRInstrumentDateTime RBRInstrument::lastActivityTime |
The time at which instrument communication last occurred.
Used to determine whether the instrument needs to be woken before further commands are sent.
int32_t RBRInstrument::lastResponseLength |
The length in bytes of the most recent response.
Used when moving the last response out of the parse buffer before receiving new data.
RBRInstrumentResponse RBRInstrument::response |
The most recent response received from the instrument.
After the response parser identifies and terminates a command response, attributes of the response and its beginning position within the response buffer are recorded within this struct.
uint8_t RBRInstrument::responseBuffer[RBRINSTRUMENT_RESPONSE_BUFFER_MAX] |
Data received from the instrument.
Intentionally not a char
array to discourage the use of str
functions. Responses may contain binary data and should not be assumed to be null-terminated. RBRInstrumentResponse::response, when non-NULL
, provides null-terminated, C-string access to the response.