libdata-unified-status  1.1.1
Data Structures | Functions
Temperature

Data Structures

struct  unified_status_temp_t
 Temperature details. More...
 

Functions

int unified_status_read_temp (const char *st, struct unified_status_temp_t *out)
 Interpret temperature tag. More...
 
void unified_status_write_temp (struct membuf_t *buf, const struct unified_status_temp_t *in)
 Compose a temperature tag. More...
 
int soh_store_get_temp (const struct soh_store_t *store, struct iso8601_date *timestamp, struct unified_status_temp_t *temp)
 Retrieve temperature from persistent store object. More...
 

Detailed Description

Temperature reading. Temperature is expressed as a value in Kelvin.

Function Documentation

◆ unified_status_read_temp()

int unified_status_read_temp ( const char *  st,
struct unified_status_temp_t out 
)

Interpret temperature tag.

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

Interprets temperature tag at st, storing the result in out.

◆ unified_status_write_temp()

void unified_status_write_temp ( struct membuf_t *  buf,
const struct unified_status_temp_t in 
)

Compose a temperature tag.

Parameters
bufBuffer to write result into.
inTemperature.

Encodes the temperature in in, appending the result onto buf.

◆ soh_store_get_temp()

int soh_store_get_temp ( const struct soh_store_t *  store,
struct iso8601_date *  timestamp,
struct unified_status_temp_t temp 
)

Retrieve temperature from persistent store object.

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