Logging
Class LogDataObserver
java.lang.Object
Logging.LogDataObserver
- All Implemented Interfaces:
- PamObserver
public class LogDataObserver
- extends java.lang.Object
- implements PamObserver
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dataBlocks
java.util.ArrayList<PamDataBlock> dataBlocks
gpsData
GpsData gpsData
logString
java.lang.String logString
tempDate
java.util.Calendar tempDate
dateInMillis
long dateInMillis
logToFlatFile
LogToFlatFile logToFlatFile
loggingActive
boolean loggingActive
logFileOpened
boolean logFileOpened
LogDataObserver
public LogDataObserver()
getObserverObject
public PamObserver getObserverObject()
- Specified by:
getObserverObject in interface PamObserver
- Returns:
- the actual observer. In most cases concrete
classes will just return 'this' in response. The exception
is the Threaded observer, which will return the single thread
observer.
openLogFile
public void openLogFile()
startLogging
public void startLogging()
stopLogData
public void stopLogData()
closeLogFile
public void closeLogFile()
update
public void update(PamObservable o,
PamDataUnit arg)
- Description copied from interface:
PamObserver
- Informs the PamObserver that new data have been added to the Observable
class
- Specified by:
update in interface PamObserver
- Parameters:
o - Reference to the Observable (a PamDataBlock)arg - Reference to the new PamDataUnit
noteNewSettings
public void noteNewSettings()
- Specified by:
noteNewSettings in interface PamObserver
setSampleRate
public void setSampleRate(float sampleRate,
boolean notify)
- Description copied from interface:
PamObserver
- New sample rate
- Specified by:
setSampleRate in interface PamObserver
notify - Notify other PamObservers and PamObservables in the chain.
masterClockUpdate
public void masterClockUpdate(long milliSeconds,
long sampleNumber)
- Specified by:
masterClockUpdate in interface PamObserver
getRequiredDataHistory
public long getRequiredDataHistory(PamObservable o,
java.lang.Object arg)
- Specified by:
getRequiredDataHistory in interface PamObserver
- Parameters:
o - PamObservable class requiring the dataarg - optional argument from PamObservable
- Returns:
- time in milliseconds requried by data held in PamObservable
getObserverName
public java.lang.String getObserverName()
- Specified by:
getObserverName in interface PamObserver
getDataBlocks
public java.util.ArrayList<PamDataBlock> getDataBlocks()
isLoggingActive
public boolean isLoggingActive()
setLoggingActive
public void setLoggingActive(boolean loggingActive)
isLogFileOpened
public boolean isLogFileOpened()
removeObservable
public void removeObservable(PamObservable o)
- Description copied from interface:
PamObserver
- called when an Observable (PamDataBlock) is removed from the system
- Specified by:
removeObservable in interface PamObserver