modify a little.

This commit is contained in:
pandx 2024-10-22 21:07:10 +08:00
parent 96ec70c629
commit c5ef2bb575
5 changed files with 24 additions and 24 deletions

View File

@ -115,6 +115,7 @@
<option id="gnu.cpp.compiler.option.debugging.level.2146025035" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/> <option id="gnu.cpp.compiler.option.debugging.level.2146025035" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.1740362159" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath"> <option id="gnu.cpp.compiler.option.include.paths.1740362159" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="/home/chaos/WorkSpace/Tools/GatewayThirdParty/boost/include"/> <listOptionValue builtIn="false" value="/home/chaos/WorkSpace/Tools/GatewayThirdParty/boost/include"/>
<listOptionValue builtIn="false" value="/home/chaos/WorkSpace/WLG"/>
<listOptionValue builtIn="false" value="/home/chaos/WorkSpace/Tools/GatewayThirdParty/curl/include"/> <listOptionValue builtIn="false" value="/home/chaos/WorkSpace/Tools/GatewayThirdParty/curl/include"/>
<listOptionValue builtIn="false" value="/home/chaos/WorkSpace/Tools/GatewayThirdParty/fftw/include"/> <listOptionValue builtIn="false" value="/home/chaos/WorkSpace/Tools/GatewayThirdParty/fftw/include"/>
<listOptionValue builtIn="false" value="/home/chaos/WorkSpace/Tools/GatewayThirdParty/jsoncpp/include"/> <listOptionValue builtIn="false" value="/home/chaos/WorkSpace/Tools/GatewayThirdParty/jsoncpp/include"/>

View File

@ -363,7 +363,7 @@ int CheckFileVersion(int argc, char **argv) {
return 0; 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); int iFd = open(Port, O_RDWR | O_NOCTTY);
if (iFd < 0) { if (iFd < 0) {
return -1; return -1;

View File

@ -259,26 +259,25 @@ struct TopicList {
//系统描述文件数据定义 //系统描述文件数据定义
typedef struct { typedef struct {
string siteID; // Unique ID for each site std::string siteID; // Unique ID for each site
string siteName; // Controller site name std::string siteName; // Controller site name
string siteCountry; // Controller location country std::string siteCountry; // Controller location country
string siteProvince; // province std::string siteProvince; // province
string siteCity; // city std::string siteCity; // city
double siteLongitude; // longitude double siteLongitude; // longitude
double siteLatitude; // latitude double siteLatitude; // latitude
string siteTimeZone; std::string siteTimeZone;
string plantName; // Unique plant number std::string plantName; // Unique plant number
string plantNo; std::string plantNo;
string equipmentName; // Equipment Description in the plant std::string equipmentName; // Equipment Description in the plant
string equipmentNo; std::string equipmentNo;
string dataWatchName; // DNS Name for the DataWatch std::string dataWatchName; // DNS Name for the DataWatch
long dataWachAddedDate; // Date of settings creation (Time Stamp) long dataWachAddedDate; // Date of settings creation (Time Stamp)
string dataWatchAssetID; // Unique equipment Asset ID std::string dataWatchAssetID; // Unique equipment Asset ID
string deviceType; std::string deviceType;
string dataWachAddedBy; // User who edited settings std::string dataWachAddedBy; // User who edited settings
string serialNumber; std::string serialNumber;
string softVersion; std::string softVersion;
} SystemInfo; } SystemInfo;
typedef struct { typedef struct {
@ -306,7 +305,7 @@ typedef struct {
int netResetNet1; int netResetNet1;
} GPIOInfo; } GPIOInfo;
typedef struct DataNodeUpdate { struct DataNodeUpdate {
std::string strUpdataFileName; std::string strUpdataFileName;
std::string strSoftVersion; std::string strSoftVersion;
std::vector<std::string> hwVersion; std::vector<std::string> hwVersion;
@ -321,11 +320,11 @@ extern std::string GBKToUTF8(const std::string& strGBK);
extern std::string UTFtoGBK(const char* utf8); extern std::string UTFtoGBK(const char* utf8);
extern void hexToAscii(const char* hexStr, char* asciiStr); extern void hexToAscii(const char* hexStr, char* asciiStr);
extern void stringToHex(const char* str, char* hexStr); 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 void InitGpio(unsigned int gpioN, unsigned int inout);
extern int gpio_set(unsigned int gpioN, char x); extern int gpio_set(unsigned int gpioN, char x);
extern int gpio_read(unsigned int gpioN); 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 write_data(int fd, char* buff, int len);
extern int read_data(int fd, char* buff, int len, int timeout); extern int read_data(int fd, char* buff, int len, int timeout);
extern int ModifyMac(char* buff); extern int ModifyMac(char* buff);
@ -498,7 +497,7 @@ extern int CloseWatchDog(int fd);
//获取4G信号强度 //获取4G信号强度
extern int getcsq(); extern int getcsq();
extern std::string GetGwIp_(const char* eth_name); 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 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 writeStringVlaue(const char* section, char* key, char* val, const char* file);
extern int readIntValue(const char* section, char* key, const char* file); extern int readIntValue(const char* section, char* key, const char* file);

View File

@ -9,7 +9,7 @@
#include "common_func.hpp" #include "common_func.hpp"
#define SECTION_MAX_LEN 1024 //#define SECTION_MAX_LEN 1024
//******************** 全局变量********************** //******************** 全局变量**********************
enum enumZigBeeTransmitStatus { enum enumZigBeeTransmitStatus {
NO_ENTER_TRANSMITTING_STATUS = 0, NO_ENTER_TRANSMITTING_STATUS = 0,

View File

@ -10,7 +10,7 @@
#define __WPA_CLIENT_H__ #define __WPA_CLIENT_H__
#include <string> #include <string>
#include <sys/un.h> #include <sys/un.h>
#include "../common/SH_global.h" #include "common/global.hpp"
namespace wifi { namespace wifi {
#ifdef G2UL_GATEWAY #ifdef G2UL_GATEWAY