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

#include <PassengerCounterInterface.h>

Inheritance diagram for PassengerCounterInterface:
Inheritance graph
[legend]

Classes

class  DataClass
 

Public Member Functions

 PassengerCounterInterface (const PassengerCounterDefines::PassengerCounterType passengerCounterType, PassengerCountBusinessLogic *passengerCountBusinessLogic)
 
virtual ~PassengerCounterInterface ()
 
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)=0
 EvaluatePostIssueData - adding passengers by Ticket Issue output data. More...
 
virtual void PassengersGotIn (const uint16_t count, const uint16_t checkOutBusStopTripOrder)=0
 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)=0
 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)=0
 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)=0
 OnAutomaticPassengerCountResultsArrived - processes results from AZD receiver automatic counter. More...
 
virtual QString GetAutomaticCountingResult () const =0
 GetAutomaticCountingResult - returns value based on AutomaticPassengerCountingResultMeaning in ProjectConfiguration. More...
 
virtual void OnBusStopDeparture (const long busStopTripOrder)=0
 
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 ()
 

Protected Member Functions

PassengersCountsVectorGetGettingOutPassengersCountsVector ()
 
const PassengersCountsVectorGetConstGettingOutPassengersCountsVector () const
 
PassengerCountBusinessLogicGetPassengerCountBusinessLogic ()
 

Constructor & Destructor Documentation

PassengerCounterInterface::PassengerCounterInterface ( const PassengerCounterDefines::PassengerCounterType  passengerCounterType,
PassengerCountBusinessLogic passengerCountBusinessLogic 
)
PassengerCounterInterface::~PassengerCounterInterface ( )
virtual

Member Function Documentation

virtual void PassengerCounterInterface::CancelPassengersGotIn ( const uint16_t  count,
const int32_t  busStopLineOrder 
)
pure 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.

Implemented in PassengerCounterManual, and PassengerCounterAutomatic.

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

EvaluatePostIssueData - adding passengers by Ticket Issue output data.

Parameters
outputDataCol

Implemented in PassengerCounterAutomatic, and PassengerCounterManual.

virtual QString PassengerCounterInterface::GetAutomaticCountingResult ( ) const
pure virtual

GetAutomaticCountingResult - returns value based on AutomaticPassengerCountingResultMeaning in ProjectConfiguration.

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

Implemented in PassengerCounterManual, and PassengerCounterAutomatic.

const PassengersCountsVector & PassengerCounterInterface::GetConstGettingOutPassengersCountsVector ( ) const
protected
std::vector< PassengersCount > PassengerCounterInterface::GetGettingOutPassengersCounts ( ) const

GetGettingOutPassengersCounts returns number of passengers who are getting out at every bus stop of the trip.

Returns number of passengers who are getting out for every bus stop of the trip. Returns vector of long integers, where index in the vector is the trip index of the bus stop and value is number of passengers that are getting out at that bus stop.

Returns
vector of long integers, where the position in the vector is the trip order of the bus stop, and value is the number of passengers
PassengersCountsVector & PassengerCounterInterface::GetGettingOutPassengersCountsVector ( )
protected

Here is the caller graph for this function:

PassengerCountBusinessLogic * PassengerCounterInterface::GetPassengerCountBusinessLogic ( )
protected

Here is the caller graph for this function:

PassengerCounterDefines::PassengerCounterType PassengerCounterInterface::GetPassengerCounterType ( ) const

GetPassengerCounterType.

Returns
counter type - automatic/manual
PassengersCount PassengerCounterInterface::GetPassengersCountsSum ( const bool  includeActualBusStop = false) const

GetPassengersCountsSum - method returns passangers count determined by actual trip index.

Parameters
includeActualBusStop- determine if also count passengers on actual bus stop Returns the number of passengers that are currently in the bus. Sums up passengers counts for all bus stops following the current bus stop.
Returns
passenger count

Here is the caller graph for this function:

PassengersCount PassengerCounterInterface::GetPassengersGettingOutAtBusStop ( const uint16_t  busStopLineOrder) const

GetPassengersGettingOutAtBusStop returns number of passengers who bought ticket to bus stop with the specified order on line.

Parameters
busStopLineOrderorder of bus stop on line Returns number of passengers that bought ticket to the bus stop with line index 'busStopLineOrder'. If such a bus stop doesn't exist, returns 0.
Returns
number of passengers
PassengersCount PassengerCounterInterface::GetPassengersGettingOutAtCurrentBusStop ( ) const

GetPassengersGettingOutAtCurrentBusStop returns number of passengers who bought ticket to the bus stop where the bus is about to arrive at.

Returns number of passengers that bought ticket to the bus stop where the bus is about to arrive at.

Returns
number of passengers
void PassengerCounterInterface::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 in PassengerCounterAutomatic, and PassengerCounterManual.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void PassengerCounterInterface::OnAutomaticPassengerCountResultsArrived ( const uint16_t  boardedCount,
const uint16_t  alightedCount 
)
pure virtual

OnAutomaticPassengerCountResultsArrived - processes results from irma matrix automatic counters.

Implemented in PassengerCounterManual, and PassengerCounterAutomatic.

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

OnAutomaticPassengerCountResultsArrived - processes results from AZD receiver automatic counter.

Implemented in PassengerCounterManual, and PassengerCounterAutomatic.

virtual void PassengerCounterInterface::OnBusStopDeparture ( const long  busStopTripOrder)
pure virtual
virtual void PassengerCounterInterface::PassengersGotIn ( const uint16_t  count,
const uint16_t  checkOutBusStopTripOrder 
)
pure 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.

Implemented in PassengerCounterManual, and PassengerCounterAutomatic.

void PassengerCounterInterface::TryToBackupPassengersCount ( )

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: