]> git.stg.codes - stg.git/commitdiff
Ticket. The line for the change-policy-timeout adding to the vector
authorElena Mamontova <helenh463@gmail.com>
Tue, 1 Nov 2016 07:50:28 +0000 (09:50 +0200)
committerElena Mamontova <helenh463@gmail.com>
Tue, 1 Nov 2016 07:50:28 +0000 (09:50 +0200)
params added in the GetTariffParams(). The line for the
changePolicyTimeout output added in the PrintTariffConf().

projects/sgconf/tariffs.cpp

index c384df1fa639bb280d949ae099c11df70ce56b36..87d07d1a6a8840097a34e0bf80afde82cc6af7b8 100644 (file)
@@ -242,7 +242,8 @@ std::cout << Indent(level, true) << "name: " << conf.name << "\n"
           << Indent(level)       << "passive cost: " << conf.passiveCost << "\n"
           << Indent(level)       << "traff type: " << TraffTypeToString(conf.traffType) << "\n"
           << Indent(level)       << "period: " << PeriodToString(conf.period) << "\n"
-          << Indent(level)       << "change policy: " << ChangePolicyToString(conf.changePolicy) << "\n";
+          << Indent(level)       << "change policy: " << ChangePolicyToString(conf.changePolicy) << "\n"
+          << Indent(level)       << "change policy timeout: " << formatTime(conf.changePolicyTimeout) << "\n";
 }
 
 void PrintTariff(const STG::GET_TARIFF::INFO & info, size_t level = 0)
@@ -262,6 +263,7 @@ params.push_back(SGCONF::API_ACTION::PARAM("passive-cost", "<cost>", "\tpassive
 params.push_back(SGCONF::API_ACTION::PARAM("traff-type", "<type>", "\ttraffic type (up, down, up+down, max)"));
 params.push_back(SGCONF::API_ACTION::PARAM("period", "<period>", "\ttarification period (daily, monthly)"));
 params.push_back(SGCONF::API_ACTION::PARAM("change-policy", "<policy>", "tariff change policy (allow, to_cheap, to_expensive, deny)"));
+params.push_back(SGCONF::API_ACTION::PARAM("change-policy-timeout", "<yyyy-mm-dd hh:mm:ss>", "tariff change policy timeout"));
 params.push_back(SGCONF::API_ACTION::PARAM("times", "<hh:mm-hh:mm, ...>", "coma-separated day time-spans for each direction"));
 params.push_back(SGCONF::API_ACTION::PARAM("day-prices", "<price/price, ...>", "coma-separated day prices for each direction"));
 params.push_back(SGCONF::API_ACTION::PARAM("night-prices", "<price/price, ...>", "coma-separated night prices for each direction"));