GpsProcessor allows forwarding the gps data from platform plugin to Android container and process gps data which is in one of the following forms . GGA NEMA sentence . RMC NEMA sentence . GNSS NEMA sentence Please check http://www.gpsinformation.org/dale/nmea.htm out for more details about the above NEMA sentence.
More...
#include <gps_processor.h>
GpsProcessor allows forwarding the gps data from platform plugin to Android container and process gps data which is in one of the following forms . GGA NEMA sentence . RMC NEMA sentence . GNSS NEMA sentence Please check http://www.gpsinformation.org/dale/nmea.htm out for more details about the above NEMA sentence.
Definition at line 38 of file gps_processor.h.
◆ GpsProcessor() [1/2]
anbox::GpsProcessor::GpsProcessor |
( |
| ) |
|
|
default |
◆ ~GpsProcessor()
virtual anbox::GpsProcessor::~GpsProcessor |
( |
| ) |
|
|
virtualdefault |
◆ GpsProcessor() [2/2]
◆ inject_data()
virtual int anbox::GpsProcessor::inject_data |
( |
AnboxGpsData |
data | ) |
|
|
pure virtual |
Inject gps data into AnboxPlatform.
This function allows injecting gps data into the platform and letting the GpsProcessor handle the gps data.
- Parameters
-
data | a chunk of gps data to be pushed into the internal queue. |
- Returns
- 0 on success, otherwise returns EINVAL on error occurs.
- Note
- This function is only used in our test suite to facilitate our automation tests and it is subject to change at any time.
◆ operator=()
◆ read_data()
virtual int anbox::GpsProcessor::read_data |
( |
AnboxGpsData * |
data, |
|
|
int |
timeout |
|
) |
| |
|
pure virtual |
Read available gps data.
Anbox will call read_data() to query the plugin for the next available gps data which is then forwarded to the Android container. If no gps data is available and timeout is set to -1, the function must block until gps data is available.
- Parameters
-
gps | data provided by the processor on a successful read |
timeout | maximum number of milliseconds to wait for the next available gps data. The following possible values for timeout must be handled:
timeout | Behavior |
0 | Non-blocking mode; return -EIO immediately if no gps data to process. |
< 0 | Block indefinitely until a gps data is available. |
> 0 | Wait up to a maximum of timeout milliseconds for a gps data. |
|
- Returns
- 0 on success otherwise returns EINVAL on error occurs.
The documentation for this class was generated from the following file: