com.eurotech.framework.protocol.pcn
Class GpsLogEntry

java.lang.Object
  extended by com.eurotech.framework.protocol.pcn.LogEntry
      extended by com.eurotech.framework.protocol.pcn.GpsLogEntry
Direct Known Subclasses:
CountLogEntry, PassengerCountLogEntry, VehiclePassengerCountLogEntry

public class GpsLogEntry
extends LogEntry

Defines GPS log entry.

Author:
ilya.binshtok

Constructor Summary
GpsLogEntry()
          GpsLogEntry default constructor
GpsLogEntry(String entry)
          GpsLogEntry constructor
GpsLogEntry(String vehicleID, Calendar timestamp, double latitude, double longitude, double speed, String loggingPath, String publishTopic, int publishQoS)
          GpsLogEntry constructor
 
Method Summary
 String formLogFilename()
          Forms an absolute path to GPS log filename.
 double getLatitude()
          Reports latitude
 double getLongitude()
          Reports longitude
 double getSpeed()
          Reports vehicle speed.
 void setLatitude(double latitude)
          Sets latitude
 void setLongitude(double longitude)
          Sets longitude
 void setSpeed(double speed)
          Sets vehicle speed.
 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.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

GpsLogEntry

public GpsLogEntry()
GpsLogEntry default constructor


GpsLogEntry

public GpsLogEntry(String entry)
            throws Exception
GpsLogEntry constructor

Parameters:
entry - - GPS entry obtained from log file as String
Throws:
Exception

GpsLogEntry

public GpsLogEntry(String vehicleID,
                   Calendar timestamp,
                   double latitude,
                   double longitude,
                   double speed,
                   String loggingPath,
                   String publishTopic,
                   int publishQoS)
GpsLogEntry constructor

Parameters:
vehicleID - - vehicle ID as String
timestamp - - time stamp as Calendar
latitude - - latitude as double
longitude - - longitude as double
speed - - vehicle speed as double
loggingPath - -absolute logging path as String
publishTopic - - publish topic as String
publishQoS - - publish QoS as int
Method Detail

getLatitude

public double getLatitude()
Reports latitude

Returns:
latitude as double

setLatitude

public void setLatitude(double latitude)
Sets latitude

Parameters:
latitude - - latitude as double

getLongitude

public double getLongitude()
Reports longitude

Returns:
longitude as double

setLongitude

public void setLongitude(double longitude)
Sets longitude

Parameters:
longitude - - longitude as double

getSpeed

public double getSpeed()
Reports vehicle speed.

Returns:
vehicle speed as double

setSpeed

public void setSpeed(double speed)
Sets vehicle speed.

Parameters:
speed - - vehicle speed as double

toString

public String toString()
Reports string representation of this object

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

toMQttPayload

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

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

formLogFilename

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

Overrides:
formLogFilename in class LogEntry


Copyright © 2013. All Rights Reserved.