1、增加ExclCommUint_t结构体,用于排除指定通讯单元的MAC
2、修复了复位后重复定义各项参数的bug。只有从flash读取到的出厂标志位错误时,才会进入配置默认参数判断,否则会以从flash读取到的数据为配置参数 3、增加CheckCommUnitExcl函数,用于查询mac是否被排除 GateWay_Debug: 1、rs485配置函数增加了boot升级使能功能 2、增加了excu、exdel、exls命令,用于配置排除设备的增、删、查 3、para命令增加显示LpCfg参数 sx127x: 1、lora通道选择取消,通过修改频率来修改通道
This commit is contained in:
@@ -191,6 +191,11 @@ typedef struct {
|
||||
uint8_t ERTime; //紧急上报时长
|
||||
}__attribute__((packed))CommUnitPara_t, *CommUnitPara;
|
||||
|
||||
typedef struct {
|
||||
bool ExclFlag;
|
||||
uint8_t ExclMac[6];//需要排除的通讯单元MAC
|
||||
}__attribute__((packed))ExclCommUnit_t, *ExclCommUnit;
|
||||
|
||||
typedef struct {
|
||||
uint8_t Data[SENSOR_NUM_MAX][SENSOR_DATA_LEN_MAX];
|
||||
}__attribute__((packed))CommUnitData_t, *CommUnitData;
|
||||
@@ -251,6 +256,7 @@ typedef struct {
|
||||
uint32_t SvrPort; //服务器端口
|
||||
uint32_t CommUnitReadInterval; //通讯单元读取时间间隔,单位S
|
||||
CommUnitPara_t CommUnitArray[COMMUNIT_NUM_MAX]; //注册的通讯单元信息
|
||||
ExclCommUnit_t ExclCommUnit[COMMUNIT_NUM_MAX]; //排除的通讯单元信息
|
||||
RS485Para_t Rs485Ch1; //RS485通道1配置
|
||||
RS485Para_t Rs485Ch2; //RS485通道2配置
|
||||
uint8_t DebugChannel; //调试通道
|
||||
@@ -286,6 +292,7 @@ int CommUnitAnalyze(GateWayPara GateWay, uint8_t *rData, uint16_t rLen, SendData
|
||||
void DebugAnalyze(GateWayPara GateWay, uint8_t *rData, uint16_t rLen);
|
||||
void CommUnitCmdSend(GateWayPara GateWay, uint8_t *CommUnitMac, CommUnitCmd_m Cmd, uint8_t *Payload, uint16_t PayloadLen, SendData Send);
|
||||
int CheckCommUnitReg(GateWayPara GateWay, uint8_t *CommUnitMac);
|
||||
int CheckCommUnitExcl(GateWayPara GateWay, uint8_t *CommUnitMac);
|
||||
int CommUintOrgData(GateWayPara GateWay, CommUnitPara CUPara, CommUnitData CUData, uint8_t *sData);
|
||||
void DebugDisplaySensorData(int SensorIdx, uint16_t SensorType, uint8_t *SensorData);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user