Compare commits
No commits in common. "e25cbd670d4c114a79832353d7954a72ca3fc0f8" and "ae05a32209fcc98c4082908cd5800ed8872e56e7" have entirely different histories.
e25cbd670d
...
ae05a32209
|
@ -708,7 +708,7 @@ static north_protocol_u parse_json_north(const char protoContent[MAX_CONFIG_CONT
|
||||||
* @param[in] devId 设备ID
|
* @param[in] devId 设备ID
|
||||||
* @return 返回匹配设备的点位数组,未找到返回 NULL
|
* @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++)
|
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++)
|
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
|
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
|
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
|
|
||||||
}
|
|
||||||
|
|
|
@ -41,14 +41,6 @@ extern advanced_setting_t AdvancedSettingTable[kAdvanced_Setting_Type_End];
|
||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
point_t *get_pointArr(dev_type_e devType, uint16_t devId);
|
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 读取系统配置的设备数量
|
* @brief 读取系统配置的设备数量
|
||||||
* @param[in] item: 接入EMS的所有设备类型数量
|
* @param[in] item: 接入EMS的所有设备类型数量
|
||||||
|
|
Binary file not shown.
|
@ -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.
Loading…
Reference in New Issue