de.fhg.igd.gps
Class GPSServiceImpl

java.lang.Object
  extended byde.fhg.igd.semoa.service.AbstractService
      extended byde.fhg.igd.gps.GPSServiceImpl
All Implemented Interfaces:
GPSService, Listener, Service

public class GPSServiceImpl
extends AbstractService
implements GPSService, Listener

Author:
Jan Peters

Field Summary
private  long bad_
           
private  GPSData currentGpsData_
           
protected  boolean debug_
           
private static String[] DEPEND_
          The dependencies to other objects in the global Environment.
private  EventReflector eventReflector_
           
private  long good_
           
private  GPSParser gpsParser_
           
private  LinkedList history_
           
static int HISTORY_SIZE
           
private  int historySize_
           
private  long historyStepDistance_
           
private  long historyStepTime_
           
static String OPT_DESCR
          The ArgsParser option descriptor for the case that this class is initiated from command line.
private  boolean parserRunning_
           
 
Fields inherited from class de.fhg.igd.semoa.service.AbstractService
REV_POSTFIX, REV_PREFIX
 
Fields inherited from interface de.fhg.igd.gps.GPSService
WHATIS
 
Constructor Summary
GPSServiceImpl()
           
 
Method Summary
 TrustedListener addListener(Listener listener)
           
 String author()
          Returns the String with the author's name.
 String[] dependencies()
          Returns the dependencies of this service as described in Service.
 GPSData getCurrentGpsData()
           
 int getHistorySize()
           
 LinkedList history()
           
 String info()
          Returns the String with the service's short description.
 void initGpsParser(Reader reader)
           
 void initGpsParser(String file)
           
static void main(String[] argv)
           
 void notifiedOf(Object o)
          This method is called with the event that caused the notification.
 void resetHistory()
           
 String revision()
          Returns the revision number of this class as a string.
 void setDefaultGpsData(GPSData data)
           
 void setDefaultWGS84(String str)
           
 void setHistorySize(int size)
           
 void setHistoryStepDistance(long distance)
           
 void setHistoryStepTime(long time)
           
 void startGpsParser()
           
 void stopGpsParser()
           
 String toString()
           
 void updateGpsData(GPSData data)
           
protected  boolean updateHistory()
           
 
Methods inherited from class de.fhg.igd.semoa.service.AbstractService
checkDependencies, docs, doPrivileged, doPrivileged, getACC, getEnvironment, majorVersion, minorVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OPT_DESCR

public static final String OPT_DESCR
The ArgsParser option descriptor for the case that this class is initiated from command line.

See Also:
Constant Field Values

HISTORY_SIZE

public static final int HISTORY_SIZE
See Also:
Constant Field Values

debug_

protected boolean debug_

eventReflector_

private EventReflector eventReflector_

history_

private LinkedList history_

historySize_

private int historySize_

historyStepDistance_

private long historyStepDistance_

historyStepTime_

private long historyStepTime_

gpsParser_

private GPSParser gpsParser_

currentGpsData_

private GPSData currentGpsData_

parserRunning_

private boolean parserRunning_

good_

private long good_

bad_

private long bad_

DEPEND_

private static final String[] DEPEND_
The dependencies to other objects in the global Environment.

Constructor Detail

GPSServiceImpl

public GPSServiceImpl()
Method Detail

info

public String info()
Returns the String with the service's short description.

Specified by:
info in interface Service
Specified by:
info in class AbstractService
Returns:
The String with the service's short description.

author

public String author()
Returns the String with the author's name.

Specified by:
author in interface Service
Specified by:
author in class AbstractService
Returns:
The String with the author's name.

revision

public String revision()
Returns the revision number of this class as a string.

Specified by:
revision in class AbstractService
Returns:
The revision number of this class as a string.

dependencies

public String[] dependencies()
Returns the dependencies of this service as described in Service.

Specified by:
dependencies in interface Service
Overrides:
dependencies in class AbstractService
Returns:
The array of dependencies.

toString

public String toString()
Overrides:
toString in class AbstractService
Returns:
The string representation of this instance.

notifiedOf

public void notifiedOf(Object o)
Description copied from interface: Listener
This method is called with the event that caused the notification.

Specified by:
notifiedOf in interface Listener
Parameters:
o - The object describing the event.

updateHistory

protected boolean updateHistory()

addListener

public TrustedListener addListener(Listener listener)
Specified by:
addListener in interface GPSService

getCurrentGpsData

public GPSData getCurrentGpsData()
Specified by:
getCurrentGpsData in interface GPSService

updateGpsData

public void updateGpsData(GPSData data)
Specified by:
updateGpsData in interface GPSService

setHistorySize

public void setHistorySize(int size)
Specified by:
setHistorySize in interface GPSService

getHistorySize

public int getHistorySize()
Specified by:
getHistorySize in interface GPSService

setHistoryStepDistance

public void setHistoryStepDistance(long distance)
Specified by:
setHistoryStepDistance in interface GPSService

setHistoryStepTime

public void setHistoryStepTime(long time)
Specified by:
setHistoryStepTime in interface GPSService

resetHistory

public void resetHistory()
Specified by:
resetHistory in interface GPSService

history

public LinkedList history()
Specified by:
history in interface GPSService

setDefaultWGS84

public void setDefaultWGS84(String str)
Specified by:
setDefaultWGS84 in interface GPSService

setDefaultGpsData

public void setDefaultGpsData(GPSData data)
Specified by:
setDefaultGpsData in interface GPSService

initGpsParser

public void initGpsParser(String file)
Specified by:
initGpsParser in interface GPSService

initGpsParser

public void initGpsParser(Reader reader)
Specified by:
initGpsParser in interface GPSService

startGpsParser

public void startGpsParser()
Specified by:
startGpsParser in interface GPSService

stopGpsParser

public void stopGpsParser()
Specified by:
stopGpsParser in interface GPSService

main

public static void main(String[] argv)
                 throws InterruptedException,
                        ArgsParserException
Throws:
InterruptedException
ArgsParserException


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.