libRBR
v1.2.3
RBR instrument communication API
|
Instrument commands and structures pertaining to time and schedule. More...
Go to the source code of this file.
Data Structures | |
struct | RBRInstrumentClock |
Instrument clock command parameters. More... | |
struct | RBRInstrumentSampling |
Instrument sampling command parameters. More... | |
struct | RBRInstrumentDeployment |
Instrument deployment command parameters. More... | |
Macros | |
#define | RBRINSTRUMENT_AVAILABLE_FAST_PERIODS_MAX 32 |
The maximum number of available fast sampling periods to parse from the instrument. More... | |
#define | RBRINSTRUMENT_SAMPLING_PERIOD_MAX 86400000 |
The maximum sampling period in milliseconds. | |
Typedefs | |
typedef struct RBRInstrumentClock | RBRInstrumentClock |
Instrument clock command parameters. More... | |
typedef enum RBRInstrumentSamplingMode | RBRInstrumentSamplingMode |
Possible instrument sampling modes. More... | |
typedef enum RBRInstrumentGate | RBRInstrumentGate |
Possible instrument gating conditions. More... | |
typedef struct RBRInstrumentSampling | RBRInstrumentSampling |
Instrument sampling command parameters. More... | |
typedef enum RBRInstrumentDeploymentStatus | RBRInstrumentDeploymentStatus |
Possible instrument logging statuses. More... | |
typedef struct RBRInstrumentDeployment | RBRInstrumentDeployment |
Instrument deployment command parameters. More... | |
Instrument commands and structures pertaining to time and schedule.
#define RBRINSTRUMENT_AVAILABLE_FAST_PERIODS_MAX 32 |
The maximum number of available fast sampling periods to parse from the instrument.
typedef struct RBRInstrumentClock RBRInstrumentClock |
Instrument clock
command parameters.
typedef struct RBRInstrumentDeployment RBRInstrumentDeployment |
Instrument deployment
command parameters.
typedef enum RBRInstrumentGate RBRInstrumentGate |
Possible instrument gating conditions.
typedef struct RBRInstrumentSampling RBRInstrumentSampling |
Instrument sampling
command parameters.
See the command reference for details on valid parameter values.
typedef enum RBRInstrumentSamplingMode RBRInstrumentSamplingMode |
Possible instrument sampling modes.
Possible instrument logging statuses.
Enumerator | |
---|---|
RBRINSTRUMENT_STATUS_DISABLED | Logging is not enabled. |
RBRINSTRUMENT_STATUS_PENDING | Logging is enabled but the start time has not yet passed. |
RBRINSTRUMENT_STATUS_LOGGING | Logging is in progress. |
RBRINSTRUMENT_STATUS_GATED | Logging paused; awaiting satisfaction of a gating condition. |
RBRINSTRUMENT_STATUS_FINISHED | The programmed end time has been passed. |
RBRINSTRUMENT_STATUS_STOPPED | A
|
RBRINSTRUMENT_STATUS_FULLANDSTOPPED | Memory full; logging has stopped. |
RBRINSTRUMENT_STATUS_FULL | Memory full; logger continues to stream data. |
RBRINSTRUMENT_STATUS_FAILED | Stopped; internal error. |
RBRINSTRUMENT_STATUS_NOTBLANK | Memory failed to erase. |
RBRINSTRUMENT_STATUS_UNKNOWN | Instrument internal error; state unknown. |
RBRINSTRUMENT_STATUS_COUNT | The number of specific statuses. |
RBRINSTRUMENT_UNKNOWN_STATUS | An unknown or unrecognized status. |
enum RBRInstrumentGate |
Possible instrument gating conditions.
Enumerator | |
---|---|
RBRINSTRUMENT_GATE_NONE | No gating. |
RBRINSTRUMENT_GATE_THRESHOLDING | Threshold gating.
|
RBRINSTRUMENT_GATE_TWISTACTIVATION | Twist-activated gating. |
RBRINSTRUMENT_GATE_INVALID | The instrument considers its gating condition to be invalid. |
RBRINSTRUMENT_GATE_COUNT | The number of specific sampling modes. |
RBRINSTRUMENT_UNKNOWN_GATE | An unknown or unrecognized sampling mode. |
Possible instrument sampling modes.
RBRInstrumentError RBRInstrument_getClock | ( | RBRInstrument * | instrument, |
RBRInstrumentClock * | clock | ||
) |
Get the instrument clock.
Because UTC offset is tracked as a setting on Logger2 instruments, not as a parameter of the now
command (as it is of clock
on Logger3), this function will internally issue two commands to Logger2 instruments to separately receive the time and UTC offset. When retrieving the clock from older Logger2 instruments which do not support the offsetfromutc
setting, RBRInstrumentClock.offsetFromUtc will always be NAN
.
[in] | instrument | the instrument connection |
[out] | clock | the clock value |
RBRInstrumentError RBRInstrument_getDeployment | ( | RBRInstrument * | instrument, |
RBRInstrumentDeployment * | deployment | ||
) |
Get the instrument deployment parameters.
[in] | instrument | the instrument connection |
[out] | deployment | the deployment parameters |
RBRInstrumentError RBRInstrument_getSampling | ( | RBRInstrument * | instrument, |
RBRInstrumentSampling * | sampling | ||
) |
Get the instrument sampling parameters.
[in] | instrument | the instrument connection |
[out] | sampling | the sampling parameters |
RBRInstrumentError RBRInstrument_setBurstSampling | ( | RBRInstrument * | instrument, |
const RBRInstrumentSampling * | sampling | ||
) |
Set the instrument burst sampling length and interval.
This sets only burst parameters (RBRInstrumentSampling.burstLength and RBRInstrumentSampling.burstInterval). To configure the sampling mode and period, use RBRInstrument_setSampling().
Only burst parameters are sent to the instrument. However, the sampling period (RBRInstrumentSampling.period) is used to validate the burst interval, which is itself validated by RBRInstrumentSampling.userPeriodLimit and RBRInstrumentSampling.availableFastPeriods. See RBRInstrumentSampling.burstInterval for details.
Hardware errors may occur if:
[in] | instrument | the instrument connection |
[in] | sampling | the sampling parameters |
RBRInstrumentError RBRInstrument_setClock | ( | RBRInstrument * | instrument, |
const RBRInstrumentClock * | clock | ||
) |
Set the instrument clock.
Because UTC offset is tracked as a setting on Logger2 instruments, not as a parameter of the now
command (as it is of clock
on Logger3), this function will internally issue two commands to Logger2 instruments to separately set the time and UTC offset. When setting the clock on older Logger2 instruments which do not support the offsetfromutc
setting, the value of the RBRInstrumentClock.offsetFromUtc field will be ignored.
Hardware errors may occur if:
[in] | instrument | the instrument connection |
[in] | clock | the clock value |
RBRInstrumentError RBRInstrument_setDeployment | ( | RBRInstrument * | instrument, |
const RBRInstrumentDeployment * | deployment | ||
) |
Set the instrument deployment parameters.
As noted in the description of RBRInstrumentDeployment.status, that field is ignored when setting the deployment.
Hardware errors may occur if:
[in] | instrument | the instrument connection |
[in] | deployment | the deployment parameters |
RBRInstrumentError RBRInstrument_setSampling | ( | RBRInstrument * | instrument, |
const RBRInstrumentSampling * | sampling | ||
) |
Set the instrument sampling mode and period.
This does not set burst parameters (RBRInstrumentSampling.burstLength and RBRInstrumentSampling.burstInterval). On instruments which do not support bursting/averaging, attempting to set these parameters results in a hardware error; to avoid this, bursting parameters may be configured via RBRInstrument_setBurstSampling().
The values of RBRInstrumentSampling.userPeriodLimit and RBRInstrumentSampling.availableFastPeriods are not sent to the instrument, but they are used to validate the chosen RBRInstrumentSampling.period. If RBRInstrumentSampling.userPeriodLimit is non-zero, then the specified sampling period must be equal or greater. And if the period is less than 1,000 and the RBRInstrumentSampling.availableFastPeriods are populated, then the period must be one of those available fast periods.
Periods greater than or equal to 1,000 (one second) must be an integer multiple of 1,000 and must be less than or equal to 86,400,000 (24 hours).
The value RBRInstrumentSampling.gate is also ignored. The gating mode is controlled via commands for the individual gating mechanisms: see RBRInstrument_setTwistActivation() and RBRInstrument_setThresholding().
Hardware errors may occur if:
[in] | instrument | the instrument connection |
[in] | sampling | the sampling parameters |
const char* RBRInstrumentDeploymentStatus_name | ( | RBRInstrumentDeploymentStatus | status | ) |
Get a human-readable string name for a deployment status.
[in] | status | the deployment status |
const char* RBRInstrumentGate_name | ( | RBRInstrumentGate | gate | ) |
Get a human-readable string name for a gating condition.
[in] | gate | the gating condition |
const char* RBRInstrumentSamplingMode_name | ( | RBRInstrumentSamplingMode | mode | ) |
Get a human-readable string name for a sampling mode.
[in] | mode | the sampling mode |