Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BLE_WallbotBLE_Challenge by
ble_gls_db.h
00001 /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 00002 * 00003 * The information contained herein is property of Nordic Semiconductor ASA. 00004 * Terms and conditions of usage are described in detail in NORDIC 00005 * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 00006 * 00007 * Licensees are granted free, non-transferable use of the information. NO 00008 * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 00009 * the file. 00010 */ 00011 00012 /** @file 00013 * 00014 * @defgroup ble_sdk_srv_gls_db Glucose Database Service 00015 * @{ 00016 * @ingroup ble_sdk_srv 00017 * @brief Glucose Service module. 00018 * 00019 * @details This module implements at database of stored glucose measurement values. 00020 * 00021 * @note Attention! 00022 * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile 00023 * qualification listings, These APIs must not be modified. However, the corresponding 00024 * functions' implementations can be modified. 00025 */ 00026 00027 #ifndef BLE_GLS_DB_H__ 00028 #define BLE_GLS_DB_H__ 00029 00030 #include <stdint.h> 00031 #include "ble_gls.h " 00032 00033 #define BLE_GLS_DB_MAX_RECORDS 20 00034 00035 /**@brief Function for initializing the glucose record database. 00036 * 00037 * @details This call initializes the database holding glucose records. 00038 * 00039 * @return NRF_SUCCESS on success. 00040 */ 00041 uint32_t ble_gls_db_init(void); 00042 00043 /**@brief Function for getting the number of records in the database. 00044 * 00045 * @details This call returns the number of records in the database. 00046 * 00047 * @return Number of records in the database. 00048 */ 00049 uint16_t ble_gls_db_num_records_get(void); 00050 00051 /**@brief Function for getting a record from the database. 00052 * 00053 * @details This call returns a specified record from the database. 00054 * 00055 * @param[in] record_num Index of the record to retrieve. 00056 * @param[out] p_rec Pointer to record structure where retrieved record is copied to. 00057 * 00058 * @return NRF_SUCCESS on success. 00059 */ 00060 uint32_t ble_gls_db_record_get(uint8_t record_num, ble_gls_rec_t * p_rec); 00061 00062 /**@brief Function for adding a record at the end of the database. 00063 * 00064 * @details This call adds a record as the last record in the database. 00065 * 00066 * @param[in] p_rec Pointer to record to add to database. 00067 * 00068 * @return NRF_SUCCESS on success. 00069 */ 00070 uint32_t ble_gls_db_record_add(ble_gls_rec_t * p_rec); 00071 00072 /**@brief Function for deleting a database entry. 00073 * 00074 * @details This call deletes an record from the database. 00075 * 00076 * @param[in] record_num Index of record to delete. 00077 * 00078 * @return NRF_SUCCESS on success. 00079 */ 00080 uint32_t ble_gls_db_record_delete(uint8_t record_num); 00081 00082 #endif // BLE_GLS_DB_H__ 00083 00084 /** @} */ 00085 00086 /** @endcond */
Generated on Tue Jul 12 2022 13:52:30 by
