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.
Dependencies: mbed
Fork of mbed_fota by
Bluetooth Low Energy based Firmware Over The Air with Mbed. Mbed part is a external processor of the IoT devices and communicate with a Bluetooth module. The Bluetooth module have to support BLE and implement BLE FOTA profile designed by ours. BLE FOTA profile specification is available from our GIT hub wiki.
dialog_fota/diss_task.h@10:18044afe4364, 2015-08-24 (annotated)
- Committer:
 - dudnwjs
 - Date:
 - Mon Aug 24 03:11:00 2015 +0000
 - Revision:
 - 10:18044afe4364
 - Parent:
 - 9:fcf91f563147
 
Add header comment;
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| dudnwjs | 10:18044afe4364 | 1 | /** | 
| dudnwjs | 10:18044afe4364 | 2 | * @file diss_task.h | 
| dudnwjs | 10:18044afe4364 | 3 | * @brief Device Information Service Server Header. | 
| dudnwjs | 10:18044afe4364 | 4 | * Copyright 2015 SEVENCORE Co., Ltd. | 
| dudnwjs | 10:18044afe4364 | 5 | * | 
| dudnwjs | 10:18044afe4364 | 6 | * @author HyeongJun Kim | 
| dudnwjs | 10:18044afe4364 | 7 | * @version 1.0.0 | 
| dudnwjs | 10:18044afe4364 | 8 | * @date 2015-08-20 | 
| dudnwjs | 10:18044afe4364 | 9 | */ | 
| dudnwjs | 4:60be78a172c2 | 10 | #ifndef DISS_TASK_H | 
| dudnwjs | 4:60be78a172c2 | 11 | #define DISS_TASK_H | 
| dudnwjs | 4:60be78a172c2 | 12 | |
| dudnwjs | 9:fcf91f563147 | 13 | /** | 
| dudnwjs | 9:fcf91f563147 | 14 | **************************************************************************************** | 
| dudnwjs | 9:fcf91f563147 | 15 | * @addtogroup dialog_fota module | 
| dudnwjs | 9:fcf91f563147 | 16 | * @brief Device Information Service Server Header | 
| dudnwjs | 9:fcf91f563147 | 17 | * | 
| dudnwjs | 9:fcf91f563147 | 18 | * @{ | 
| dudnwjs | 9:fcf91f563147 | 19 | **************************************************************************************** | 
| dudnwjs | 9:fcf91f563147 | 20 | */ | 
| dudnwjs | 4:60be78a172c2 | 21 | namespace sevencore_fota{ | 
| dudnwjs | 4:60be78a172c2 | 22 | |
| dudnwjs | 5:e11b23f9aacc | 23 | #define STR_MAX_LEN (18) | 
| dudnwjs | 5:e11b23f9aacc | 24 | |
| dudnwjs | 4:60be78a172c2 | 25 | |
| dudnwjs | 4:60be78a172c2 | 26 | ///Attribute Table Indexes | 
| dudnwjs | 4:60be78a172c2 | 27 | enum | 
| dudnwjs | 4:60be78a172c2 | 28 | { | 
| dudnwjs | 4:60be78a172c2 | 29 | DIS_MANUFACTURER_NAME_CHAR, | 
| dudnwjs | 4:60be78a172c2 | 30 | DIS_MODEL_NB_STR_CHAR, | 
| dudnwjs | 4:60be78a172c2 | 31 | DIS_SERIAL_NB_STR_CHAR, | 
| dudnwjs | 4:60be78a172c2 | 32 | DIS_HARD_REV_STR_CHAR, | 
| dudnwjs | 4:60be78a172c2 | 33 | DIS_FIRM_REV_STR_CHAR, | 
| dudnwjs | 4:60be78a172c2 | 34 | DIS_SW_REV_STR_CHAR, | 
| dudnwjs | 4:60be78a172c2 | 35 | DIS_SYSTEM_ID_CHAR, | 
| dudnwjs | 4:60be78a172c2 | 36 | DIS_IEEE_CHAR, | 
| dudnwjs | 4:60be78a172c2 | 37 | DIS_PNP_ID_CHAR, | 
| dudnwjs | 4:60be78a172c2 | 38 | |
| dudnwjs | 4:60be78a172c2 | 39 | DIS_CHAR_MAX, | 
| dudnwjs | 4:60be78a172c2 | 40 | }; | 
| dudnwjs | 4:60be78a172c2 | 41 | |
| dudnwjs | 4:60be78a172c2 | 42 | |
| dudnwjs | 4:60be78a172c2 | 43 | /// Messages for Device Information Service Server | 
| dudnwjs | 4:60be78a172c2 | 44 | enum | 
| dudnwjs | 4:60be78a172c2 | 45 | { | 
| dudnwjs | 4:60be78a172c2 | 46 | ///Add a DIS instance into the database | 
| dudnwjs | 4:60be78a172c2 | 47 | DISS_CREATE_DB_REQ = 28672, | 
| dudnwjs | 4:60be78a172c2 | 48 | ///Inform APP of database creation status | 
| dudnwjs | 4:60be78a172c2 | 49 | DISS_CREATE_DB_CFM, | 
| dudnwjs | 4:60be78a172c2 | 50 | ///Set the value of an attribute | 
| dudnwjs | 4:60be78a172c2 | 51 | DISS_SET_CHAR_VAL_REQ, | 
| dudnwjs | 4:60be78a172c2 | 52 | |
| dudnwjs | 4:60be78a172c2 | 53 | ///Start the Device Information Service Task - at connection | 
| dudnwjs | 4:60be78a172c2 | 54 | DISS_ENABLE_REQ, | 
| dudnwjs | 4:60be78a172c2 | 55 | |
| dudnwjs | 4:60be78a172c2 | 56 | /// Inform the application that the profile service role task has been disabled after a disconnection | 
| dudnwjs | 4:60be78a172c2 | 57 | DISS_DISABLE_IND, | 
| dudnwjs | 4:60be78a172c2 | 58 | |
| dudnwjs | 4:60be78a172c2 | 59 | ///Error indication to Host | 
| dudnwjs | 4:60be78a172c2 | 60 | DISS_ERROR_IND, | 
| dudnwjs | 4:60be78a172c2 | 61 | }; | 
| dudnwjs | 4:60be78a172c2 | 62 | |
| dudnwjs | 4:60be78a172c2 | 63 | ///Database Configuration Flags | 
| dudnwjs | 4:60be78a172c2 | 64 | enum | 
| dudnwjs | 4:60be78a172c2 | 65 | { | 
| dudnwjs | 4:60be78a172c2 | 66 | ///Indicate if Manufacturer Name String Char. is supported | 
| dudnwjs | 4:60be78a172c2 | 67 | DIS_MANUFACTURER_NAME_CHAR_SUP = 0x0001, | 
| dudnwjs | 4:60be78a172c2 | 68 | ///Indicate if Model Number String Char. is supported | 
| dudnwjs | 4:60be78a172c2 | 69 | DIS_MODEL_NB_STR_CHAR_SUP = 0x0002, | 
| dudnwjs | 4:60be78a172c2 | 70 | ///Indicate if Serial Number String Char. is supported | 
| dudnwjs | 4:60be78a172c2 | 71 | DIS_SERIAL_NB_STR_CHAR_SUP = 0x0004, | 
| dudnwjs | 4:60be78a172c2 | 72 | ///Indicate if Hardware Revision String Char. supports indications | 
| dudnwjs | 4:60be78a172c2 | 73 | DIS_HARD_REV_STR_CHAR_SUP = 0x0008, | 
| dudnwjs | 4:60be78a172c2 | 74 | ///Indicate if Firmware Revision String Char. is writable | 
| dudnwjs | 4:60be78a172c2 | 75 | DIS_FIRM_REV_STR_CHAR_SUP = 0x0010, | 
| dudnwjs | 4:60be78a172c2 | 76 | ///Indicate if Software Revision String Char. is writable | 
| dudnwjs | 4:60be78a172c2 | 77 | DIS_SW_REV_STR_CHAR_SUP = 0x0020, | 
| dudnwjs | 4:60be78a172c2 | 78 | ///Indicate if System ID Char. is writable | 
| dudnwjs | 4:60be78a172c2 | 79 | DIS_SYSTEM_ID_CHAR_SUP = 0x0040, | 
| dudnwjs | 4:60be78a172c2 | 80 | ///Indicate if IEEE Char. is writable | 
| dudnwjs | 4:60be78a172c2 | 81 | DIS_IEEE_CHAR_SUP = 0x0080, | 
| dudnwjs | 4:60be78a172c2 | 82 | ///Indicate if PnP ID Char. is writable | 
| dudnwjs | 4:60be78a172c2 | 83 | DIS_PNP_ID_CHAR_SUP = 0x0100, | 
| dudnwjs | 4:60be78a172c2 | 84 | |
| dudnwjs | 4:60be78a172c2 | 85 | ///All features are supported | 
| dudnwjs | 4:60be78a172c2 | 86 | DIS_ALL_FEAT_SUP = 0x01FF, | 
| dudnwjs | 4:60be78a172c2 | 87 | }; | 
| dudnwjs | 4:60be78a172c2 | 88 | |
| dudnwjs | 4:60be78a172c2 | 89 | /// Parameters of the @ref DISS_CREATE_DB_CFM message | 
| dudnwjs | 4:60be78a172c2 | 90 | struct diss_create_db_cfm | 
| dudnwjs | 4:60be78a172c2 | 91 | { | 
| dudnwjs | 4:60be78a172c2 | 92 | ///Status | 
| dudnwjs | 4:60be78a172c2 | 93 | uint8_t status; | 
| dudnwjs | 4:60be78a172c2 | 94 | }; | 
| dudnwjs | 4:60be78a172c2 | 95 | |
| dudnwjs | 4:60be78a172c2 | 96 | /// Parameters of the @ref DISS_SET_CHAR_VAL_REQ message - shall be dynamically allocated | 
| dudnwjs | 4:60be78a172c2 | 97 | struct diss_set_char_val_req | 
| dudnwjs | 4:60be78a172c2 | 98 | { | 
| dudnwjs | 4:60be78a172c2 | 99 | /// Characteristic Code | 
| dudnwjs | 4:60be78a172c2 | 100 | uint8_t char_code; | 
| dudnwjs | 4:60be78a172c2 | 101 | /// Value length | 
| dudnwjs | 4:60be78a172c2 | 102 | uint8_t val_len; | 
| dudnwjs | 4:60be78a172c2 | 103 | /// Value | 
| dudnwjs | 5:e11b23f9aacc | 104 | uint8_t val[STR_MAX_LEN]; | 
| dudnwjs | 4:60be78a172c2 | 105 | }; | 
| dudnwjs | 4:60be78a172c2 | 106 | |
| dudnwjs | 4:60be78a172c2 | 107 | /// Parameters of the @ref DISS_CREATE_DB_REQ message | 
| dudnwjs | 4:60be78a172c2 | 108 | struct diss_create_db_req | 
| dudnwjs | 4:60be78a172c2 | 109 | { | 
| dudnwjs | 4:60be78a172c2 | 110 | ///Database configuration | 
| dudnwjs | 4:60be78a172c2 | 111 | uint16_t features; | 
| dudnwjs | 4:60be78a172c2 | 112 | }; | 
| dudnwjs | 4:60be78a172c2 | 113 | |
| dudnwjs | 5:e11b23f9aacc | 114 | /// Parameters of the @ref DISS_ENABLE_REQ message | 
| dudnwjs | 5:e11b23f9aacc | 115 | struct diss_enable_req | 
| dudnwjs | 5:e11b23f9aacc | 116 | { | 
| dudnwjs | 5:e11b23f9aacc | 117 | ///Connection handle | 
| dudnwjs | 5:e11b23f9aacc | 118 | uint16_t conhdl; | 
| dudnwjs | 5:e11b23f9aacc | 119 | /// security level: b0= nothing, b1=unauthenticated, b2=authenticated, b3=authorized; b1 or b2 and b3 can go together | 
| dudnwjs | 5:e11b23f9aacc | 120 | uint8_t sec_lvl; | 
| dudnwjs | 5:e11b23f9aacc | 121 | ///Type of connection | 
| dudnwjs | 5:e11b23f9aacc | 122 | uint8_t con_type; | 
| dudnwjs | 5:e11b23f9aacc | 123 | }; | 
| dudnwjs | 5:e11b23f9aacc | 124 | |
| dudnwjs | 4:60be78a172c2 | 125 | }//namespace | 
| dudnwjs | 4:60be78a172c2 | 126 | |
| dudnwjs | 9:fcf91f563147 | 127 | /// @} dialog_fota module | 
| dudnwjs | 9:fcf91f563147 | 128 | |
| dudnwjs | 4:60be78a172c2 | 129 | #endif//DISS_TASK_H | 
