兼容金川中心灌区代码
This commit is contained in:
1 parent
f8591b8b99
commit
3a537f633c
14 files changed
+217
-62
No files matched your search
+38
-5
@@ -3,8 +3,10 @@
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
|
||||
#define SLUICE_COUTN 1// 当前处理几口闸
|
||||
#define WATER_COUTN 6// 当前接入n个流量计
|
||||
|
||||
#define SUBTOPIC_COUNT 1 // 订阅topic 数量
|
||||
#define SLUCIE_EXEC_COUNT 20// 闸门异常时间
|
||||
|
||||
@@ -13,6 +15,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
extern uint32_t g_ifconfig;
|
||||
extern uint32_t g_ifupdate;
|
||||
|
||||
@@ -78,18 +83,37 @@ typedef struct SysData_t
|
||||
int fileSize; // 文件大小
|
||||
} SysData_t;
|
||||
|
||||
typedef struct SOFTRTC_t
|
||||
{
|
||||
uint8_t year;
|
||||
uint8_t month;
|
||||
uint8_t day;
|
||||
uint8_t hour;
|
||||
uint8_t minutes;
|
||||
uint8_t second;
|
||||
}SOFTRTC_t;
|
||||
|
||||
|
||||
|
||||
|
||||
// 水量参数
|
||||
typedef struct InclinometerData_t
|
||||
{
|
||||
uint8_t dir; // 方向
|
||||
uint32_t data;// 数据
|
||||
} InclinometerData_t;
|
||||
|
||||
|
||||
// 测斜数据
|
||||
typedef struct WaterData_t
|
||||
{
|
||||
int64_t ttWater; // 累计流量 单位 m3
|
||||
int32_t thisFlow; // 瞬时流量 单位 m3
|
||||
int32_t thisLevel; // 水位
|
||||
int32_t thisSpeed; // 流速
|
||||
int64_t ttWater; // 累计流量 单位 m3
|
||||
int32_t thisFlow; // 瞬时流量 单位 m3
|
||||
int32_t thisLevel; // 水位
|
||||
int32_t thisSpeed; // 流速
|
||||
int32_t thisPress; // 压力
|
||||
int32_t thisTemp; // 温度
|
||||
int retry ; // 重试次数
|
||||
} WaterData_t;
|
||||
|
||||
|
||||
@@ -111,6 +135,8 @@ typedef enum MotorType_t
|
||||
MT_DY_V100, // 大禹锥型阀
|
||||
MT_KG_V100, // 开关量模块
|
||||
MT_KR_V100, // 徐州正天闸位计
|
||||
MT_ASC_A3, // A3驱动器
|
||||
MT_ASC_WS, // 金昌无刷电机
|
||||
} MotorType_t;
|
||||
|
||||
typedef enum S4851Type_t
|
||||
@@ -132,6 +158,7 @@ typedef enum S4852Type_t
|
||||
ST_ZK_JSZK, // 精水中科多普勒
|
||||
ST_DJX_100, // 丁家峡闸门 读取开度
|
||||
ST_RDS_300, // 雷达流量计
|
||||
ST_MI_600, // 鹦鸽嘴测斜仪
|
||||
} S4852Type_t;
|
||||
|
||||
|
||||
@@ -151,7 +178,8 @@ typedef enum SiteType_t
|
||||
SiteSee, // 渗流渗压站
|
||||
SiteColl, // 采集站
|
||||
SiteServer, // 串口服务器
|
||||
SiteLevel // 水位站
|
||||
SiteLevel, // 水位站
|
||||
SiteSkew // 测斜仪
|
||||
}SiteType_t;
|
||||
|
||||
|
||||
@@ -167,6 +195,7 @@ typedef enum DownDataType_t
|
||||
DownReboot = 7, // 重启
|
||||
DownConfig = 8, // 修改参数
|
||||
DownRead = 9, // 读取参数
|
||||
DownFact = 10, // 读取参数
|
||||
}DownDataType_t;
|
||||
|
||||
|
||||
@@ -185,9 +214,11 @@ typedef struct TypeIndexMail_t
|
||||
|
||||
extern SluiceData_t SluiceData[SLUICE_COUTN];
|
||||
extern WaterData_t WaterData[WATER_COUTN];
|
||||
extern InclinometerData_t IncData[6];
|
||||
extern SysData_t SysData;
|
||||
extern const WaterLeveInfo_t LeveInfo;
|
||||
extern const ParShallInfo_t ParShallTale[];
|
||||
extern SOFTRTC_t g_SoftRtc;
|
||||
|
||||
|
||||
int cMotorGetType (char * str);
|
||||
@@ -208,6 +239,8 @@ int cDownType2Index(char * str);
|
||||
int cSiteType2Index(char * str);
|
||||
|
||||
|
||||
void *GetVersion(void);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user