libdata-unified-status  1.1.1
Data Structures | Macros | Functions
Channel status

Data Structures

struct  unified_status_channel_t
 Channel status details. More...
 

Macros

#define UNIFIED_STATUS_CHANNEL_DEAD_SENSOR   (0x00000001)
 Channel status flag: sensor is dead.
 
#define UNIFIED_STATUS_CHANNEL_ZEROED_DATA   (0x00000002)
 Channel status flag: data is zeroed.
 
#define UNIFIED_STATUS_CHANNEL_DIGITISER_CLIPPING   (0x00000004)
 Channel status flag: digitiser clipped.
 
#define UNIFIED_STATUS_CHANNEL_CALIBRATING   (0x00000008)
 Channel status flag: calibration signal active.
 
#define UNIFIED_STATUS_CHANNEL_INPUT_SHORTED   (0x00000010)
 Channel status flag: analogue input shorted.
 
#define UNIFIED_STATUS_CHANNEL_AMPLIFIER_SATURATED   (0x00000080)
 Channel status flag: amplifier is saturated.
 
#define UNIFIED_STATUS_CHANNEL_GLITCHES   (0x00000100)
 Channel status flag: glitches (missing samples) on signal detected.
 
#define UNIFIED_STATUS_CHANNEL_SPIKES   (0x00000200)
 Channel status flag: spikes on signal detected.
 
#define UNIFIED_STATUS_CHANNEL_MISSING_OR_PADDED   (0x00000400)
 Channel status flag: data is missing or padded.
 
#define UNIFIED_STATUS_CHANNEL_FIR_CHARGING   (0x00000800)
 Channel status flag: a FIR filter may be charging.
 
#define UNIFIED_STATUS_CHANNEL_MASS_CENTRE   (0x00001000)
 Channel status flag: mass positions are centring.
 

Functions

int unified_status_read_channel (const char *st, struct unified_status_channel_t *out)
 Interpret a channel status tag. More...
 
void unified_status_write_channel (struct membuf_t *buf, const struct unified_status_channel_t *in)
 Compose a channel status tag. More...
 
int soh_store_get_channel_status (const struct soh_store_t *store, struct iso8601_date *timestamp, struct unified_status_channel_t *channel)
 Retrieve channel status from persistent store object. More...
 

Detailed Description

Per-channel status flags.

Function Documentation

◆ unified_status_read_channel()

int unified_status_read_channel ( const char *  st,
struct unified_status_channel_t out 
)

Interpret a channel status tag.

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

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

◆ unified_status_write_channel()

void unified_status_write_channel ( struct membuf_t *  buf,
const struct unified_status_channel_t in 
)

Compose a channel status tag.

Parameters
bufBuffer to write result into.
inChannel status.

Encodes the channel status in in, appending the result onto buf.

◆ soh_store_get_channel_status()

int soh_store_get_channel_status ( const struct soh_store_t *  store,
struct iso8601_date *  timestamp,
struct unified_status_channel_t channel 
)

Retrieve channel status from persistent store object.

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