diff --git a/.cproject b/.cproject index 8b7df81..b9a3ee0 100644 --- a/.cproject +++ b/.cproject @@ -115,6 +115,7 @@ + diff --git a/common/common_func.cpp b/common/common_func.cpp index 1ea3697..6e36a3c 100644 --- a/common/common_func.cpp +++ b/common/common_func.cpp @@ -363,7 +363,7 @@ int CheckFileVersion(int argc, char **argv) { return 0; } -int config_uart(const char *Port, speed_t speed) { +int config_uart(const char *Port, int speed) { int iFd = open(Port, O_RDWR | O_NOCTTY); if (iFd < 0) { return -1; diff --git a/common/common_func.hpp b/common/common_func.hpp index a887f95..cb1b164 100644 --- a/common/common_func.hpp +++ b/common/common_func.hpp @@ -259,26 +259,25 @@ struct TopicList { //系统描述文件数据定义 typedef struct { - string siteID; // Unique ID for each site - string siteName; // Controller site name - string siteCountry; // Controller location country - string siteProvince; // province - string siteCity; // city + std::string siteID; // Unique ID for each site + std::string siteName; // Controller site name + std::string siteCountry; // Controller location country + std::string siteProvince; // province + std::string siteCity; // city double siteLongitude; // longitude double siteLatitude; // latitude - string siteTimeZone; - string plantName; // Unique plant number - string plantNo; - string equipmentName; // Equipment Description in the plant - string equipmentNo; - string dataWatchName; // DNS Name for the DataWatch + std::string siteTimeZone; + std::string plantName; // Unique plant number + std::string plantNo; + std::string equipmentName; // Equipment Description in the plant + std::string equipmentNo; + std::string dataWatchName; // DNS Name for the DataWatch long dataWachAddedDate; // Date of settings’ creation (Time Stamp) - string dataWatchAssetID; // Unique equipment Asset ID - string deviceType; - string dataWachAddedBy; // User who edited settings - string serialNumber; - string softVersion; - + std::string dataWatchAssetID; // Unique equipment Asset ID + std::string deviceType; + std::string dataWachAddedBy; // User who edited settings + std::string serialNumber; + std::string softVersion; } SystemInfo; typedef struct { @@ -306,7 +305,7 @@ typedef struct { int netResetNet1; } GPIOInfo; -typedef struct DataNodeUpdate { +struct DataNodeUpdate { std::string strUpdataFileName; std::string strSoftVersion; std::vector hwVersion; @@ -321,11 +320,11 @@ extern std::string GBKToUTF8(const std::string& strGBK); extern std::string UTFtoGBK(const char* utf8); extern void hexToAscii(const char* hexStr, char* asciiStr); extern void stringToHex(const char* str, char* hexStr); -extern string GetLocalTimeWithMs(void); +extern std::string GetLocalTimeWithMs(void); extern void InitGpio(unsigned int gpioN, unsigned int inout); extern int gpio_set(unsigned int gpioN, char x); extern int gpio_read(unsigned int gpioN); -extern int config_uart(const char* Port, speed_t speed); +extern int config_uart(const char* Port, int speed); extern int write_data(int fd, char* buff, int len); extern int read_data(int fd, char* buff, int len, int timeout); extern int ModifyMac(char* buff); @@ -498,7 +497,7 @@ extern int CloseWatchDog(int fd); //获取4G信号强度 extern int getcsq(); extern std::string GetGwIp_(const char* eth_name); -extern string GetOneContent(const char* szData, int nRow, const char* szSeparate); +extern std::string GetOneContent(const char* szData, int nRow, const char* szSeparate); extern int readStringValue(const char* section, char* key, char* val, const char* file); extern int writeStringVlaue(const char* section, char* key, char* val, const char* file); extern int readIntValue(const char* section, char* key, const char* file); diff --git a/common/global.hpp b/common/global.hpp index af09f93..2419b6f 100644 --- a/common/global.hpp +++ b/common/global.hpp @@ -9,7 +9,7 @@ #include "common_func.hpp" -#define SECTION_MAX_LEN 1024 +//#define SECTION_MAX_LEN 1024 //******************** 全局变量********************** enum enumZigBeeTransmitStatus { NO_ENTER_TRANSMITTING_STATUS = 0, diff --git a/wifi/wpa_client.h b/wifi/wpa_client.h index c05719c..83f62c6 100644 --- a/wifi/wpa_client.h +++ b/wifi/wpa_client.h @@ -10,7 +10,7 @@ #define __WPA_CLIENT_H__ #include #include -#include "../common/SH_global.h" +#include "common/global.hpp" namespace wifi { #ifdef G2UL_GATEWAY