Added ctor. Added several new variables to tariff-structure

This commit is contained in:
Gerhard Hoffmann 2023-02-01 15:06:53 +01:00
parent 5d337067cb
commit a8484000cc

View File

@ -16,7 +16,13 @@
#define VERANSTALTUNG_AUSWAHL_KULTUR (uint64_t)(0x0000000000000010)
struct parking_tariff_t {
// parking_tariff_t();
explicit parking_tariff_t()
: day_tariff_start(0)
, day_tariff_end(0)
, night_tariff_start(0)
, night_tariff_end(0) {
}
static parking_tariff_t *parseTariff(const char *confFile);
/// \brief Express computational units in cent.
@ -41,6 +47,26 @@ struct parking_tariff_t {
///
TariffStep m_tariffSteps[3][7][MIN_PER_DAY];
///
/// \brief day_tariff_start
///
minute_t day_tariff_start;
///
/// \brief day_tariff_end
///
minute_t day_tariff_end;
///
/// \brief night_tariff_start
///
minute_t night_tariff_start;
///
/// \brief night_tariff_end
///
minute_t night_tariff_end;
///
/// \brief waiting_period
/// @note Also called "Karenzzeit". Allowed values: [0, 3]
@ -49,7 +75,12 @@ struct parking_tariff_t {
///
/// \brief free_of_charge
///
minute_t free_of_charge;
minute_t free_of_charge_day_tariff;
///
/// \brief free_of_charge_night_tariff
///
minute_t free_of_charge_night_tariff;
///
/// \brief max_parking_price_units
@ -86,6 +117,21 @@ struct parking_tariff_t {
///
minute_t parking_time_max;
///
/// \brief basic_tariff
///
bool basic_tariff;
///
/// \brief max_price_24h_after_arrival
///
uint32_t max_price_24h_after_arrival;
///
/// \brief max_price_at_midnight
///
uint32_t max_price_at_midnight;
#if 0
/// Minimal amount of money for buying a ticket.
///