gps.mvc.commands
Interface GpsLinkExecCommand

All Known Implementing Classes:
Acknowledge, EpoReply, GpsLinkHlxCommand, GpsLinkNmeaCommand, MtkBinCommand, SetMtkBinModeCommand, SetNmeaModeCommand, WPDeviceReplyCommand, WPDeviceStrCommand, WPEnterModeCommand, WPExitModeCommand, WPIntCommand, WPStrCommand

public interface GpsLinkExecCommand

A GpsLinkExecCommand can be put on the command queue where the execute(GPSrxtx) method will be called with the GPSrxtx context. This allows for improved flexibility in extending the link interface protocol and managing link state changes. Some concrete Commands can probably be implemented as Singletons in some cases but that may not be really needed for performance. If so, a getInstance method should be provided in the concrete class.

Author:
Mario De Weerd

Method Summary
 void execute(GPSrxtx context)
          Do what needs to be done for the specific command.
 boolean hasAck()
          If true, requires acknowledge.
 boolean mustBeFirstInQueue()
          Indicates if the transmit queue must be entirely purged before this command is sent (or not).
 

Method Detail

execute

void execute(GPSrxtx context)
Do what needs to be done for the specific command.

Parameters:
context - A reference to the link on which this command operates.

mustBeFirstInQueue

boolean mustBeFirstInQueue()
Indicates if the transmit queue must be entirely purged before this command is sent (or not).

Returns:
true if queue must be purged.

hasAck

boolean hasAck()
If true, requires acknowledge.

Returns:
true if the command requires an acknowledgde.