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