#include <GPSInterface_GPSD.h>


Public Member Functions | |
| GPSInterface_GPSD () | |
| Constructor - zero out everything. | |
| virtual | ~GPSInterface_GPSD () |
| Destructor - nothing to do. | |
| virtual wxString | Name () |
| Returns name of this GPS module. | |
| virtual EGPSStatus | GetData (wxGPSEvent *pGPSEvent) |
| Tries to get updated data from gpsd server. | |
| virtual wxString | GetLastError () |
| Returns an explanation of the last error. | |
| virtual EGPSStatus | AutoDetect (wxThread *pThread) |
| Attempts to autodetect if a gpsd server is present. | |
Private Member Functions | |
| wxString | GPSDConnect (wxSocketClient *psockGPSD, wxString strHost, int iPort) |
| Attempt to connect to a gpsd server. | |
| wxString | GPSDDisconnect (wxSocketBase *psockGPSD) |
| Disconnect from gpsd server. | |
| wxString | GPSDGetProtocolVersion (wxSocketBase *psockGPSD, int *piProtocolVersion, int *piMajorGPSDVersion, int *piMinorGPSDVersion, wxString *pstrCommands) |
| Retrieves information about the gpsd server. | |
| wxString | GPSDGetPosition (wxSocketBase *psockGPSD, int iProtocolVersion, Point *pptGPS) |
| Retrieves the gps position from the gpsd server. | |
| wxString | GPSDGetHeading (wxSocketBase *psockGPSD, int iProtocolVersion, double *pfHeading) |
| Retrieves the gps heading from the gpsd server. | |
| wxString | GPSDGetSpeed (wxSocketBase *psockGPSD, int iProtocolVersion, double *pfSpeed) |
| Retrieves the gps speed from the gpsd server. | |
| wxString | GPSDGetLastTimestamp (wxSocketBase *psockGPSD, int iProtocolVersion, double *pfLastTimestamp) |
| Retrieves the timestamp of the last lock. | |
| wxString | GPSDGetLockType (wxSocketBase *psockGPSD, int iProtocolVersion, int *piLockType) |
| Retrieves the gps lock type from the gpsd server. | |
| wxString | GPSDGetSatelliteInfo (wxSocketBase *psockGPSD, int iProtocolVersion, std::vector< SSatelliteInfo > *pvSatInfo, int *pnSatellitesUsed) |
| wxString | GPSDSetBufferingPolicy (wxSocketBase *psockGPSD, int iProtocolVersion, int iBufferingPolicy) |
| Sets the gpsd buffering policy. | |
Private Attributes | |
| wxSocketClient * | m_sockGPSD |
| Socket to gpsd server. | |
| int | m_iGPSDProtocolVersion |
| gpsd server protocol version | |
| double | m_fGPSDLastTimestamp |
| Timestamp of last GPS coordinates, as reported by gpsd. | |
| wxDateTime | m_tLastGPSSentence |
| Local time of last valid GPS sentence. | |
| double | m_fMinimumSpeedForHeading |
| Minimum speed the vehicle must be moving to accept the heading reported by gpsd. | |
| wxString | m_strLastError |
| Last error messages. | |
| double | m_fLastHeading |
| Last valid heading. | |
| double | m_fLastSpeed |
| Last valid speed. | |
| SSatelliteInfo | m_arLastSatellitesVisible [MAX_GPS_SATELLITES] |
| Last valid satellite info. | |
| int | m_nLastSatellitesVisible |
| long | m_nLastSatUsedForLock |
| Last number of satellites used for lock. | |
| int | m_iLastLockType |
| Last valid lock type. | |
Definition at line 43 of file GPSInterface_GPSD.h.
| GPSInterface_GPSD::GPSInterface_GPSD | ( | ) |
| GPSInterface_GPSD::~GPSInterface_GPSD | ( | ) | [virtual] |
| wxString GPSInterface_GPSD::Name | ( | ) | [virtual] |
Returns name of this GPS module.
Implements IGPSInterface.
Definition at line 84 of file GPSInterface_GPSD.cpp.
| IGPSInterface::EGPSStatus GPSInterface_GPSD::GetData | ( | wxGPSEvent * | pGPSEvent | ) | [virtual] |
Tries to get updated data from gpsd server.
| pGPSEvent | Receives updated gps data. |
Implements IGPSInterface.
Definition at line 100 of file GPSInterface_GPSD.cpp.
| wxString GPSInterface_GPSD::GetLastError | ( | ) | [virtual] |
Returns an explanation of the last error.
Implements IGPSInterface.
Definition at line 412 of file GPSInterface_GPSD.cpp.
| IGPSInterface::EGPSStatus GPSInterface_GPSD::AutoDetect | ( | wxThread * | pThread | ) | [virtual] |
Attempts to autodetect if a gpsd server is present.
| pThread | Pointer to wxThread obtain this code is running in. |
Implements IGPSInterface.
Definition at line 388 of file GPSInterface_GPSD.cpp.
| wxString GPSInterface_GPSD::GPSDConnect | ( | wxSocketClient * | psockGPSD, | |
| wxString | strHost, | |||
| int | iPort | |||
| ) | [private] |
Attempt to connect to a gpsd server.
| psockGPSD | Pointer to socket used to connect to gpsd server. | |
| strHost | Hostname of gpsd server. | |
| iPort | Port number of gpsd server. |
Definition at line 427 of file GPSInterface_GPSD.cpp.
| wxString GPSInterface_GPSD::GPSDDisconnect | ( | wxSocketBase * | psockGPSD | ) | [private] |
Disconnect from gpsd server.
| psockGPSD | Pointer to socket connected to gpsd server. |
Definition at line 457 of file GPSInterface_GPSD.cpp.
| wxString GPSInterface_GPSD::GPSDGetProtocolVersion | ( | wxSocketBase * | psockGPSD, | |
| int * | piProtocolVersion, | |||
| int * | piMajorGPSDVersion, | |||
| int * | piMinorGPSDVersion, | |||
| wxString * | pstrCommands | |||
| ) | [private] |
Retrieves information about the gpsd server.
| psockGPSD | Socket connected to gpsd server. | |
| piProtocolVersion | Returns gpsd protocol version. | |
| piMajorGPSDVersion | Returns major gpsd version. | |
| piMinorGPSDVersion | Returns minor gpsd version. | |
| pstrCommands | Returns a string containing the commands the gpsd server supports. |
Definition at line 481 of file GPSInterface_GPSD.cpp.
| wxString GPSInterface_GPSD::GPSDGetPosition | ( | wxSocketBase * | psockGPSD, | |
| int | iProtocolVersion, | |||
| Point * | pptGPS | |||
| ) | [private] |
Retrieves the gps position from the gpsd server.
| psockGPSD | Socket connected to gpsd server. | |
| iProtocolVersion | Protocol version used by gpsd server. | |
| pptGPS | Returns gps coordinates |
Definition at line 578 of file GPSInterface_GPSD.cpp.
| wxString GPSInterface_GPSD::GPSDGetHeading | ( | wxSocketBase * | psockGPSD, | |
| int | iProtocolVersion, | |||
| double * | pfHeading | |||
| ) | [private] |
Retrieves the gps heading from the gpsd server.
| psockGPSD | Socket connected to gpsd server. | |
| iProtocolVersion | Protocol version used by gpsd server. | |
| pfHeading | Returns the heading from the gpsd server. |
Definition at line 680 of file GPSInterface_GPSD.cpp.
| wxString GPSInterface_GPSD::GPSDGetSpeed | ( | wxSocketBase * | psockGPSD, | |
| int | iProtocolVersion, | |||
| double * | pfSpeed | |||
| ) | [private] |
Retrieves the gps speed from the gpsd server.
| psockGPSD | Socket connected to gpsd server. | |
| iProtocolVersion | Protocol version used by gpsd server. | |
| pfSpeed | Returns the gps speed from the gpsd server. |
Definition at line 766 of file GPSInterface_GPSD.cpp.
| wxString GPSInterface_GPSD::GPSDGetLastTimestamp | ( | wxSocketBase * | psockGPSD, | |
| int | iProtocolVersion, | |||
| double * | pfTimestamp | |||
| ) | [private] |
Retrieves the timestamp of the last lock.
| psockGPSD | Socket connected to gpsd server. | |
| iProtocolVersion | Protocol version used by gpsd server. | |
| pfTimestamp | Returns the timestamp of the last lock. |
Definition at line 1076 of file GPSInterface_GPSD.cpp.
| wxString GPSInterface_GPSD::GPSDGetLockType | ( | wxSocketBase * | psockGPSD, | |
| int | iProtocolVersion, | |||
| int * | piLockType | |||
| ) | [private] |
Retrieves the gps lock type from the gpsd server.
| psockGPSD | Socket connected to gpsd server. | |
| iProtocolVersion | Protocol version used by gpsd server. | |
| piLockType | Returns the lock type from the gpsd server. |
Definition at line 855 of file GPSInterface_GPSD.cpp.
| wxString GPSInterface_GPSD::GPSDGetSatelliteInfo | ( | wxSocketBase * | psockGPSD, | |
| int | iProtocolVersion, | |||
| std::vector< SSatelliteInfo > * | pvSatInfo, | |||
| int * | pnSatellitesUsed | |||
| ) | [private] |
| wxString GPSInterface_GPSD::GPSDSetBufferingPolicy | ( | wxSocketBase * | psockGPSD, | |
| int | iProtocolVersion, | |||
| int | iBufferingPolicy | |||
| ) | [private] |
Sets the gpsd buffering policy.
| psockGPSD | Socket connected to gpsd server. | |
| iProtocolVersion | Protocol version used by gpsd server. | |
| iBufferingPolicy | Buffering policy to set |
Definition at line 1162 of file GPSInterface_GPSD.cpp.
wxSocketClient* GPSInterface_GPSD::m_sockGPSD [private] |
int GPSInterface_GPSD::m_iGPSDProtocolVersion [private] |
double GPSInterface_GPSD::m_fGPSDLastTimestamp [private] |
Timestamp of last GPS coordinates, as reported by gpsd.
Definition at line 72 of file GPSInterface_GPSD.h.
wxDateTime GPSInterface_GPSD::m_tLastGPSSentence [private] |
double GPSInterface_GPSD::m_fMinimumSpeedForHeading [private] |
Minimum speed the vehicle must be moving to accept the heading reported by gpsd.
Definition at line 78 of file GPSInterface_GPSD.h.
wxString GPSInterface_GPSD::m_strLastError [private] |
double GPSInterface_GPSD::m_fLastHeading [private] |
double GPSInterface_GPSD::m_fLastSpeed [private] |
SSatelliteInfo GPSInterface_GPSD::m_arLastSatellitesVisible[MAX_GPS_SATELLITES] [private] |
int GPSInterface_GPSD::m_nLastSatellitesVisible [private] |
Definition at line 92 of file GPSInterface_GPSD.h.
long GPSInterface_GPSD::m_nLastSatUsedForLock [private] |
int GPSInterface_GPSD::m_iLastLockType [private] |
1.5.5