libRBR  v1.2.3
RBR instrument communication API
Data Fields
RBRInstrumentResponse Struct Reference

A command response returned by the instrument. More...

#include <RBRInstrument.h>

Data Fields

RBRInstrumentResponseType type
 The type of this response: informational, warning, or error. More...
 
RBRInstrumentHardwareError error
 The instrument warning or error number, if applicable. More...
 
char * response
 The response, if available. More...
 

Detailed Description

A command response returned by the instrument.

Field Documentation

◆ error

RBRInstrumentHardwareError RBRInstrumentResponse::error

The instrument warning or error number, if applicable.

Will be 0 for informational responses. Otherwise, will include the error number indicated by the instrument; e.g., for “E0109: feature not available”, this field will contain 109, aka RBRINSTRUMENT_HARDWARE_ERROR_FEATURE_NOT_AVAILABLE.

◆ response

char* RBRInstrumentResponse::response

The response, if available.

Will be NULL when absent (not a pointer to a 0-length string). Otherwise points to a null-terminated C string.

◆ type

RBRInstrumentResponseType RBRInstrumentResponse::type

The type of this response: informational, warning, or error.

Successful commands, as indicated by the command having returned RBRINSTRUMENT_SUCCESS, may yield informational or warning responses (types RBRINSTRUMENT_RESPONSE_INFO and RBRINSTRUMENT_RESPONSE_WARNING, respectively). Commands having resulted in a hardware error will return RBRINSTRUMENT_HARDWARE_ERROR and yield an error response (type RBRINSTRUMENT_RESPONSE_ERROR). In any other case, the response is unpopulated and its contents are irrelevant (type RBRINSTRUMENT_RESPONSE_UNKNOWN_TYPE).

  • Informational responses will provide only a response (number as 0).
  • Warnings and errors will provide a number and occasionally a response.
  • Otherwise, the response number will be 0, and the response NULL.

The documentation for this struct was generated from the following file: