KIM HyoengJun / Mbed 2 deprecated mbed_fota_robot_control

Dependencies:   mbed-rtos mbed mbed_fota_fan_control

Fork of mbed_fota_lamp_control by KIM HyoengJun

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers fan_control_task.h Source File

fan_control_task.h

Go to the documentation of this file.
00001 /**
00002  * @file fan_control_task.h
00003  * @brief Fan Control Task Header.
00004  * Copyright 2015 SEVENCORE Co., Ltd.
00005  *
00006  * @author HyeongJun Kim 
00007  * @version 1.0.0  
00008  * @date 2015-08-24
00009 */
00010 
00011 #ifndef FAN_CONTROL_TASK_H_
00012 #define FAN_CONTROL_TASK_H_
00013 
00014 /*
00015  * INCLUDE FILES
00016  ****************************************************************************************
00017 */
00018 
00019 
00020 /**
00021  ****************************************************************************************
00022  * @addtogroup dialog_fota module
00023  * @brief Fota Server Task Header.
00024  *
00025  * @{
00026  ****************************************************************************************
00027  */
00028 namespace sevencore_fota{
00029 
00030 
00031 /*
00032  * DEFINES
00033  ****************************************************************************************
00034  */
00035 
00036 /// Maximum number of fota server task instances
00037 #define FAN_CONTROL_IDX_MAX                 (1)
00038 #define FAN_CONTROL_MIN_SIZE                (1)
00039 #define FAN_CONTROL_MAX_SIZE                (4)
00040 
00041 /*
00042  * ENUMERATIONS
00043  ****************************************************************************************
00044  */
00045  
00046 ///Attribue Table Indexes
00047 enum
00048 {
00049     FAN_CONTROL_POWER_STATE_CHAR,
00050     FAN_CONTROL_WIND_STRENGTH_CHAR,
00051     FAN_CONTROL_FAN_SPIN_CHAR,
00052     FAN_CONTROL_FAN_TIMER_CHAR,
00053     FAN_CONTROL_RESIDUAL_TIME_CHAR,
00054     
00055     FAN_CONTROL_CHAR_MAX,
00056 };
00057 
00058 /// Messages for Fota Server
00059 enum
00060 {
00061     /// Start fan_control. Device connection
00062     FAN_CONTROL_ENABLE_REQ = 56320,
00063     ///Create DataBase
00064     FAN_CONTROL_CREATE_DB_REQ,
00065     ///Inform APP of database creation status
00066     FAN_CONTROL_CREATE_DB_CFM,
00067     /// Disable confirm.
00068     FAN_CONTROL_DISABLE_IND,
00069     //Set Request of The Attribute Value of  Fota Service Characteristics  
00070     FAN_CONTROL_SET_CHAR_VAL_REQ,
00071     //Fan Control Command Indication
00072     FAN_CONTROL_COMMAND_IND,
00073     /// Error Indication
00074     FAN_CONTROL_ERROR_IND,
00075 };
00076 
00077 
00078 /*
00079  * API MESSAGES STRUCTURES
00080  ****************************************************************************************
00081  */
00082 
00083 
00084 /// Parameters of the @ref FAN_CONTROL_ENABLE_REQ message
00085 struct fan_control_enable_req
00086 
00087 {
00088     /// Connection Handle
00089     uint16_t conhdl;
00090     /// Security level
00091     uint8_t sec_lvl;
00092 };
00093 
00094 
00095 /// Parameters of the @ref FAN_CONTROL_CREATE_DB_REQ message
00096 struct fan_control_create_db_req
00097 {
00098     /// Indicate if TXPS is supported or not
00099     uint16_t features;   
00100 };
00101 
00102 
00103 /// Parameters of the @ref FAN_CONTROL_CREATE_DB_CFM message
00104 struct fan_control_create_db_cfm
00105 {
00106     /// Status
00107     uint8_t status;
00108 };
00109 
00110 
00111 /// Parameters of the @ref FAN_CONTROL_SET_CHAR_VAL_REQ message - shall be dynamically allocated
00112 struct fan_control_set_char_val_req
00113 {
00114     /// Characteristic Code
00115     uint8_t char_code;
00116     /// Value length
00117     uint8_t val_len;
00118     /// Value
00119     uint8_t val[4];
00120 };
00121 
00122 
00123 /// Parameters of the @ref FAN_CONTROL_DISABLE_IND message
00124 struct fan_control_disable_ind
00125 {
00126     /// Connection Handle
00127     uint16_t conhdl;
00128 };
00129 
00130 /// Parameters of the @ref FAN_CONTROL_COMMAND_IND message
00131 struct fan_control_command_ind
00132 {
00133     uint8_t char_code;
00134     uint8_t command;
00135     uint32_t residual_time;
00136 };
00137 
00138 
00139 }//namespace
00140 
00141 /// @} dialog_fota module
00142 #endif // FAN_CONTROL_TASK_H_