jwo.landserf.process.gps.garmin
Class ConnectionTest

java.lang.Object
  extended by jwo.landserf.process.gps.garmin.ConnectionTest
All Implemented Interfaces:
GPSTransferListener, GPSWaypointListener

public class ConnectionTest
extends Object
implements GPSWaypointListener

A simple test-program that queries the GPS for a description of itself. Attempts to turn off the GPS after retrieving the description.

Version:
2.3, 20th August, 2006
Author:
Jo Wood, based on the design by Henrik Sorensen (haas@itu.dk).

Constructor Summary
ConnectionTest()
          Tests the GPS connection.
 
Method Summary
static void main(String[] args)
          Tests the connection with GPS.
 void transferComplete(int commandID)
          Called when the transfer to/from GPS is complete.
 void transferStarted(int number)
          Called when a transfer to/from GPS is initiated.
 void waypointReceived(GPSWaypoint wp)
          Handles the receipt of a waypoint from the GPS.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionTest

public ConnectionTest()
Tests the GPS connection.

Method Detail

main

public static void main(String[] args)
Tests the connection with GPS.

Parameters:
args - Command line arguments (ignored).

transferStarted

public void transferStarted(int number)
Called when a transfer to/from GPS is initiated.

Specified by:
transferStarted in interface GPSTransferListener
Parameters:
number - The amount of data that will be transferred, e.g. the amount of waypoints. If it's not possible to tell how much data will be transferred, number will be -1.

transferComplete

public void transferComplete(int commandID)
Called when the transfer to/from GPS is complete.

Specified by:
transferComplete in interface GPSTransferListener
Parameters:
commandID - ID of command that has been completed.

waypointReceived

public void waypointReceived(GPSWaypoint wp)
Handles the receipt of a waypoint from the GPS.

Specified by:
waypointReceived in interface GPSWaypointListener
Parameters:
wp - Waypoint information from the GPS.


Copyright Jo Wood, 1996-2009, last modified, 17th April, 2009