iOSのBLEコントローラアプリ「RCBController」と接続し、コントローラの操作を取得するサンプルプログラムです。 mbed HRM1017で動作を確認しています。 2014.08.20時点でのBLEライブラリに対応しました。

Dependencies:   BLE_API mbed

Fork of BLE_RCBController by Junichi Katsu

Committer:
jksoft
Date:
Wed Aug 20 13:41:01 2014 +0000
Revision:
4:ebda47d22091
Parent:
nRF51822/nordic/nrf-sdk/ble/ble_services/ble_gls_db.h@1:48f6e08a3ac2
?????????

Who changed what in which revision?

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