libdata-unified-status  1.1.1
Data Structures | Enumerations | Functions
GPS receiver status

Data Structures

struct  unified_status_gps_t
 GPS receiver status details. More...
 

Enumerations

enum  unified_status_gps_fix_t {
  unified_status_gps_fix_powered_off = 0x0, unified_status_gps_fix_no_comms = 0x1, unified_status_gps_fix_none = 0x2, unified_status_gps_fix_2D = 0x3,
  unified_status_gps_fix_3D = 0x4
}
 GPS receiver fix. More...
 

Functions

int unified_status_read_gps (const char *st, struct unified_status_gps_t *out)
 Interpret a GPS receiver status tag. More...
 
void unified_status_write_gps (struct membuf_t *buf, const struct unified_status_gps_t *in)
 Compose a GPS receiver status tag. More...
 
int soh_store_get_gps_status (const struct soh_store_t *store, struct iso8601_date *timestamp, struct unified_status_gps_t *gps)
 Retrieve GPS receiver status from persistent store object. More...
 

Detailed Description

Per-instrument GPS receiver state.

Enumeration Type Documentation

◆ unified_status_gps_fix_t

GPS receiver fix.

Enumerator
unified_status_gps_fix_powered_off 

GPS receiver is powered off by the digitiser.

unified_status_gps_fix_no_comms 

GPS receiver is powered on, but there is no serial data from it.

unified_status_gps_fix_none 

GPS receiver has lost its fix.

unified_status_gps_fix_2D 

GPS receiver has a 2D fix.

unified_status_gps_fix_3D 

GPS receiver has a 3D fix.

Function Documentation

◆ unified_status_read_gps()

int unified_status_read_gps ( const char *  st,
struct unified_status_gps_t out 
)

Interpret a GPS receiver status tag.

Parameters
stPointer to status data (must coincide with start of tag).
[out]outGPS receiver status written here.
Return values
0on success.
-1on error.

Interprets GPS receiver status tag at st, storing the result in out.

◆ unified_status_write_gps()

void unified_status_write_gps ( struct membuf_t *  buf,
const struct unified_status_gps_t in 
)

Compose a GPS receiver status tag.

Parameters
bufBuffer to write result into.
inGPS receiver status.

Encodes the GPS receiver status in in, appending the result onto buf.

◆ soh_store_get_gps_status()

int soh_store_get_gps_status ( const struct soh_store_t *  store,
struct iso8601_date *  timestamp,
struct unified_status_gps_t gps 
)

Retrieve GPS receiver status from persistent store object.

Parameters
storePersistent storage object.
[out]timestampTimestamp of last update. May be 0.
[out]gpsGPS receiver information structure. May be 0.
Return values
0on success.
-1on error (no status information seen).