forked from gary/ems
2
0
Fork 0

Compare commits

..

No commits in common. "e25cbd670d4c114a79832353d7954a72ca3fc0f8" and "ae05a32209fcc98c4082908cd5800ed8872e56e7" have entirely different histories.

8 changed files with 2 additions and 44 deletions

View File

@ -708,7 +708,7 @@ static north_protocol_u parse_json_north(const char protoContent[MAX_CONFIG_CONT
* @param[in] devId ID
* @return NULL
*********************************************************************/
point_t *get_pointArr(dev_type_e devType, uint16_t devArrayId)
point_t *get_pointArr(dev_type_e devType, uint16_t devId)
{
for (int i = 0; i < kProto_Master_End; i++)
{
@ -718,7 +718,7 @@ point_t *get_pointArr(dev_type_e devType, uint16_t devArrayId)
}
for (int j = 0; j < protoTable[i].devNum; j++)
{
if (protoTable[i].devPointMapArr[j].devType == devType && (protoTable[i].devPointMapArr[j].devId == devArrayId + 1))
if (protoTable[i].devPointMapArr[j].devType == devType && protoTable[i].devPointMapArr[j].devId == devId)
{
return protoTable[i].devPointMapArr[j].pointArr; // 返回匹配设备的 pointArr
}
@ -726,28 +726,3 @@ point_t *get_pointArr(dev_type_e devType, uint16_t devArrayId)
}
return NULL; // 未找到匹配设备,返回 NULL
}
/*********************************************************************
* @brief ID获取设备的点位数组
* @param[in] devType
* @param[in] devId ID
* @return NULL
*********************************************************************/
dev_info_t *get_devPointMapArr(dev_type_e devType, uint16_t devArrayId)
{
for (int i = 0; i < kProto_Master_End; i++)
{
if (protoTable[i].devPointMapArr == NULL)
{
continue; // 跳过空协议
}
for (int j = 0; j < protoTable[i].devNum; j++)
{
if (protoTable[i].devPointMapArr[j].devType == devType && (protoTable[i].devPointMapArr[j].devId == devArrayId + 1))
{
return &protoTable[i].devPointMapArr[j]; // 返回匹配设备的 pointArr
}
}
}
return NULL; // 未找到匹配设备,返回 NULL
}

View File

@ -41,14 +41,6 @@ extern advanced_setting_t AdvancedSettingTable[kAdvanced_Setting_Type_End];
*********************************************************************/
point_t *get_pointArr(dev_type_e devType, uint16_t devId);
/*********************************************************************
* @brief ID获取设备的点位数组
* @param[in] devType
* @param[in] devId ID
* @return NULL
*********************************************************************/
dev_info_t *get_devPointMapArr(dev_type_e devType, uint16_t devArrayId);
/*********************************************************************
* @brief
* @param[in] item: EMS的所有设备类型数量

Binary file not shown.

View File

@ -1,9 +0,0 @@
network:
ethernets:
eth0:
addresses: [192.169.0.123/24]
nameservers:
addresses: [114.114.114.114,8.8.8.8]
eth1:
dhcp4: true
version: 2

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.