C# Class Microsoft.WindowsMobile.Samples.Location.Gps

Summary description for GPS.
Exibir arquivo Open project: ushahidi/Ushahidi_WinMobile Class Usage Examples

Public Methods

Method Description
Close ( ) : void

Closes the gps device.

GetDeviceState ( ) : Microsoft.WindowsMobile.Samples.Location.GpsDeviceState

Queries the device state.

GetPosition ( ) : GpsPosition

Get the position reported by the GPS receiver

GetPosition ( System.TimeSpan maxAge ) : GpsPosition

Get the position reported by the GPS receiver that is no older than the maxAge passed in

Gps ( ) : System
Open ( ) : void

Opens the GPS device and prepares to receive data from it.

Private Methods

Method Description
CloseHandle ( IntPtr hObject ) : int
CreateEvent ( IntPtr lpEventAttributes, int bManualReset, int bInitialState, StringBuilder lpName ) : IntPtr
CreateGpsEventThread ( ) : void

Creates our event thread that will receive native events

EventModify ( IntPtr hHandle, int dwFunc ) : int
GPSCloseDevice ( IntPtr hGPSDevice ) : int
GPSGetDeviceState ( IntPtr pGPSDevice ) : int
GPSGetPosition ( IntPtr hGPSDevice, IntPtr pGPSPosition, int dwMaximumAge, int dwFlags ) : int
GPSOpenDevice ( IntPtr hNewLocationData, IntPtr hDeviceStateChange, string szDeviceName, int dwFlags ) : IntPtr
WaitForGpsEvents ( ) : void

Method used to listen for native events from the GPS.

WaitForMultipleObjects ( int nCount, IntPtr lpHandles, int fWaitAll, int dwMilliseconds ) : int

Method Details

Close() public method

Closes the gps device.
public Close ( ) : void
return void

GetDeviceState() public method

Queries the device state.
public GetDeviceState ( ) : Microsoft.WindowsMobile.Samples.Location.GpsDeviceState
return Microsoft.WindowsMobile.Samples.Location.GpsDeviceState

GetPosition() public method

Get the position reported by the GPS receiver
public GetPosition ( ) : GpsPosition
return GpsPosition

GetPosition() public method

Get the position reported by the GPS receiver that is no older than the maxAge passed in
public GetPosition ( System.TimeSpan maxAge ) : GpsPosition
maxAge System.TimeSpan Max age of the gps position data that you want back. /// If there is no data within the required age, null is returned. /// if maxAge == TimeSpan.Zero, then the age of the data is ignored
return GpsPosition

Gps() public method

public Gps ( ) : System
return System

Open() public method

Opens the GPS device and prepares to receive data from it.
public Open ( ) : void
return void