gls_db.h
Go to the documentation of this file.
1
54 #ifndef __GLS_DB_H__
55 #define __GLS_DB_H__
56
57 #include "gls.h"
58 #include "gls_racp.h"
59 #include <stdint.h>
60 #include <stdbool.h>
61
66 #define GLS_DB_RECORDS_MAX 20
79 void gls_db_init(void);
80
92 bool gls_db_record_add(gls_rec_t *p_rec);
93
105 bool gls_db_record_delete(uint8_t rec_idx);
106
114 uint16_t gls_db_records_num_get(void);
115
123 uint16_t gls_db_filter_records_num_get(gls_racp_filter_t *p_filter);
124
137 bool gls_db_record_get(uint8_t rec_idx, gls_rec_t *p_rec);
138
144 void gls_db_record_clear(void);
147 #endif
148
gls.h
Glucose Service API.
gls_db_record_clear
void gls_db_record_clear(void)
Clear database.
gls_racp.h
Glucose Service Record Access Control Point API.
gls_db_filter_records_num_get
uint16_t gls_db_filter_records_num_get(gls_racp_filter_t *p_filter)
Get the number of records satisfying the filtering condition.
gls_db_record_add
bool gls_db_record_add(gls_rec_t *p_rec)
Add a record at the end of the database.
gls_db_record_get
bool gls_db_record_get(uint8_t rec_idx, gls_rec_t *p_rec)
Get a record from the database.
gls_db_records_num_get
uint16_t gls_db_records_num_get(void)
Get the number of records in the database.
gls_racp_filter_t
Glucose Recoerd Access Control Point filter value.
Definition: gls_racp.h:132
gls_rec_t
Glucose measurement record.
Definition: gls.h:330
gls_db_record_delete
bool gls_db_record_delete(uint8_t rec_idx)
Delete a database entry.