libdata-unified-status
1.1.1
|
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... | |
Per-channel status flags.
int unified_status_read_channel | ( | const char * | st, |
struct unified_status_channel_t * | out | ||
) |
Interpret a channel status tag.
st | Pointer to status data (must coincide with start of tag). | |
[out] | out | Channel status written here. |
0 | on success. |
-1 | on error. |
Interprets channel status tag at st, storing the result in out.
void unified_status_write_channel | ( | struct membuf_t * | buf, |
const struct unified_status_channel_t * | in | ||
) |
Compose a channel status tag.
buf | Buffer to write result into. |
in | Channel status. |
Encodes the channel status in in, appending the result onto buf.
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.
store | Persistent storage object. | |
[out] | timestamp | Timestamp of last update. May be 0. |
[out] | channel | Channel information structure. May be 0. |
0 | on success. |
-1 | on error (no status information seen). |