gps
Class NaviLinkHandler

java.lang.Object
  extended by gps.NaviLinkHandler

public final class NaviLinkHandler
extends java.lang.Object

Start of low level functions for Navilink devices like the BT-31.

Author:
Mario

Constructor Summary
NaviLinkHandler()
           
 
Method Summary
 void reqNavilinkQryFwVersion()
          PID_QRY_FW_VERSION
Packet to query the firmware version of the device
H->D Payload: 1 byte
Byte 0: 0xFE
Example: [A0 A2 01 00 FE FE 00 B0 B3] The device will return a PID_DATA packet holding the firmware version as a string.
 void reqNavilinkSendData(byte[] bytes, int length)
           
 void reqNavilinkSync()
          PID_SYNC The beginning packet to check if NAVi GPS device is ready or not.
 void sendNavilinkAck()
          PID_ACK
General acknowledge packet
H<->D
Payload: 1 byte
Byte 0: 0x0c
Example: [A0 A2 01 00 0c 0c 00 B0 B3]
 void sendNavilinkNak()
          PID_NAK
General no acknowledge packet
H<->D
Payload: 1 byte
Byte 0: 0x00
Example: [A0 A2 01 00 00 00 00 B0 B3]
 void sendNavilinkQryInformation()
          PID_QRY_INFORMATION
Packet to query NAViGPS information
H->D
Payload: 1 byte
Byte 0: 0x20
Example: [A0 A2 01 00 20 20 00 B0 B3]
Expect to receive a PID_DATA packet with payload data in T_INFORMATION type
 void sendNavilinkQuit()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NaviLinkHandler

public NaviLinkHandler()
Method Detail

reqNavilinkSync

public final void reqNavilinkSync()
PID_SYNC The beginning packet to check if NAVi GPS device is ready or not. H->D
Payload: 1 byte
Byte 0: 0xd6
Example: [A0 A2 01 00 d6 d6 00 B0 B3] Expect to receive PID_ACK if NAViGPS is ready. The result can be failed if NAViGPS is not in link mode or USB connection is not ready.


sendNavilinkAck

public final void sendNavilinkAck()
PID_ACK
General acknowledge packet
H<->D
Payload: 1 byte
Byte 0: 0x0c
Example: [A0 A2 01 00 0c 0c 00 B0 B3]


sendNavilinkNak

public final void sendNavilinkNak()
PID_NAK
General no acknowledge packet
H<->D
Payload: 1 byte
Byte 0: 0x00
Example: [A0 A2 01 00 00 00 00 B0 B3]


sendNavilinkQryInformation

public final void sendNavilinkQryInformation()
PID_QRY_INFORMATION
Packet to query NAViGPS information
H->D
Payload: 1 byte
Byte 0: 0x20
Example: [A0 A2 01 00 20 20 00 B0 B3]
Expect to receive a PID_DATA packet with payload data in T_INFORMATION type


reqNavilinkQryFwVersion

public final void reqNavilinkQryFwVersion()
PID_QRY_FW_VERSION
Packet to query the firmware version of the device
H->D Payload: 1 byte
Byte 0: 0xFE
Example: [A0 A2 01 00 FE FE 00 B0 B3] The device will return a PID_DATA packet holding the firmware version as a string.


reqNavilinkSendData

public final void reqNavilinkSendData(byte[] bytes,
                                      int length)

sendNavilinkQuit

public final void sendNavilinkQuit()