Vesna
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | List of all members
PassengerCounterManual Class Reference

#include <PassengerCounterManual.h>

Inheritance diagram for PassengerCounterManual:
Inheritance graph
[legend]
Collaboration diagram for PassengerCounterManual:
Collaboration graph
[legend]

Public Member Functions

 PassengerCounterManual (PassengerCountBusinessLogic *passengerCountBusinessLogic)
 
virtual ~PassengerCounterManual ()
 
virtual void IssueIn (const bool sameLineTrip, const bool currentTripIsContinousForPrevisousTrip, const long continousTripOffset)
 IssueIn - Initializes passenger count structures on event IssueIn, creates record for each bus stop of the current trip. If the current trip is continuous trip, data from previous trip are moved to the current trip. More...
 
virtual void EvaluatePostIssueData (const std::vector< const EM::TicketIssueLogic::ETicketIssueLogicOutputData * > *outputDataCol)
 EvaluatePostIssueData - adding passengers by Ticket Issue output data. More...
 
virtual void PassengersGotIn (const uint16_t count, const uint16_t checkOutBusStopTripOrder)
 if valid checkOutBusStopTripOrder was entered, method adds getting out passangers for that bus stop More...
 
virtual void CancelPassengersGotIn (const uint16_t count, const int32_t busStopLineOrder)
 if valid busStopLineOrder was entered, method decrements getting out passangers for that bus stop More...
 
virtual void OnAutomaticPassengerCountResultsArrived (const uint16_t boardedCount, const uint16_t alightedCount)
 OnAutomaticPassengerCountResultsArrived - processes results from irma matrix automatic counters. More...
 
virtual void OnAutomaticPassengerCountResultsArrived (const uint8_t fullness, const uint16_t capacity, const uint16_t passengerCount, const QString &calculationTime, const uint32_t busStopID, const uint8_t busStopOrder)
 OnAutomaticPassengerCountResultsArrived - processes results from AZD receiver automatic counter. More...
 
virtual QString GetAutomaticCountingResult () const
 GetAutomaticCountingResult - returns value based on AutomaticPassengerCountingResultMeaning in ProjectConfiguration. More...
 
virtual void OnBusStopDeparture (const long busStopTripOrder)
 
- Public Member Functions inherited from PassengerCounterInterface
 PassengerCounterInterface (const PassengerCounterDefines::PassengerCounterType passengerCounterType, PassengerCountBusinessLogic *passengerCountBusinessLogic)
 
virtual ~PassengerCounterInterface ()
 
PassengersCount GetPassengersCountsSum (const bool includeActualBusStop=false) const
 GetPassengersCountsSum - method returns passangers count determined by actual trip index. More...
 
PassengersCount GetPassengersGettingOutAtBusStop (const uint16_t busStopLineOrder) const
 GetPassengersGettingOutAtBusStop returns number of passengers who bought ticket to bus stop with the specified order on line. More...
 
PassengersCount GetPassengersGettingOutAtCurrentBusStop () const
 GetPassengersGettingOutAtCurrentBusStop returns number of passengers who bought ticket to the bus stop where the bus is about to arrive at. More...
 
std::vector< PassengersCountGetGettingOutPassengersCounts () const
 GetGettingOutPassengersCounts returns number of passengers who are getting out at every bus stop of the trip. More...
 
PassengerCounterDefines::PassengerCounterType GetPassengerCounterType () const
 GetPassengerCounterType. More...
 
void TryToBackupPassengersCount ()
 

Additional Inherited Members

- Protected Member Functions inherited from PassengerCounterInterface
PassengersCountsVectorGetGettingOutPassengersCountsVector ()
 
const PassengersCountsVectorGetConstGettingOutPassengersCountsVector () const
 
PassengerCountBusinessLogicGetPassengerCountBusinessLogic ()
 

Constructor & Destructor Documentation

PassengerCounterManual::PassengerCounterManual ( PassengerCountBusinessLogic passengerCountBusinessLogic)
PassengerCounterManual::~PassengerCounterManual ( )
virtual

Member Function Documentation

void PassengerCounterManual::CancelPassengersGotIn ( const uint16_t  count,
const int32_t  busStopLineOrder 
)
virtual

if valid busStopLineOrder was entered, method decrements getting out passangers for that bus stop

Parameters
count- number of passangers
busStopLineOrder- bus stop order on actual trip, where passangers should be getting out ( including continous orders with offset 100 and more ) Method removes 'count' passengers from passengers count of bus stop with line index 'busStopLineOrder'. If such bus stop doesn't exist, the function does nothing. This function is called when a ticket is cancelled. Line index is used because of statistics structure, which uses only line index.

Implements PassengerCounterInterface.

Here is the call graph for this function:

void PassengerCounterManual::EvaluatePostIssueData ( const std::vector< const EM::TicketIssueLogic::ETicketIssueLogicOutputData * > *  outputDataCol)
virtual

EvaluatePostIssueData - adding passengers by Ticket Issue output data.

Parameters
outputDataCol

Implements PassengerCounterInterface.

Here is the call graph for this function:

QString PassengerCounterManual::GetAutomaticCountingResult ( ) const
virtual

GetAutomaticCountingResult - returns value based on AutomaticPassengerCountingResultMeaning in ProjectConfiguration.

Returns
Passengers count or fullness (ProjectConfiguration defines which one).

Implements PassengerCounterInterface.

void PassengerCounterManual::IssueIn ( const bool  sameLineTrip,
const bool  currentTripIsContinousForPrevisousTrip,
const long  continousTripOffset 
)
virtual

IssueIn - Initializes passenger count structures on event IssueIn, creates record for each bus stop of the current trip. If the current trip is continuous trip, data from previous trip are moved to the current trip.

Parameters
sameLineTrip- flag indicating that app is entering issue on same line/trip (and protect number) as last time => counts shouldn't be erased
currentTripIsContinousForPrevisousTrip- flag indicating that app is entering issue on continuous trip from last line/trip
continousTripOffset- offset of continued trip this function is called on each IssueIn event, initializes passengers count

Reimplemented from PassengerCounterInterface.

Here is the call graph for this function:

void PassengerCounterManual::OnAutomaticPassengerCountResultsArrived ( const uint16_t  boardedCount,
const uint16_t  alightedCount 
)
virtual

OnAutomaticPassengerCountResultsArrived - processes results from irma matrix automatic counters.

Implements PassengerCounterInterface.

void PassengerCounterManual::OnAutomaticPassengerCountResultsArrived ( const uint8_t  fullness,
const uint16_t  capacity,
const uint16_t  passengerCount,
const QString &  calculationTime,
const uint32_t  busStopID,
const uint8_t  busStopOrder 
)
virtual

OnAutomaticPassengerCountResultsArrived - processes results from AZD receiver automatic counter.

Implements PassengerCounterInterface.

void PassengerCounterManual::OnBusStopDeparture ( const long  busStopTripOrder)
virtual
void PassengerCounterManual::PassengersGotIn ( const uint16_t  count,
const uint16_t  checkOutBusStopTripOrder 
)
virtual

if valid checkOutBusStopTripOrder was entered, method adds getting out passangers for that bus stop

Parameters
count- number of passangers
busStopTripOrder- bus stop order on actual trip where passangers will be getting out ( including continous orders with ofset 100 and more ) method adds 'count' passengers to passengers count of bus stop with trip index 'checkOutBusStopTripOrder'; if such a bus stop doesn't exist, the function does nothing.

Implements PassengerCounterInterface.

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files: