Soletta™ Framework
Framework for making IoT devices

Full online documentation | C API Index
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
heartbeat.c File Reference
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "soletta.h"
#include "sol-log.h"
#include "sol-mainloop.h"
#include "sol-bluetooth.h"
#include "sol-gatt.h"

Macros

#define UUID_HRS   0x180d
 
#define UUID_HRS_MEASUREMENT   0x2a37
 

Functions

static void enabled (void *data, bool powered)
 
static int hrs_measurement_read (struct sol_gatt_pending *op, uint16_t offset)
 
static void shutdown (void)
 
 SOL_MAIN_DEFAULT (startup, shutdown)
 
static void startup (void)
 
static bool timeout_cb (void *data)
 

Variables

static struct sol_gatt_attr attrs []
 
static struct sol_bt_sessionsession
 
static struct sol_timeouttimeout
 

Macro Definition Documentation

#define UUID_HRS   0x180d
#define UUID_HRS_MEASUREMENT   0x2a37

Function Documentation

static void enabled ( void *  data,
bool  powered 
)
static
static int hrs_measurement_read ( struct sol_gatt_pending op,
uint16_t  offset 
)
static
static void shutdown ( void  )
static
SOL_MAIN_DEFAULT ( startup  ,
shutdown   
)
static void startup ( void  )
static
static bool timeout_cb ( void *  data)
static

References sol_gatt_notify(), and SOL_INT_CHECK.

Referenced by enabled().

Variable Documentation

struct sol_gatt_attr attrs[]
static
Initial value:
= {
}
#define UUID_HRS_MEASUREMENT
Definition: heartbeat.c:31
#define UUID_HRS
Definition: heartbeat.c:30
Allows the characteristic value to be read.
Definition: sol-gatt.h:72
static int hrs_measurement_read(struct sol_gatt_pending *op, uint16_t offset)
Definition: heartbeat.c:37
#define SOL_GATT_SERVICE_UUID_16(service_uuid)
Helper to the construction of a GATT Service with 16-bit UUID.
Definition: sol-gatt.h:203
Allows indications for the characteristic value.
Definition: sol-gatt.h:80
#define SOL_GATT_CHARACTERISTIC_UUID_16(_uuid, _flags,...)
Helper to the construction of a GATT Characteristic with 16-bit UUID.
Definition: sol-gatt.h:213
#define SOL_GATT_ATTR_INVALID
Terminates the list of attributes.
Definition: sol-gatt.h:237
Examples:
/src/samples/bluetooth/heartbeat.c.
struct sol_bt_session* session
static

Referenced by shutdown(), and startup().

struct sol_timeout* timeout
static

Referenced by enabled().