Fan Control Demo

Dependencies:   mbed-rtos mbed

Fork of mbed_fota by KIM HyoengJun

Committer:
dudnwjs
Date:
Wed Jun 24 08:50:07 2015 +0000
Revision:
4:60be78a172c2
Child:
5:e11b23f9aacc
Add advertising feature;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dudnwjs 4:60be78a172c2 1 #ifndef DISS_TASK_H
dudnwjs 4:60be78a172c2 2 #define DISS_TASK_H
dudnwjs 4:60be78a172c2 3
dudnwjs 4:60be78a172c2 4
dudnwjs 4:60be78a172c2 5
dudnwjs 4:60be78a172c2 6 namespace sevencore_fota{
dudnwjs 4:60be78a172c2 7
dudnwjs 4:60be78a172c2 8
dudnwjs 4:60be78a172c2 9 ///Attribute Table Indexes
dudnwjs 4:60be78a172c2 10 enum
dudnwjs 4:60be78a172c2 11 {
dudnwjs 4:60be78a172c2 12 DIS_MANUFACTURER_NAME_CHAR,
dudnwjs 4:60be78a172c2 13 DIS_MODEL_NB_STR_CHAR,
dudnwjs 4:60be78a172c2 14 DIS_SERIAL_NB_STR_CHAR,
dudnwjs 4:60be78a172c2 15 DIS_HARD_REV_STR_CHAR,
dudnwjs 4:60be78a172c2 16 DIS_FIRM_REV_STR_CHAR,
dudnwjs 4:60be78a172c2 17 DIS_SW_REV_STR_CHAR,
dudnwjs 4:60be78a172c2 18 DIS_SYSTEM_ID_CHAR,
dudnwjs 4:60be78a172c2 19 DIS_IEEE_CHAR,
dudnwjs 4:60be78a172c2 20 DIS_PNP_ID_CHAR,
dudnwjs 4:60be78a172c2 21
dudnwjs 4:60be78a172c2 22 DIS_CHAR_MAX,
dudnwjs 4:60be78a172c2 23 };
dudnwjs 4:60be78a172c2 24
dudnwjs 4:60be78a172c2 25
dudnwjs 4:60be78a172c2 26 /// Messages for Device Information Service Server
dudnwjs 4:60be78a172c2 27 enum
dudnwjs 4:60be78a172c2 28 {
dudnwjs 4:60be78a172c2 29 ///Add a DIS instance into the database
dudnwjs 4:60be78a172c2 30 DISS_CREATE_DB_REQ = 28672,
dudnwjs 4:60be78a172c2 31 ///Inform APP of database creation status
dudnwjs 4:60be78a172c2 32 DISS_CREATE_DB_CFM,
dudnwjs 4:60be78a172c2 33 ///Set the value of an attribute
dudnwjs 4:60be78a172c2 34 DISS_SET_CHAR_VAL_REQ,
dudnwjs 4:60be78a172c2 35
dudnwjs 4:60be78a172c2 36 ///Start the Device Information Service Task - at connection
dudnwjs 4:60be78a172c2 37 DISS_ENABLE_REQ,
dudnwjs 4:60be78a172c2 38
dudnwjs 4:60be78a172c2 39 /// Inform the application that the profile service role task has been disabled after a disconnection
dudnwjs 4:60be78a172c2 40 DISS_DISABLE_IND,
dudnwjs 4:60be78a172c2 41
dudnwjs 4:60be78a172c2 42 ///Error indication to Host
dudnwjs 4:60be78a172c2 43 DISS_ERROR_IND,
dudnwjs 4:60be78a172c2 44 };
dudnwjs 4:60be78a172c2 45
dudnwjs 4:60be78a172c2 46 ///Database Configuration Flags
dudnwjs 4:60be78a172c2 47 enum
dudnwjs 4:60be78a172c2 48 {
dudnwjs 4:60be78a172c2 49 ///Indicate if Manufacturer Name String Char. is supported
dudnwjs 4:60be78a172c2 50 DIS_MANUFACTURER_NAME_CHAR_SUP = 0x0001,
dudnwjs 4:60be78a172c2 51 ///Indicate if Model Number String Char. is supported
dudnwjs 4:60be78a172c2 52 DIS_MODEL_NB_STR_CHAR_SUP = 0x0002,
dudnwjs 4:60be78a172c2 53 ///Indicate if Serial Number String Char. is supported
dudnwjs 4:60be78a172c2 54 DIS_SERIAL_NB_STR_CHAR_SUP = 0x0004,
dudnwjs 4:60be78a172c2 55 ///Indicate if Hardware Revision String Char. supports indications
dudnwjs 4:60be78a172c2 56 DIS_HARD_REV_STR_CHAR_SUP = 0x0008,
dudnwjs 4:60be78a172c2 57 ///Indicate if Firmware Revision String Char. is writable
dudnwjs 4:60be78a172c2 58 DIS_FIRM_REV_STR_CHAR_SUP = 0x0010,
dudnwjs 4:60be78a172c2 59 ///Indicate if Software Revision String Char. is writable
dudnwjs 4:60be78a172c2 60 DIS_SW_REV_STR_CHAR_SUP = 0x0020,
dudnwjs 4:60be78a172c2 61 ///Indicate if System ID Char. is writable
dudnwjs 4:60be78a172c2 62 DIS_SYSTEM_ID_CHAR_SUP = 0x0040,
dudnwjs 4:60be78a172c2 63 ///Indicate if IEEE Char. is writable
dudnwjs 4:60be78a172c2 64 DIS_IEEE_CHAR_SUP = 0x0080,
dudnwjs 4:60be78a172c2 65 ///Indicate if PnP ID Char. is writable
dudnwjs 4:60be78a172c2 66 DIS_PNP_ID_CHAR_SUP = 0x0100,
dudnwjs 4:60be78a172c2 67
dudnwjs 4:60be78a172c2 68 ///All features are supported
dudnwjs 4:60be78a172c2 69 DIS_ALL_FEAT_SUP = 0x01FF,
dudnwjs 4:60be78a172c2 70 };
dudnwjs 4:60be78a172c2 71
dudnwjs 4:60be78a172c2 72 /// Parameters of the @ref DISS_CREATE_DB_CFM message
dudnwjs 4:60be78a172c2 73 struct diss_create_db_cfm
dudnwjs 4:60be78a172c2 74 {
dudnwjs 4:60be78a172c2 75 ///Status
dudnwjs 4:60be78a172c2 76 uint8_t status;
dudnwjs 4:60be78a172c2 77 };
dudnwjs 4:60be78a172c2 78
dudnwjs 4:60be78a172c2 79 /// Parameters of the @ref DISS_SET_CHAR_VAL_REQ message - shall be dynamically allocated
dudnwjs 4:60be78a172c2 80 struct diss_set_char_val_req
dudnwjs 4:60be78a172c2 81 {
dudnwjs 4:60be78a172c2 82 /// Characteristic Code
dudnwjs 4:60be78a172c2 83 uint8_t char_code;
dudnwjs 4:60be78a172c2 84 /// Value length
dudnwjs 4:60be78a172c2 85 uint8_t val_len;
dudnwjs 4:60be78a172c2 86 /// Value
dudnwjs 4:60be78a172c2 87 uint8_t val[18];
dudnwjs 4:60be78a172c2 88 };
dudnwjs 4:60be78a172c2 89
dudnwjs 4:60be78a172c2 90 /// Parameters of the @ref DISS_CREATE_DB_REQ message
dudnwjs 4:60be78a172c2 91 struct diss_create_db_req
dudnwjs 4:60be78a172c2 92 {
dudnwjs 4:60be78a172c2 93 ///Database configuration
dudnwjs 4:60be78a172c2 94 uint16_t features;
dudnwjs 4:60be78a172c2 95 };
dudnwjs 4:60be78a172c2 96
dudnwjs 4:60be78a172c2 97 }//namespace
dudnwjs 4:60be78a172c2 98
dudnwjs 4:60be78a172c2 99 #endif//DISS_TASK_H