OCT 1. 更新格式化代码

This commit is contained in:
huangxin 2022-12-02 14:42:37 +08:00
parent abd393322d
commit 7278f278c8
13 changed files with 24 additions and 24 deletions

View File

@ -62,7 +62,7 @@ int init_hardware() {
* CPU_INFO json * CPU_INFO json
***************************************************************/ ***************************************************************/
static cJSON *struct_to_json_CPU_DESC(void *pObj) { static cJSON *struct_to_json_CPU_DESC(void *pObj) {
PCPU_DESC pCpuDesc = (PCPU_DESC)pObj;//&((PCPU_INFO)pObj)->cpuCoreDesc; PCPU_DESC pCpuDesc = (PCPU_DESC)pObj; //&((PCPU_INFO)pObj)->cpuCoreDesc;
s2j_create_json_obj(pJsonObj); s2j_create_json_obj(pJsonObj);
s2j_json_set_basic_element(pJsonObj, pCpuDesc, int, cpuSpeed); s2j_json_set_basic_element(pJsonObj, pCpuDesc, int, cpuSpeed);
@ -72,7 +72,7 @@ static cJSON *struct_to_json_CPU_DESC(void *pObj) {
} }
static cJSON *struct_to_json_CPU_INFO(void *pObj) { static cJSON *struct_to_json_CPU_INFO(void *pObj) {
PCPU_INFO pCpuInfo = (PCPU_INFO)pObj;//&((PHARDWARE_INFO)pObj)->cpuInfo; PCPU_INFO pCpuInfo = (PCPU_INFO)pObj; //&((PHARDWARE_INFO)pObj)->cpuInfo;
s2j_create_json_obj(pJsonObj); s2j_create_json_obj(pJsonObj);
s2j_json_set_basic_element(pJsonObj, pCpuInfo, int, nCores); s2j_json_set_basic_element(pJsonObj, pCpuInfo, int, nCores);

View File

@ -19,7 +19,7 @@
typedef struct { typedef struct {
char name[MAX_SENSOR_STR]; ///< 传感器名称 char name[MAX_SENSOR_STR]; ///< 传感器名称
char valUnit[MAX_SENSOR_STR];///< 传感器值单位 char valUnit[MAX_SENSOR_STR]; ///< 传感器值单位
char value[MAX_SENSOR_STR]; ///< 传感器值, >=0: 正常值, <0: 错误码 char value[MAX_SENSOR_STR]; ///< 传感器值, >=0: 正常值, <0: 错误码
char lnr[MAX_SENSOR_STR]; ///< Lower Non-Recoverable char lnr[MAX_SENSOR_STR]; ///< Lower Non-Recoverable
char lc[MAX_SENSOR_STR]; ///< Lower Critical char lc[MAX_SENSOR_STR]; ///< Lower Critical

View File

@ -5,4 +5,4 @@
#ifndef DAEMON_AGENT__AGENT_MAIN_H #ifndef DAEMON_AGENT__AGENT_MAIN_H
#define DAEMON_AGENT__AGENT_MAIN_H #define DAEMON_AGENT__AGENT_MAIN_H
#endif//DAEMON_AGENT__AGENT_MAIN_H #endif //DAEMON_AGENT__AGENT_MAIN_H

View File

@ -15,4 +15,4 @@ void banner_show();
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif//DAEMON_AGENT_BANNER_BANNER_H #endif //DAEMON_AGENT_BANNER_BANNER_H

View File

@ -13,4 +13,4 @@ int menu_run(int argc, char **argv);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif//DAEMON_AGENT_PROJECT_AGENT_INCLUDE_CMDLINE_H #endif //DAEMON_AGENT_PROJECT_AGENT_INCLUDE_CMDLINE_H

View File

@ -15,4 +15,4 @@ void db_mysql_uninit();
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif//DAEMON_AGENT_PROJECT_AGENT_INCLUDE_DATABASE_H #endif //DAEMON_AGENT_PROJECT_AGENT_INCLUDE_DATABASE_H

View File

@ -100,4 +100,4 @@ int get_sensor_info(PSENSOR_INFO pInfo);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif//DAEMON_AGENT_PROJECT_AGENT_INCLUDE_HARDWARE_H #endif //DAEMON_AGENT_PROJECT_AGENT_INCLUDE_HARDWARE_H

View File

@ -12,4 +12,4 @@ int http_svr_init();
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif//VCPE_PROJECT_HTTP_SVR_H #endif //VCPE_PROJECT_HTTP_SVR_H

View File

@ -13,4 +13,4 @@ void user_uninit();
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif//DAEMON_AGENT_PROJECT_AGENT_INIT_INIT_H #endif //DAEMON_AGENT_PROJECT_AGENT_INIT_INIT_H

View File

@ -27,4 +27,4 @@ void *get_mq_context(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif//DAEMON_AGENT_PROJECT_AGENT_MQ_MSG_QUEUE_H #endif //DAEMON_AGENT_PROJECT_AGENT_MQ_MSG_QUEUE_H

View File

@ -23,4 +23,4 @@ int task_add_exit_event_handler(system_exit_cb cb, void *userdata);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif//DAEMON_AGENT_TASK_TASK_MANAGER_H #endif //DAEMON_AGENT_TASK_TASK_MANAGER_H

View File

@ -89,4 +89,4 @@ typedef enum {
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif//DAEMON_AGENT_INCLUDE_USER_ERRNO_H #endif //DAEMON_AGENT_INCLUDE_USER_ERRNO_H

View File

@ -30,7 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "utarray.h"// for "UT_icd" #include "utarray.h" // for "UT_icd"
typedef struct { typedef struct {
unsigned i; /* index of next available slot; wraps at n */ unsigned i; /* index of next available slot; wraps at n */