テスト用です。

Dependencies:   mbed

Committer:
jksoft
Date:
Tue Oct 11 11:09:42 2016 +0000
Revision:
0:8468a4403fea
SB??ver;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jksoft 0:8468a4403fea 1 /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
jksoft 0:8468a4403fea 2 *
jksoft 0:8468a4403fea 3 * The information contained herein is property of Nordic Semiconductor ASA.
jksoft 0:8468a4403fea 4 * Terms and conditions of usage are described in detail in NORDIC
jksoft 0:8468a4403fea 5 * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
jksoft 0:8468a4403fea 6 *
jksoft 0:8468a4403fea 7 * Licensees are granted free, non-transferable use of the information. NO
jksoft 0:8468a4403fea 8 * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
jksoft 0:8468a4403fea 9 * the file.
jksoft 0:8468a4403fea 10 */
jksoft 0:8468a4403fea 11
jksoft 0:8468a4403fea 12 /** @file
jksoft 0:8468a4403fea 13 *
jksoft 0:8468a4403fea 14 * @defgroup ble_sdk_srv_gls_db Glucose Database Service
jksoft 0:8468a4403fea 15 * @{
jksoft 0:8468a4403fea 16 * @ingroup ble_sdk_srv
jksoft 0:8468a4403fea 17 * @brief Glucose Service module.
jksoft 0:8468a4403fea 18 *
jksoft 0:8468a4403fea 19 * @details This module implements at database of stored glucose measurement values.
jksoft 0:8468a4403fea 20 *
jksoft 0:8468a4403fea 21 * @note Attention!
jksoft 0:8468a4403fea 22 * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile
jksoft 0:8468a4403fea 23 * qualification listings, These APIs must not be modified. However, the corresponding
jksoft 0:8468a4403fea 24 * functions' implementations can be modified.
jksoft 0:8468a4403fea 25 */
jksoft 0:8468a4403fea 26
jksoft 0:8468a4403fea 27 #ifndef BLE_GLS_DB_H__
jksoft 0:8468a4403fea 28 #define BLE_GLS_DB_H__
jksoft 0:8468a4403fea 29
jksoft 0:8468a4403fea 30 #include <stdint.h>
jksoft 0:8468a4403fea 31 #include "ble_gls.h"
jksoft 0:8468a4403fea 32
jksoft 0:8468a4403fea 33 #define BLE_GLS_DB_MAX_RECORDS 20
jksoft 0:8468a4403fea 34
jksoft 0:8468a4403fea 35 /**@brief Function for initializing the glucose record database.
jksoft 0:8468a4403fea 36 *
jksoft 0:8468a4403fea 37 * @details This call initializes the database holding glucose records.
jksoft 0:8468a4403fea 38 *
jksoft 0:8468a4403fea 39 * @return NRF_SUCCESS on success.
jksoft 0:8468a4403fea 40 */
jksoft 0:8468a4403fea 41 uint32_t ble_gls_db_init(void);
jksoft 0:8468a4403fea 42
jksoft 0:8468a4403fea 43 /**@brief Function for getting the number of records in the database.
jksoft 0:8468a4403fea 44 *
jksoft 0:8468a4403fea 45 * @details This call returns the number of records in the database.
jksoft 0:8468a4403fea 46 *
jksoft 0:8468a4403fea 47 * @return Number of records in the database.
jksoft 0:8468a4403fea 48 */
jksoft 0:8468a4403fea 49 uint16_t ble_gls_db_num_records_get(void);
jksoft 0:8468a4403fea 50
jksoft 0:8468a4403fea 51 /**@brief Function for getting a record from the database.
jksoft 0:8468a4403fea 52 *
jksoft 0:8468a4403fea 53 * @details This call returns a specified record from the database.
jksoft 0:8468a4403fea 54 *
jksoft 0:8468a4403fea 55 * @param[in] record_num Index of the record to retrieve.
jksoft 0:8468a4403fea 56 * @param[out] p_rec Pointer to record structure where retrieved record is copied to.
jksoft 0:8468a4403fea 57 *
jksoft 0:8468a4403fea 58 * @return NRF_SUCCESS on success.
jksoft 0:8468a4403fea 59 */
jksoft 0:8468a4403fea 60 uint32_t ble_gls_db_record_get(uint8_t record_num, ble_gls_rec_t * p_rec);
jksoft 0:8468a4403fea 61
jksoft 0:8468a4403fea 62 /**@brief Function for adding a record at the end of the database.
jksoft 0:8468a4403fea 63 *
jksoft 0:8468a4403fea 64 * @details This call adds a record as the last record in the database.
jksoft 0:8468a4403fea 65 *
jksoft 0:8468a4403fea 66 * @param[in] p_rec Pointer to record to add to database.
jksoft 0:8468a4403fea 67 *
jksoft 0:8468a4403fea 68 * @return NRF_SUCCESS on success.
jksoft 0:8468a4403fea 69 */
jksoft 0:8468a4403fea 70 uint32_t ble_gls_db_record_add(ble_gls_rec_t * p_rec);
jksoft 0:8468a4403fea 71
jksoft 0:8468a4403fea 72 /**@brief Function for deleting a database entry.
jksoft 0:8468a4403fea 73 *
jksoft 0:8468a4403fea 74 * @details This call deletes an record from the database.
jksoft 0:8468a4403fea 75 *
jksoft 0:8468a4403fea 76 * @param[in] record_num Index of record to delete.
jksoft 0:8468a4403fea 77 *
jksoft 0:8468a4403fea 78 * @return NRF_SUCCESS on success.
jksoft 0:8468a4403fea 79 */
jksoft 0:8468a4403fea 80 uint32_t ble_gls_db_record_delete(uint8_t record_num);
jksoft 0:8468a4403fea 81
jksoft 0:8468a4403fea 82 #endif // BLE_GLS_DB_H__
jksoft 0:8468a4403fea 83
jksoft 0:8468a4403fea 84 /** @} */
jksoft 0:8468a4403fea 85
jksoft 0:8468a4403fea 86 /** @endcond */