BSB Developer Docs
Loading...
Searching...
No Matches
busy_timer_snapshot.h File Reference

Data types and functions for BusyTimer snapshot handling. More...

Go to the source code of this file.

Data Structures

struct  BusyTimerSnapshotCommon
 
struct  BusyTimerSnapshotInfinite
 
struct  BusyTimerSnapshotSimple
 
struct  BusyTimerSnapshotInterval
 
struct  BusyTimerSnapshot
 

Enumerations

enum  BusyTimerSnapshotType {
  BusyTimerSnapshotTypeNotStarted , BusyTimerSnapshotTypeInfinite , BusyTimerSnapshotTypeSimple , BusyTimerSnapshotTypeInterval ,
  BusyTimerSnapshotTypeMax
}
 

Functions

char * busy_timer_snapshot_serialize (const BusyTimerSnapshot *snapshot)
 Convert a BusyTimerSnapshot object to its JSON representation.
 
bool busy_timer_snapshot_deserialize (BusyTimerSnapshot *snapshot, const char *json_text, size_t json_text_len)
 Load a BusyTimerSnapshot object from its JSON representation.
 
bool busy_timer_snapshot_is_valid (const BusyTimerSnapshot *snapshot)
 Check whether a BusyTimerSnapshot object represents a valid state.
 

Detailed Description

Data types and functions for BusyTimer snapshot handling.

Function Documentation

◆ busy_timer_snapshot_deserialize()

bool busy_timer_snapshot_deserialize ( BusyTimerSnapshot * snapshot,
const char * json_text,
size_t json_text_len )

Load a BusyTimerSnapshot object from its JSON representation.

Parameters
[out]snapshotpointer to the object to load into (must be allocated)
[in]json_textpointer to a character string containing the JSON text
[in]json_text_lenlength of the JSON text string
Returns
true if the JSON could be successfully parsed, false otherwise

◆ busy_timer_snapshot_is_valid()

bool busy_timer_snapshot_is_valid ( const BusyTimerSnapshot * snapshot)

Check whether a BusyTimerSnapshot object represents a valid state.

Parameters
[in]snapshotpointer to the object to be validated
Returns
true if the object is valid, false otherwise

◆ busy_timer_snapshot_serialize()

char * busy_timer_snapshot_serialize ( const BusyTimerSnapshot * snapshot)

Convert a BusyTimerSnapshot object to its JSON representation.

Warning
The calling code is responsible for deleting the return value once it is not needed anymore.
Parameters
[in]snapshotpointer to the object to be serialised
Returns
pointer to a dynamically allocated character string