mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
新增台区电表(新设备类型)数据解析
This commit is contained in:
@@ -307,8 +307,11 @@ static map<int, map<string, string>> g_mapAddrValStr =
|
||||
|
||||
void Device::getRuntimeParams(std::vector<std::pair<std::string, std::string>>& params)
|
||||
{
|
||||
if (type == int(EDeviceType::E_METER_TD))
|
||||
{
|
||||
}
|
||||
auto& vecAddr = REGAddr::s_mapDeviceAddrParam[this->type];
|
||||
for (auto& item: vecAddr)
|
||||
for (auto& item : vecAddr)
|
||||
{
|
||||
std::string v = getParam(item.addr, item.defaultVal);
|
||||
auto& mapValStr = REGAddr::g_mapRegAddrValStr[type][item.addr];
|
||||
@@ -317,7 +320,7 @@ void Device::getRuntimeParams(std::vector<std::pair<std::string, std::string>>&
|
||||
{
|
||||
v = iter->second;
|
||||
}
|
||||
params.push_back({item.name, v + item.unit});
|
||||
params.push_back({ item.name, v + item.unit });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user