libRBR v1.2.3
RBR instrument communication API
Data Structures | Macros | Typedefs | Enumerations | Functions
RBRInstrumentSchedule.h File Reference

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...
 

Enumerations

enum  RBRInstrumentSamplingMode {
  RBRINSTRUMENT_SAMPLING_CONTINUOUS , RBRINSTRUMENT_SAMPLING_BURST , RBRINSTRUMENT_SAMPLING_WAVE , RBRINSTRUMENT_SAMPLING_AVERAGE ,
  RBRINSTRUMENT_SAMPLING_TIDE , RBRINSTRUMENT_SAMPLING_REGIMES , RBRINSTRUMENT_SAMPLING_DDSAMPLING , RBRINSTRUMENT_SAMPLING_COUNT ,
  RBRINSTRUMENT_UNKNOWN_SAMPLING
}
 Possible instrument sampling modes. More...
 
enum  RBRInstrumentGate {
  RBRINSTRUMENT_GATE_NONE , RBRINSTRUMENT_GATE_THRESHOLDING , RBRINSTRUMENT_GATE_TWISTACTIVATION , RBRINSTRUMENT_GATE_INVALID ,
  RBRINSTRUMENT_GATE_COUNT , RBRINSTRUMENT_UNKNOWN_GATE
}
 Possible instrument gating conditions. More...
 
enum  RBRInstrumentDeploymentStatus {
  RBRINSTRUMENT_STATUS_DISABLED , RBRINSTRUMENT_STATUS_PENDING , RBRINSTRUMENT_STATUS_LOGGING , RBRINSTRUMENT_STATUS_GATED ,
  RBRINSTRUMENT_STATUS_FINISHED , RBRINSTRUMENT_STATUS_STOPPED , RBRINSTRUMENT_STATUS_FULLANDSTOPPED , RBRINSTRUMENT_STATUS_FULL ,
  RBRINSTRUMENT_STATUS_FAILED , RBRINSTRUMENT_STATUS_NOTBLANK , RBRINSTRUMENT_STATUS_UNKNOWN , RBRINSTRUMENT_STATUS_COUNT ,
  RBRINSTRUMENT_UNKNOWN_STATUS
}
 Possible instrument logging statuses. More...
 

Functions

RBRInstrumentError RBRInstrument_getClock (RBRInstrument *instrument, RBRInstrumentClock *clock)
 Get the instrument clock. More...
 
RBRInstrumentError RBRInstrument_setClock (RBRInstrument *instrument, const RBRInstrumentClock *clock)
 Set the instrument clock. More...
 
const char * RBRInstrumentSamplingMode_name (RBRInstrumentSamplingMode mode)
 Get a human-readable string name for a sampling mode. More...
 
const char * RBRInstrumentGate_name (RBRInstrumentGate gate)
 Get a human-readable string name for a gating condition. More...
 
RBRInstrumentError RBRInstrument_getSampling (RBRInstrument *instrument, RBRInstrumentSampling *sampling)
 Get the instrument sampling parameters. More...
 
RBRInstrumentError RBRInstrument_setSampling (RBRInstrument *instrument, const RBRInstrumentSampling *sampling)
 Set the instrument sampling mode and period. More...
 
RBRInstrumentError RBRInstrument_setBurstSampling (RBRInstrument *instrument, const RBRInstrumentSampling *sampling)
 Set the instrument burst sampling length and interval. More...
 
const char * RBRInstrumentDeploymentStatus_name (RBRInstrumentDeploymentStatus status)
 Get a human-readable string name for a deployment status. More...
 
RBRInstrumentError RBRInstrument_getDeployment (RBRInstrument *instrument, RBRInstrumentDeployment *deployment)
 Get the instrument deployment parameters. More...
 
RBRInstrumentError RBRInstrument_setDeployment (RBRInstrument *instrument, const RBRInstrumentDeployment *deployment)
 Set the instrument deployment parameters. More...
 

Detailed Description

Instrument commands and structures pertaining to time and schedule.

See also
https://docs.rbr-global.com/L3commandreference/commands/time-and-schedule

Macro Definition Documentation

◆ RBRINSTRUMENT_AVAILABLE_FAST_PERIODS_MAX

#define RBRINSTRUMENT_AVAILABLE_FAST_PERIODS_MAX   32

The maximum number of available fast sampling periods to parse from the instrument.

See also
RBRInstrumentSampling.availableFastPeriods

Typedef Documentation

◆ RBRInstrumentClock

◆ RBRInstrumentDeployment

◆ RBRInstrumentDeploymentStatus

◆ RBRInstrumentGate

◆ RBRInstrumentSampling

Instrument sampling command parameters.

See the command reference for details on valid parameter values.

See also
RBRInstrument_getSampling()
RBRInstrument_setSampling()
https://docs.rbr-global.com/L3commandreference/commands/time-and-schedule/sampling

◆ RBRInstrumentSamplingMode

Enumeration Type Documentation

◆ RBRInstrumentDeploymentStatus

Possible instrument logging statuses.

See also
RBRInstrumentDeployment
RBRInstrument_getDeployment()
RBRInstrument_enable()
https://docs.rbr-global.com/L3commandreference/commands/time-and-schedule/deployment
https://docs.rbr-global.com/L3commandreference/commands/deployments/enable
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 disable command was received.

See also
RBRInstrument_disable()
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.

◆ RBRInstrumentGate

Possible instrument gating conditions.

See also
RBRInstrumentSampling
RBRInstrumentGating.h
https://docs.rbr-global.com/L3commandreference/commands/time-and-schedule/sampling
https://docs.rbr-global.com/L3commandreference/commands/gated-sampling
Enumerator
RBRINSTRUMENT_GATE_NONE 

No gating.

RBRINSTRUMENT_GATE_THRESHOLDING 

Threshold gating.

See also
RBRInstrument_setThresholding()
RBRINSTRUMENT_GATE_TWISTACTIVATION 

Twist-activated gating.

See also
RBRInstrument_setTwistActivation()
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.

◆ RBRInstrumentSamplingMode

Possible instrument sampling modes.

See also
RBRInstrumentSampling
https://docs.rbr-global.com/L3commandreference/commands/time-and-schedule/sampling
Enumerator
RBRINSTRUMENT_SAMPLING_CONTINUOUS 

Continuous sampling mode.

RBRINSTRUMENT_SAMPLING_BURST 

Burst sampling mode.

RBRINSTRUMENT_SAMPLING_WAVE 

Wave sampling mode.

RBRINSTRUMENT_SAMPLING_AVERAGE 

Average sampling mode.

RBRINSTRUMENT_SAMPLING_TIDE 

Tide sampling mode.

RBRINSTRUMENT_SAMPLING_REGIMES 

Regime sampling mode.

RBRINSTRUMENT_SAMPLING_DDSAMPLING 

Direction-dependent sampling mode.

See also
RBRInstrumentVehicle.h
RBRInstrument_setDirectionDependentSampling()
RBRINSTRUMENT_SAMPLING_COUNT 

The number of specific sampling modes.

RBRINSTRUMENT_UNKNOWN_SAMPLING 

An unknown or unrecognized sampling mode.

Function Documentation

◆ RBRInstrument_getClock()

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.

Parameters
[in]instrumentthe instrument connection
[out]clockthe clock value
Returns
RBRINSTRUMENT_SUCCESS when the settings are successfully read
RBRINSTRUMENT_TIMEOUT when a timeout occurs
RBRINSTRUMENT_CALLBACK_ERROR returned by a callback
See also
https://docs.rbr-global.com/L3commandreference/commands/time-and-schedule/clock

◆ RBRInstrument_getDeployment()

RBRInstrumentError RBRInstrument_getDeployment ( RBRInstrument instrument,
RBRInstrumentDeployment deployment 
)

Get the instrument deployment parameters.

Parameters
[in]instrumentthe instrument connection
[out]deploymentthe deployment parameters
Returns
RBRINSTRUMENT_SUCCESS when the settings are successfully read
RBRINSTRUMENT_TIMEOUT when a timeout occurs
RBRINSTRUMENT_CALLBACK_ERROR returned by a callback
See also
https://docs.rbr-global.com/L3commandreference/commands/time-and-schedule/deployment

◆ RBRInstrument_getSampling()

RBRInstrumentError RBRInstrument_getSampling ( RBRInstrument instrument,
RBRInstrumentSampling sampling 
)

Get the instrument sampling parameters.

Parameters
[in]instrumentthe instrument connection
[out]samplingthe sampling parameters
Returns
RBRINSTRUMENT_SUCCESS when the settings are successfully read
RBRINSTRUMENT_TIMEOUT when a timeout occurs
RBRINSTRUMENT_CALLBACK_ERROR returned by a callback
See also
https://docs.rbr-global.com/L3commandreference/commands/time-and-schedule/sampling

◆ RBRInstrument_setBurstSampling()

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:

  • the instrument is logging
  • you set an out-of-bounds parameter the library fails to detect
  • bursting/averaging is not supported by the instrument
Parameters
[in]instrumentthe instrument connection
[in]samplingthe sampling parameters
Returns
RBRINSTRUMENT_SUCCESS when the settings are successfully written
RBRINSTRUMENT_TIMEOUT when a timeout occurs
RBRINSTRUMENT_CALLBACK_ERROR returned by a callback
RBRINSTRUMENT_HARDWARE_ERROR when the settings cannot be changed
RBRINSTRUMENT_INVALID_PARAMETER_VALUE when parameter values are out of range
See also
https://docs.rbr-global.com/L3commandreference/commands/time-and-schedule/sampling
RBRInstrument_setSampling()

◆ RBRInstrument_setClock()

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:

  • the instrument is logging
  • you set an out-of-bounds time the library fails to detect
Parameters
[in]instrumentthe instrument connection
[in]clockthe clock value
Returns
RBRINSTRUMENT_SUCCESS when the settings are successfully written
RBRINSTRUMENT_TIMEOUT when a timeout occurs
RBRINSTRUMENT_CALLBACK_ERROR returned by a callback
RBRINSTRUMENT_HARDWARE_ERROR when the settings cannot be changed
RBRINSTRUMENT_INVALID_PARAMETER_VALUE when the clock values are out of range
See also
https://docs.rbr-global.com/L3commandreference/commands/time-and-schedule/clock

◆ RBRInstrument_setDeployment()

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:

  • the instrument is logging
  • you set an out-of-bounds parameter the library fails to detect
Parameters
[in]instrumentthe instrument connection
[in]deploymentthe deployment parameters
Returns
RBRINSTRUMENT_SUCCESS when the settings are successfully written
RBRINSTRUMENT_TIMEOUT when a timeout occurs
RBRINSTRUMENT_CALLBACK_ERROR returned by a callback
RBRINSTRUMENT_HARDWARE_ERROR when the settings cannot be changed
RBRINSTRUMENT_INVALID_PARAMETER_VALUE when the start or end time values are out of range
See also
https://docs.rbr-global.com/L3commandreference/commands/time-and-schedule/deployment

◆ RBRInstrument_setSampling()

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:

  • the instrument is logging
  • you set an out-of-bounds parameter the library fails to detect
  • you attempt to set sampling parameters for an RBRcoda (where sampling is not supported)
Parameters
[in]instrumentthe instrument connection
[in]samplingthe sampling parameters
Returns
RBRINSTRUMENT_SUCCESS when the settings are successfully written
RBRINSTRUMENT_TIMEOUT when a timeout occurs
RBRINSTRUMENT_CALLBACK_ERROR returned by a callback
RBRINSTRUMENT_HARDWARE_ERROR when the settings cannot be changed
RBRINSTRUMENT_INVALID_PARAMETER_VALUE when parameter values are out of range
See also
https://docs.rbr-global.com/L3commandreference/commands/time-and-schedule/sampling
RBRInstrument_setBurstSampling()

◆ RBRInstrumentDeploymentStatus_name()

const char * RBRInstrumentDeploymentStatus_name ( RBRInstrumentDeploymentStatus  status)

Get a human-readable string name for a deployment status.

Parameters
[in]statusthe deployment status
Returns
a string name for the deployment status
See also
RBRInstrumentError_name() for a description of the format of names

◆ RBRInstrumentGate_name()

const char * RBRInstrumentGate_name ( RBRInstrumentGate  gate)

Get a human-readable string name for a gating condition.

Parameters
[in]gatethe gating condition
Returns
a string name for the gating condition
See also
RBRInstrumentError_name() for a description of the format of names

◆ RBRInstrumentSamplingMode_name()

const char * RBRInstrumentSamplingMode_name ( RBRInstrumentSamplingMode  mode)

Get a human-readable string name for a sampling mode.

Parameters
[in]modethe sampling mode
Returns
a string name for the sampling mode
See also
RBRInstrumentError_name() for a description of the format of names