Package NMEA
Class AcquireNmeaData
java.lang.Object
PamguardMVC.PamProcess
NMEA.AcquireNmeaData
- All Implemented Interfaces:
ActionListener
,EventListener
,ModuleStatusManager
,PamObserver
,ProcessAnnotator
- Author:
- Doug Gillespie, Dave McLaren, Paul Redmond
PamProcess for NMEA data acquisition.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
actionPerformed
(ActionEvent event) static byte
createStringChecksum
(StringBuffer nmeaString) Calculate the correct string buffer for an NMEA sentence.long
firstRequiredTime
(PamObservable o, Object arg) static byte
getStringChecksum
(StringBuffer nmeaString) Gets the checksum from the end of a string.void
void
void
void
void
void
pamStart()
Called for each process to tell it to start (may not be necessary for processes which are listening for data anyway).void
pamStop()
Stops the process.void
setSampleRate
(float sampleRate, boolean notify) New sample ratevoid
startNmeaSource
(NMEAParameters.NmeaSources sourceType) Methods inherited from class PamguardMVC.PamProcess
absMillisecondsToSamples, absSamplesToMilliseconds, addData, addMultiPlexDataBlock, addOutputDataBlock, changedThreading, clearOldData, createAnnotations, destroyProcess, dumpBufferStatus, flushDataBlockBuffers, getAncestorDataBlock, getAnnotation, getChainPosition, getCompatibleDataUnits, getCpuPercent, getFrequencyRange, getLastSourceNotificationObject, getLastSourceNotificationType, getMuiltiplexDataBlock, getNumAnnotations, getNumMuiltiplexDataBlocks, getNumOutputDataBlocks, getObserverName, getObserverObject, getOfflineData, getOfflineData, getOutputDataBlock, getOutputDataBlocks, getPamControlledUnit, getParentDataBlock, getParentDataBlocks, getParentProcess, getProcessCheck, getProcessName, getRawSourceDataBlock, getRawSourceDataBlock, getRequiredDataHistory, getSampleRate, getSourceDataBlock, getSourceProcess, hasOutputDatablock, isCanMultiThread, isExternalProcess, isMultiplex, makePamProcess, masterClockUpdate, newData, notifyModelChanged, prepareProcess, prepareProcessOK, processNewBuoyData, receiveSourceNotification, relMillisecondsToSamples, relSamplesToMilliseconds, removeAllDataBlocks, removeAllMultiPlexDataBlocks, removeMultiPlexDataBlock, removeObservable, removeOutputDatablock, resetDataBlocks, saveViewerData, setCanMultiThread, setExternalProcess, setMultiplex, setParentDataBlock, setParentDataBlock, setProcessCheck, setProcessName, setupProcess, toString, updateData
-
Method Details
-
makeSimThread
public void makeSimThread() -
makeUdpThread
public void makeUdpThread() -
makeMulticastThread
public void makeMulticastThread() -
makeSerialThread
public void makeSerialThread() -
startNmeaSource
-
actionPerformed
- Specified by:
actionPerformed
in interfaceActionListener
-
createStringChecksum
Calculate the correct string buffer for an NMEA sentence.The checksum is an exclusive OR of all characters between, but not including the first ($ or !) and the * preceding the checksum
- Parameters:
nmeaString
- NMEA sentence- Returns:
- checksum value.
-
getStringChecksum
Gets the checksum from the end of a string. The is the two characters that follow the *- Parameters:
nmeaString
- NMEA string- Returns:
- Checksum value
-
noteNewSettings
public void noteNewSettings()- Specified by:
noteNewSettings
in interfacePamObserver
- Overrides:
noteNewSettings
in classPamProcess
-
firstRequiredTime
-
setSampleRate
public void setSampleRate(float sampleRate, boolean notify) Description copied from interface:PamObserver
New sample rate- Specified by:
setSampleRate
in interfacePamObserver
- Overrides:
setSampleRate
in classPamProcess
- Parameters:
notify
- Notify other PamObservers and PamObservables in the chain.
-
pamStart
public void pamStart()Description copied from class:PamProcess
Called for each process to tell it to start (may not be necessary for processes which are listening for data anyway).- Specified by:
pamStart
in classPamProcess
-
pamStop
public void pamStop()Description copied from class:PamProcess
Stops the process.- Specified by:
pamStop
in classPamProcess
-
getOutputDatablock
- Returns:
- Returns the outputDatablock.
-
getStatus
- Specified by:
getStatus
in interfaceModuleStatusManager
-