X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/8569ecdc2c9368dc0fe650b901cce7b37337ffec..3334627402c6bf40e156f9dc7592e941d81b574c:/projects/stargazer/plugins/configuration/rpcconfig/tariff_helper.cpp?ds=inline diff --git a/projects/stargazer/plugins/configuration/rpcconfig/tariff_helper.cpp b/projects/stargazer/plugins/configuration/rpcconfig/tariff_helper.cpp index 85abf820..c96b7d31 100644 --- a/projects/stargazer/plugins/configuration/rpcconfig/tariff_helper.cpp +++ b/projects/stargazer/plugins/configuration/rpcconfig/tariff_helper.cpp @@ -13,6 +13,7 @@ structVal["freemb"] = xmlrpc_c::value_double(data.tariffConf.free); structVal["passivecost"] = xmlrpc_c::value_double(data.tariffConf.passiveCost); structVal["traffType"] = xmlrpc_c::value_int(data.tariffConf.traffType); structVal["period"] = xmlrpc_c::value_string(TARIFF::PeriodToString(data.tariffConf.period)); +structVal["changePolicy"] = xmlrpc_c::value_string(TARIFF::ChangePolicyToString(data.tariffConf.changePolicy)); std::vector prices(DIR_NUM); @@ -63,7 +64,7 @@ if ((it = structVal.find("passivecost")) != structVal.end()) if ((it = structVal.find("traffType")) != structVal.end()) { - data.tariffConf.traffType = xmlrpc_c::value_int(it->second); + data.tariffConf.traffType = static_cast(xmlrpc_c::value_int(it->second).cvalue()); } if ((it = structVal.find("period")) != structVal.end()) @@ -71,6 +72,11 @@ if ((it = structVal.find("period")) != structVal.end()) data.tariffConf.period = TARIFF::StringToPeriod(xmlrpc_c::value_string(it->second)); } +if ((it = structVal.find("changePolicy")) != structVal.end()) + { + data.tariffConf.changePolicy = TARIFF::StringToChangePolicy(xmlrpc_c::value_string(it->second)); + } + if ((it = structVal.find("dirprices")) != structVal.end()) { std::vector prices(