PebbleOS v4.47.0-1219-g7c542d7a9
Loading...
Searching...
No Matches
Analytics storage

Destinations of the heartbeat records. More...

Data Structures

struct  pbl_analytics_storage
 Storage. More...
 

Macros

#define PBL_ANALYTICS_STORAGE_DEFINE(_name, _init, _store)
 Define a storage.
 

Detailed Description

Destinations of the heartbeat records.

A storage is defined with PBL_ANALYTICS_STORAGE_DEFINE, and gets every heartbeat record. Storages are initialized from pbl_analytics_init(), so whatever they depend on must be ready by then. Both operations run on the system work queue.

Macro Definition Documentation

◆ PBL_ANALYTICS_STORAGE_DEFINE

#define PBL_ANALYTICS_STORAGE_DEFINE (   _name,
  _init,
  _store 
)
Value:
static const struct pbl_analytics_storage _pbl_analytics_storage_##_name PBL_ITERABLE_SECTION( \
const struct pbl_analytics_storage, analytics_st, \
#_name) = {.name = #_name, .init = (_init), .store = (_store)}
#define PBL_ITERABLE_SECTION(type, tag, key)
Add the object to an iterable section, a table gathered at link time from any file.
Definition section.h:144
Storage.
Definition storage.h:22
const char * name
Name.
Definition storage.h:24
int(* store)(const void *record, size_t len)
Store a heartbeat record.
Definition storage.h:39

Define a storage.

Parameters
_nameStorage name, also its identifier.
_initInit function, or nullptr.
_storeStore function.