com.eurotech.framework.protocol.pcn
Class VehiclePassengerCountLogEntry

java.lang.Object
  extended by com.eurotech.framework.protocol.pcn.LogEntry
      extended by com.eurotech.framework.protocol.pcn.GpsLogEntry
          extended by com.eurotech.framework.protocol.pcn.VehiclePassengerCountLogEntry

public class VehiclePassengerCountLogEntry
extends GpsLogEntry

Defines Vehicle passenger count log entry

Author:
ilya.binshtok

Constructor Summary
VehiclePassengerCountLogEntry()
          VehiclePassengerCountLogEntry constructor
VehiclePassengerCountLogEntry(String entry)
          VehiclePassengerCountLogEntry constructor
VehiclePassengerCountLogEntry(String vehicleID, Calendar arrivalTime, Calendar departureTime, double latitude, double longitude, double speed, int numberPassengers, InOutCountEntry[] inOutData, String loggingPath, String publishTopic, int publishQoS)
          VehiclePassengerCountLogEntry constructor
VehiclePassengerCountLogEntry(String vehicleID, int pcn1001Address, Calendar arrivalTime, Calendar departureTime, double latitude, double longitude, double speed, int numberPassengers, InOutCountEntry inOutData, String loggingPath, String publishTopic, int publishQoS)
          VehiclePassengerCountLogEntry constructor
 
Method Summary
 InOutCountEntry[] getInOutData()
           
 double getLatitude()
          Reports latitude.
 double getLongitude()
          Reports longitude.
 int getNumberPassengers()
          Reports total number of passengers on board
 double getSpeed()
          Reports speed
 long getTimeAtStation()
          Reports vehicle's time at station (in seconds)
 String toMQttPayload()
          Reports MQtt payload representation of this object
 String toString()
          Reports string representation of this object
 
Methods inherited from class com.eurotech.framework.protocol.pcn.GpsLogEntry
formLogFilename, setLatitude, setLongitude, setSpeed
 
Methods inherited from class com.eurotech.framework.protocol.pcn.LogEntry
generateHHMMSS, generateHHMMSS, generateYYYYMMDD, generateYYYYMMDD, getLoggingPath, getPublishQoS, getPublishTopic, getTimestamp, getVehicleID, isPublished, setLoggingPath, setPublished, setTimestamp, setVehicleID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VehiclePassengerCountLogEntry

public VehiclePassengerCountLogEntry()
VehiclePassengerCountLogEntry constructor


VehiclePassengerCountLogEntry

public VehiclePassengerCountLogEntry(String entry)
                              throws Exception
VehiclePassengerCountLogEntry constructor

Parameters:
entry - - passenger IN/OUT counter entry obtained from log file as String
Throws:
Exception

VehiclePassengerCountLogEntry

public VehiclePassengerCountLogEntry(String vehicleID,
                                     int pcn1001Address,
                                     Calendar arrivalTime,
                                     Calendar departureTime,
                                     double latitude,
                                     double longitude,
                                     double speed,
                                     int numberPassengers,
                                     InOutCountEntry inOutData,
                                     String loggingPath,
                                     String publishTopic,
                                     int publishQoS)
VehiclePassengerCountLogEntry constructor

Parameters:
vehicleID - - vehicle ID as String
pcn1001Address - - SNP address of passenger counter as int
arrivalTime - - arrival time as Calendar
departureTime - - departure time as Calendar
latitude - - latitude as double
longitude - - longitude as double
speed - - vehicle speed as double
numberPassengers - - toital number of passengers on board as int
inOutData - - IN/OUT data per each door as InOutCountEntry
loggingPath - - absolute logging path as String
publishTopic - - publish topic as String
publishQoS - - publish QoS as int

VehiclePassengerCountLogEntry

public VehiclePassengerCountLogEntry(String vehicleID,
                                     Calendar arrivalTime,
                                     Calendar departureTime,
                                     double latitude,
                                     double longitude,
                                     double speed,
                                     int numberPassengers,
                                     InOutCountEntry[] inOutData,
                                     String loggingPath,
                                     String publishTopic,
                                     int publishQoS)
VehiclePassengerCountLogEntry constructor

Parameters:
vehicleID - - vehicle ID as String
arrivalTime - - arrival time as Calendar
departureTime - - departure time as Calendar
latitude - - latitude as double
longitude - - longitude as double
speed - - vehicle speed as double
numberPassengers - - toital number of passengers on board as int
inOutData - - IN/OUT data per each door as InOutCountEntry[]
loggingPath - - absolute logging path as String
publishTopic - - publish topic as String
publishQoS - - publish QoS as int
Method Detail

toString

public String toString()
Reports string representation of this object

Overrides:
toString in class GpsLogEntry
Returns:
string representation of this object as String

toMQttPayload

public String toMQttPayload()
Reports MQtt payload representation of this object

Overrides:
toMQttPayload in class GpsLogEntry
Returns:
MQtt payload representation of this object as String

getNumberPassengers

public int getNumberPassengers()
Reports total number of passengers on board

Returns:
total number of passengers as int

getTimeAtStation

public long getTimeAtStation()
Reports vehicle's time at station (in seconds)

Returns:
vehicle's time at station as long

getInOutData

public InOutCountEntry[] getInOutData()

getLatitude

public double getLatitude()
Reports latitude.

Overrides:
getLatitude in class GpsLogEntry
Returns:
latitude as double

getLongitude

public double getLongitude()
Reports longitude.

Overrides:
getLongitude in class GpsLogEntry
Returns:
longitude as double

getSpeed

public double getSpeed()
Reports speed

Overrides:
getSpeed in class GpsLogEntry
Returns:
speed as double


Copyright © 2013. All Rights Reserved.