Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
com.phidgets.GPSPhidget Class Reference
Inheritance diagram for com.phidgets.GPSPhidget:
Inheritance graph
[legend]

List of all members.

Public Member Functions

final void addGPSPositionChangeListener (GPSPositionChangeListener l)
final void addGPSPositionFixStatusChangeListener (GPSPositionFixStatusChangeListener l)
native double getAltitude () throws PhidgetException
native Calendar getDateAndTime () throws PhidgetException
native double getHeading () throws PhidgetException
native double getLatitude () throws PhidgetException
native double getLongitude () throws PhidgetException
native boolean getPositionFixStatus () throws PhidgetException
native double getVelocity () throws PhidgetException
 GPSPhidget () throws PhidgetException
final void removeGPSPositionChangeListener (GPSPositionChangeListener l)
final void removeGPSPositionFixStatusChangeListener (GPSPositionFixStatusChangeListener l)

Private Member Functions

final void enableDeviceSpecificEvents (boolean b)
native void enableGPSPositionChangeEvents (boolean b)
native void enableGPSPositionFixStatusChangeEvents (boolean b)
void fireGPSPositionChange (GPSPositionChangeEvent e)
void fireGPSPositionFixStatusChange (GPSPositionFixStatusChangeEvent e)

Static Private Member Functions

static native long create () throws PhidgetException

Private Attributes

LinkedList gpsPositionChangeListeners = new LinkedList ()
LinkedList gpsPositionFixStatusChangeListeners = new LinkedList ()
long nativeGPSPositionChangeHandler = 0
long nativeGPSPositionFixStatusChangeHandler = 0

Detailed Description

This class represents a Phidget GPS. All methods to manipulate the Phidget GPS are implemented in this class. See your device's User Guide for more specific API details, technical information, and revision details. The User Guide, along with other resources, can be found on the product page for your device.

Author:
Phidgets Inc.

Definition at line 21 of file GPSPhidget.java.


Constructor & Destructor Documentation

Definition at line 23 of file GPSPhidget.java.


Member Function Documentation

final void com.phidgets.GPSPhidget.addGPSPositionChangeListener ( GPSPositionChangeListener  l) [inline]

Adds a position change listener. The position change handler is a method that will be called when the position changes.

There is no limit on the number of position change handlers that can be registered for a particular Phidget.

Parameters:
lAn implemetation of the GPSPositionChangeListener interface

Definition at line 131 of file GPSPhidget.java.

final void com.phidgets.GPSPhidget.addGPSPositionFixStatusChangeListener ( GPSPositionFixStatusChangeListener  l) [inline]

Adds a position fix status change listener. The position fix status change handler is a method that will be called when the position fix status changes.

There is no limit on the number of position fix status change handlers that can be registered for a particular Phidget.

Parameters:
lAn implemetation of the GPSPositionFixStatusChangeListener interface

Definition at line 101 of file GPSPhidget.java.

static native long com.phidgets.GPSPhidget.create ( ) throws PhidgetException [static, private]
final void com.phidgets.GPSPhidget.enableDeviceSpecificEvents ( boolean  b) [inline, private]

Reimplemented from com.phidgets.Phidget.

Definition at line 89 of file GPSPhidget.java.

void com.phidgets.GPSPhidget.fireGPSPositionChange ( GPSPositionChangeEvent  e) [inline, private]

Definition at line 145 of file GPSPhidget.java.

void com.phidgets.GPSPhidget.fireGPSPositionFixStatusChange ( GPSPositionFixStatusChangeEvent  e) [inline, private]

Definition at line 115 of file GPSPhidget.java.

Returns the current altitude, in meters.

Returns:
Current altitude, in meters.
Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached, or if the GPS is not plugged into the board. See open for information on determining if a device is attached. If the altitude is not available, an EPHIDGET_UNKNOWNVAL exception is thrown.

Returns the current GPS date and time, in UTC. The time is updated 10 times a second and is accurate to within at least 500ms when getPositionFixStatus is true.

Returns:
Current GPS date and time.
Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached, or if the GPS is not plugged into the board. See open for information on determining if a device is attached. If the date or time are not available, an EPHIDGET_UNKNOWNVAL exception is thrown.

Returns the current heading, in degrees - compass bearing format. Heading is only accurate if the GPS is moving, and it represents a heading over time, and not the actual direction the PhidgetGPS is pointing. exception is thrown.

Returns:
Heading in degrees(compass bearing format).
Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached, or if the GPS is not plugged into the board. See open for information on determining if a device is attached. If the heading is not available, an EPHIDGET_UNKNOWNVAL.

Returns the current latitude, in signed degrees format.

Returns:
Current latitude, in signed degrees format.
Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached, or if the GPS is not plugged into the board. See open for information on determining if a device is attached. If the latitude is not available, an EPHIDGET_UNKNOWNVAL exception is thrown.

Returns the current longitude, in signed degrees format.

Returns:
Current longitude, in signed degrees format.
Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached, or if the GPS is not plugged into the board. See open for information on determining if a device is attached. If the longitude is not available, an EPHIDGET_UNKNOWNVAL exception is thrown.

Returns the current position fix status. If true, all of the above properties will be available. Time and date may or may not be available, but they can only be trusted as accurate when the PositionFixStatus is true.

Returns:
Current position fix status.
Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached, or if the GPS is not plugged into the board. See open for information on determining if a device is attached. If false, the getHeading / getVelocity will throw an EPHIDGET_UNKNOWN exception.

Returns the current velocity, in km/h. Velocity is only accurate if the PhidgetGPS is moving.

Returns:
Velocity in km/h.
Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached, or if the GPS is not plugged into the board. See open for information on determining if a device is attached. If the velocity is not available, an EPHIDGET_UNKNOWNVAL exception is thrown.
final void com.phidgets.GPSPhidget.removeGPSPositionChangeListener ( GPSPositionChangeListener  l) [inline]

Definition at line 139 of file GPSPhidget.java.

final void com.phidgets.GPSPhidget.removeGPSPositionFixStatusChangeListener ( GPSPositionFixStatusChangeListener  l) [inline]

Definition at line 109 of file GPSPhidget.java.


Member Data Documentation

LinkedList com.phidgets.GPSPhidget.gpsPositionChangeListeners = new LinkedList () [private]

Definition at line 137 of file GPSPhidget.java.

LinkedList com.phidgets.GPSPhidget.gpsPositionFixStatusChangeListeners = new LinkedList () [private]

Definition at line 107 of file GPSPhidget.java.

Definition at line 138 of file GPSPhidget.java.

Definition at line 108 of file GPSPhidget.java.


The documentation for this class was generated from the following file:


pedal_monitor
Author(s): Pedro Mendes
autogenerated on Fri Jun 6 2014 18:37:22