break;
}
+ answerList->push_back("<Period value=\"" + TARIFF::PeriodToString(it->tariffConf.period) + "\"/>");
+
answerList->push_back("</tariff>");
}
answerList->push_back("</Tariffs>");
//-----------------------------------------------------------------------------
int PARSER_CHG_TARIFF::ParseStart(void *, const char * el, const char ** attr)
{
-char st[50];
double price[DIR_NUM];
int t[DIR_NUM];
depth++;
for (int j = 0; j < DIR_NUM; j++)
{
+ char st[50];
snprintf(st, 50, "Time%d", j);
if (strcasecmp(el, st) == 0)
{
}
return 0;
}
+
+ if (strcasecmp(el, "Period") == 0)
+ {
+ td.tariffConf.period = TARIFF::StringToPeriod(attr[1]);
+ return 0;
+ }
}
return -1;
}