com.eurotech.framework.protocol.pcn
Class PassengerCountLogEntry

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.PassengerCountLogEntry

public class PassengerCountLogEntry
extends GpsLogEntry

Defines IN/OUT count log entry.

Author:
ilya.binshtok

Constructor Summary
PassengerCountLogEntry()
          PassengerCountLogEntry default
PassengerCountLogEntry(String entry)
          PassengerCountLogEntry constructor
PassengerCountLogEntry(String vehicleID, int pcn1001Address, Calendar arrivalTime, Calendar departureTime, double latitude, double longitude, double arrivalSpeed, double departureSpeed, int inCount, int outCount, String loggingPath, String publishTopic, int publishQoS)
          PassengerCountLogEntry constructor
 
Method Summary
 String formLogFilename()
          Forms an absolute path to passenger count log filename.
 double getArrivalSpeed()
          Reports vehicle arrival speed.
 Calendar getArrivalTime()
          Reports vehicle arrival time.
 double getDepartureSpeed()
          Reports vehicle departure speed.
 Calendar getDepartureTime()
          Reports vehicle departure time.
 int getInCount()
          Reports IN count.
 int getOutCount()
          Reports OUT count.
 int getPcn1001Address()
          Reports SNP address of passenger counter.
 void setArrivalSpeed(double arrivalSpeed)
          Sets vehicle arrival speed.
 void setArrivalTime(Calendar arrivalTime)
          Sets vehicle arrival time.
 void setDepartureSpeed(double departureSpeed)
          Sets vehicle departure speed.
 void setDepartureTime(Calendar departureTime)
          Sets vehicle departure time.
 void setInCount(int inCount)
          Sets IN count.
 void setOutCount(int outCount)
          Sets OUT count.
 void setPcn1001Address(int pcn1001Address)
          Sets SNP address of passenger counter.
 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
getLatitude, getLongitude, getSpeed, 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

PassengerCountLogEntry

public PassengerCountLogEntry()
PassengerCountLogEntry default


PassengerCountLogEntry

public PassengerCountLogEntry(String entry)
                       throws Exception
PassengerCountLogEntry constructor

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

PassengerCountLogEntry

public PassengerCountLogEntry(String vehicleID,
                              int pcn1001Address,
                              Calendar arrivalTime,
                              Calendar departureTime,
                              double latitude,
                              double longitude,
                              double arrivalSpeed,
                              double departureSpeed,
                              int inCount,
                              int outCount,
                              String loggingPath,
                              String publishTopic,
                              int publishQoS)
PassengerCountLogEntry 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
arrivalSpeed - - arrival vehicle speed as double
departureSpeed - - departure vehicle speed as double
inCount - - IN count as int
outCount - - OUT count as int
loggingPath - - absolute logging path as String
publishTopic - - publish topic as String
publishQoS - - publish QoS as int
Method Detail

getArrivalTime

public Calendar getArrivalTime()
Reports vehicle arrival time.

Returns:
vehicle arrival time as Calendar

setArrivalTime

public void setArrivalTime(Calendar arrivalTime)
Sets vehicle arrival time.

Parameters:
arrivalTime - - vehicle arrival time as Calendar

getDepartureTime

public Calendar getDepartureTime()
Reports vehicle departure time.

Returns:
vehicle departure time as Calendar

setDepartureTime

public void setDepartureTime(Calendar departureTime)
Sets vehicle departure time.

Parameters:
departureTime - - vehicle departure time as Calendar

getArrivalSpeed

public double getArrivalSpeed()
Reports vehicle arrival speed.

Returns:
vehicle arrival speed as double

getDepartureSpeed

public double getDepartureSpeed()
Reports vehicle departure speed.

Returns:
vehicle departure speed as double

setArrivalSpeed

public void setArrivalSpeed(double arrivalSpeed)
Sets vehicle arrival speed.

Parameters:
arrivalSpeed - - vehicle arrival speed as double

setDepartureSpeed

public void setDepartureSpeed(double departureSpeed)
Sets vehicle departure speed.

Parameters:
departureSpeed - - vehicle departure speed as double

getPcn1001Address

public int getPcn1001Address()
Reports SNP address of passenger counter.

Returns:
SNP address of passenger counter as int

setPcn1001Address

public void setPcn1001Address(int pcn1001Address)
Sets SNP address of passenger counter.

Parameters:
pcn1001Address - - SNP address of passenger counter as int

getInCount

public int getInCount()
Reports IN count.

Returns:
IN count as int

setInCount

public void setInCount(int inCount)
Sets IN count.

Parameters:
inCount - - IN count as int

getOutCount

public int getOutCount()
Reports OUT count.

Returns:
OUT count as int

setOutCount

public void setOutCount(int outCount)
Sets OUT count.

Parameters:
outCount - - out count as int

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

formLogFilename

public String formLogFilename()
Forms an absolute path to passenger count log filename.

Overrides:
formLogFilename in class GpsLogEntry


Copyright © 2013. All Rights Reserved.