gps.mvc.commands
Class GpsLinkNmeaCommand

java.lang.Object
  extended by gps.mvc.commands.GpsLinkNmeaCommand
All Implemented Interfaces:
GpsLinkExecCommand
Direct Known Subclasses:
GpsLinkHlxCommand

public class GpsLinkNmeaCommand
extends java.lang.Object
implements GpsLinkExecCommand

Author:
Mario De Weerd TODO: Could add 'check' method to validate if an acknowledge corresponds to the command.

Constructor Summary
GpsLinkNmeaCommand(java.lang.String nmeaString)
           
GpsLinkNmeaCommand(java.lang.String nmeaString, boolean hasAck)
           
 
Method Summary
 void execute(GPSrxtx context)
          Do what needs to be done for the specific command.
 java.lang.String getNmeaValue()
           
 boolean hasAck()
          If true, requires acknowledge.
 boolean mustBeFirstInQueue()
          Indicates if the transmit queue must be entirely purged before this command is sent (or not).
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GpsLinkNmeaCommand

public GpsLinkNmeaCommand(java.lang.String nmeaString)

GpsLinkNmeaCommand

public GpsLinkNmeaCommand(java.lang.String nmeaString,
                          boolean hasAck)
Method Detail

getNmeaValue

public java.lang.String getNmeaValue()

mustBeFirstInQueue

public boolean mustBeFirstInQueue()
Description copied from interface: GpsLinkExecCommand
Indicates if the transmit queue must be entirely purged before this command is sent (or not).

Specified by:
mustBeFirstInQueue in interface GpsLinkExecCommand
Returns:
true if queue must be purged.

execute

public void execute(GPSrxtx context)
Description copied from interface: GpsLinkExecCommand
Do what needs to be done for the specific command.

Specified by:
execute in interface GpsLinkExecCommand
Parameters:
context - A reference to the link on which this command operates.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hasAck

public boolean hasAck()
Description copied from interface: GpsLinkExecCommand
If true, requires acknowledge.

Specified by:
hasAck in interface GpsLinkExecCommand
Returns:
true if the command requires an acknowledgde.