gps.mvc
Class WPController

java.lang.Object
  extended by gps.mvc.MtkController
      extended by gps.mvc.WPController
All Implemented Interfaces:
WondeproudConstants

public class WPController
extends MtkController
implements WondeproudConstants

Controller for Wonde Proud devices like the BT-BT110m

Author:
Mario De Weerd

Field Summary
static int DATA_DATE_TIME
           
static int DATA_DEV_INFO1
           
 
Fields inherited from class gps.mvc.MtkController
CMD_AUTOLOG_OFF, CMD_AUTOLOG_ON, CMD_CANCEL_GETLOG, CMD_COLDSTART, CMD_EPO_CLEAR, CMD_ERASE_LOG, CMD_FACTORYRESET, CMD_HOTSTART, CMD_SET_DEVICE_NAME, CMD_SET_GPS_FIX_INTERVAL, CMD_SET_LOG_DISTANCE_INTERVAL, CMD_SET_LOG_OVERWRITE, CMD_SET_LOG_SPEED_INTERVAL, CMD_SET_LOG_TIME_INTERVAL, CMD_SET_POWERSAVE_ENABLED, CMD_SET_SBAS_ENABLED, CMD_SET_SBAS_TEST_ENABLED, CMD_STARTLOG, CMD_STOP_WAITING_FOR_ERASE, CMD_STOPLOG, CMD_WARMSTART
 
Fields inherited from interface gps.WondeproudConstants
REQ_DATE_TIME, REQ_DEV_INFO1, REQ_DEV_PARAM, REQ_ERASE, REQ_LOG, REQ_MEM_IN_USE, REQ_SELFTEST, REQ_UNKNOWN2, REQ_UNKNOWN3, SET_PARAM, WP_AP_EXIT, WP_CAMERA_DETECT, WP_GPS_PLUS_RESPONSE, WP_UPDATE_OVER
 
Constructor Summary
WPController(GpsController c, MtkModel m)
           
 
Method Summary
 boolean cmd(int cmd)
          Handles commands with no parameters Support for Holux-specific commands, otherwise delegates to standard MTK
 boolean cmd(int cmd, CmdParam param)
          Handles commands with a parameter Support for Holux-specific commands, otherwise delegates to standard MTK
 void getLog(BT747Path path)
          Fetches a log to the given filename.
 boolean isSupportedCmd(int cmd)
          Check if a command is supported.
 boolean reqData(int dataType)
          Device-specific implementation of requesting GPS data.
 void reqWPDateTime()
          Request data from the log.
 void reqWPDeviceInfo()
          Get device information Command 0x5bb00000.
 void reqWPErase()
          Erases log data.
 void reqWPTest()
          Do some selftest.
 
Methods inherited from class gps.mvc.MtkController
getLogInit, getMtkModel, logImmediate, notifyDisconnected, notifyRun, recoveryEraseLog, replyToOkToOverwrite, sendMtkBin, setAgpsData, setBinMode, setBtMacAddr, setDatumMode, setDGPSMode, setFlashUserOption, setLogFormat, setLogRequestAhead, setNMEADefaultPeriods, setNmeaMode, setNMEAPeriods
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATA_DATE_TIME

public static final int DATA_DATE_TIME
See Also:
Constant Field Values

DATA_DEV_INFO1

public static final int DATA_DEV_INFO1
See Also:
Constant Field Values
Constructor Detail

WPController

public WPController(GpsController c,
                    MtkModel m)
Parameters:
m -
Method Detail

getLog

public void getLog(BT747Path path)
Fetches a log to the given filename.

Overrides:
getLog in class MtkController
Parameters:
path - Path reference.

cmd

public boolean cmd(int cmd)
Handles commands with no parameters Support for Holux-specific commands, otherwise delegates to standard MTK

Overrides:
cmd in class MtkController
Parameters:
cmd - Command identification.
Returns:
true is command is supported.

cmd

public boolean cmd(int cmd,
                   CmdParam param)
Handles commands with a parameter Support for Holux-specific commands, otherwise delegates to standard MTK

Overrides:
cmd in class MtkController
Parameters:
cmd - Command identification.
Returns:
true is command is supported.

isSupportedCmd

public boolean isSupportedCmd(int cmd)
Description copied from class: MtkController
Check if a command is supported.

Overrides:
isSupportedCmd in class MtkController
Parameters:
cmd - Command identification.
Returns:
true is command is supported.

reqData

public boolean reqData(int dataType)
Device-specific implementation of requesting GPS data. For most cases delegates to a existing PMTK command while new functionality will be gradually implemented for this device type.

Overrides:
reqData in class MtkController
Returns:
true if supported.

reqWPDateTime

public final void reqWPDateTime()
Request data from the log. Command 0x60b80000. Response: 16 bytes of representing date and time. 0E 18 05 09 0A 0B FF FF FF FF FF FF FF FF FF FF


reqWPTest

public final void reqWPTest()
Do some selftest. Command 0x60b80000.


reqWPErase

public final void reqWPErase()
Erases log data. Command 0x61b60000. Response: WP Update Over


reqWPDeviceInfo

public final void reqWPDeviceInfo()
Get device information Command 0x5bb00000. Response: Byte 8-5: Serial number Byte 41-48: Device type [BT-CD100 = Nemerix] [BT-CD160=SIRFIII]