MGPS::SOURCE Class Reference

Base class for GPS Source. More...

#include <mi32/mgps.h>

Inheritance diagram for MGPS::SOURCE:
Inheritance graph
[legend]

List of all members.

Classes

class  OBSERVER
 Observer class to derive from to be notified of events on this source. More...

Public Types

enum  STATUS {
  STATUS_Good = 0, STATUS_NoResponse = 1, STATUS_Initializing = 2, STATUS_Acquiring = 3,
  STATUS_SignalLost = 4, STATUS_EndOfLogFile = 5, STATUS_Error = 6
}
enum  SYMBOLTYPE { SYMBOLTYPE_Stopped = 0, SYMBOLTYPE_Moving = 1 }

Public Member Functions

 SOURCE ()
virtual ~SOURCE ()
void Close ()
void CloseControlDialog ()
MGUI::FORMCreateControlForm (MGUI::LAYOUT_PANE_BASE &parentpane)
void DeleteFromIni () const
const SPATREF::COORDREFSYSGetCoordRefSys () const
const char * GetIniGroupKey () const
bool GetLastData (REPORT *gpsdata) const
const MISTRINGGetName () const
double GetPollInterval () const
STATUS GetStatus () const
const SYMBOLGetSymbol (SYMBOLTYPE symboltype) const
bool IsDevice () const
bool IsManaged () const
bool IsOpen () const
int Manage ()
ERRVALUE Open ()
void OpenControlDialog ()
int ReadNext ()
void SetName (const MISTRING &name)
void SetPollInterval (double PollInterval)
void SetSymbol (SYMBOLTYPE symboltype, const SYMBOL &symbol, bool UpdateIni)
void Unmanage ()

Protected Member Functions

void ClearLastData ()
MDLGPARENT GetDlgParent () const
bool HasData () const
void ReadIniSettings (const char *IniGroup)
void SetCurrentData (const REPORT &gpsdata)
void SetCurrentStatus (STATUS status)
void SetDlgParent (MDLGPARENT dlgparent)

Private Member Functions

virtual void v_Close ()
virtual MGUI::FORMv_CreateControlForm (MGUI::LAYOUT_PANE_BASE &parentpane)=0
virtual void v_DeleteFromIni () const
virtual bool v_IsDevice () const
virtual int v_Open ()=0
virtual int v_ReadNext ()=0

Detailed Description

Base class for GPS Source.


Member Enumeration Documentation

Enumerator:
STATUS_Good 

Good signal, data available.

STATUS_NoResponse 

No response from device.

STATUS_Initializing 

Initializing.

STATUS_Acquiring 

Acquiring signal from satellites.

STATUS_SignalLost 

Lost signal from satellites.

STATUS_EndOfLogFile 

End of log file.

STATUS_Error 
Enumerator:
SYMBOLTYPE_Stopped 

Symbol to show while stopped.

SYMBOLTYPE_Moving 

Symbol to show while moving.


Constructor & Destructor Documentation

MGPS::SOURCE::SOURCE (  ) 

Constructor.

virtual MGPS::SOURCE::~SOURCE (  )  [virtual]

Destructor.


Member Function Documentation

void MGPS::SOURCE::ClearLastData (  )  [inline, protected]

Clear last GPS position.

void MGPS::SOURCE::Close (  ) 
void MGPS::SOURCE::CloseControlDialog (  ) 

Close control dialog for this source.

MGUI::FORM* MGPS::SOURCE::CreateControlForm ( MGUI::LAYOUT_PANE_BASE parentpane  )  [inline]

Create "form" for source controls.

void MGPS::SOURCE::DeleteFromIni (  )  const [inline]

Delete source definition from .ini file.

const SPATREF::COORDREFSYS& MGPS::SOURCE::GetCoordRefSys (  )  const [inline]
MDLGPARENT MGPS::SOURCE::GetDlgParent (  )  const [inline, protected]

Get parent for dialogs.

const char* MGPS::SOURCE::GetIniGroupKey (  )  const [inline]
bool MGPS::SOURCE::GetLastData ( REPORT gpsdata  )  const [inline]

Get last GPS position.

Returns:
True if have data, false if not.
Parameters:
gpsdata Position information returned
const MISTRING& MGPS::SOURCE::GetName (  )  const [inline]

Get name of source.

Returns:
Name string, do not free.
double MGPS::SOURCE::GetPollInterval (  )  const [inline]

Get current polling interval.

Returns:
Polling interval in seconds.
STATUS MGPS::SOURCE::GetStatus (  )  const [inline]

Get current source status.

Returns:
Status.
const SYMBOL& MGPS::SOURCE::GetSymbol ( SYMBOLTYPE  symboltype  )  const [inline]

Get symbol definition.

Returns:
Symbol.
Parameters:
symboltype Symbol type
bool MGPS::SOURCE::HasData (  )  const [inline, protected]

See if has current GPS position.

bool MGPS::SOURCE::IsDevice (  )  const [inline]

Determine if source is a "device" or not.

bool MGPS::SOURCE::IsManaged (  )  const [inline]

Determine if source is "managed".

Returns:
True if managed, false if not.
bool MGPS::SOURCE::IsOpen (  )  const [inline]

Determine if source is "open".

Returns:
True if open, false if not.
int MGPS::SOURCE::Manage (  ) 

Place source under control of "source manager".

ERRVALUE MGPS::SOURCE::Open (  ) 

Open source.

void MGPS::SOURCE::OpenControlDialog (  ) 

Open control dialog for source.

void MGPS::SOURCE::ReadIniSettings ( const char *  IniGroup  )  [protected]

Read user settings for source from Ini file.

int MGPS::SOURCE::ReadNext (  )  [inline]

Read next available value.

void MGPS::SOURCE::SetCurrentData ( const REPORT gpsdata  )  [inline, protected]

Set current GPS data.

void MGPS::SOURCE::SetCurrentStatus ( STATUS  status  )  [inline, protected]

Set the current source status.

void MGPS::SOURCE::SetDlgParent ( MDLGPARENT  dlgparent  )  [inline, protected]
void MGPS::SOURCE::SetName ( const MISTRING name  )  [inline]

Set name of source.

Parameters:
name New name
void MGPS::SOURCE::SetPollInterval ( double  PollInterval  ) 

Set polling interval.

Parameters:
PollInterval New polling interval in seconds
void MGPS::SOURCE::SetSymbol ( SYMBOLTYPE  symboltype,
const SYMBOL symbol,
bool  UpdateIni 
)

Set new symbol.

Parameters:
symboltype Symbol type
symbol New symbol definition
UpdateIni Set if should update Ini settings
void MGPS::SOURCE::Unmanage (  ) 

Unmanage source.

virtual void MGPS::SOURCE::v_Close (  )  [private, virtual]

Close source.

virtual MGUI::FORM* MGPS::SOURCE::v_CreateControlForm ( MGUI::LAYOUT_PANE_BASE parentpane  )  [private, pure virtual]

Create "form" for source controls.

virtual void MGPS::SOURCE::v_DeleteFromIni (  )  const [private, virtual]

Delete source definition from .ini file.

virtual bool MGPS::SOURCE::v_IsDevice (  )  const [private, virtual]

Determine if source is a "device" or not.

virtual int MGPS::SOURCE::v_Open (  )  [private, pure virtual]

Open source.

virtual int MGPS::SOURCE::v_ReadNext (  )  [private, pure virtual]

Read next available value.


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

Generated on Sun Oct 7 21:35:23 2012 for TNTsdk 2012 by  doxygen 1.6.1