An extension of original API for working with GPS devices.
Dependents: A_TeseoLocationNEW A_TeseoLocation TeseoLocation
GPS_Provider Library
A controller-neutral API for working with GPS devices.
Overview
This library is an extension of the original API published on os.mbed.com
Besides the basic geo-location functionality, this extended API includes the following features:
- Geofencing
- Odometer
- Datalogging
Getting started
This GPS API is meant to be used for building projects on os.mbed.com
A good starting point is this page:
GPSProvider/GPSProviderCommon.h@4:193bf97d4c5a, 2019-02-14 (annotated)
- Committer:
- apalmieri
- Date:
- Thu Feb 14 11:37:06 2019 +0000
- Revision:
- 4:193bf97d4c5a
- Parent:
- 0:0a9c622571d7
Update .json file
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
apalmieri | 0:0a9c622571d7 | 1 | /** |
apalmieri | 0:0a9c622571d7 | 2 | ****************************************************************************** |
apalmieri | 0:0a9c622571d7 | 3 | * @file GPSProviderCommon.h |
apalmieri | 0:0a9c622571d7 | 4 | * @author AST/CL |
apalmieri | 0:0a9c622571d7 | 5 | * @version V1.1.0 |
apalmieri | 0:0a9c622571d7 | 6 | * @date Jun, 2017 |
apalmieri | 0:0a9c622571d7 | 7 | * @brief . |
apalmieri | 0:0a9c622571d7 | 8 | ****************************************************************************** |
apalmieri | 0:0a9c622571d7 | 9 | * @attention |
apalmieri | 0:0a9c622571d7 | 10 | * |
apalmieri | 0:0a9c622571d7 | 11 | * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> |
apalmieri | 0:0a9c622571d7 | 12 | * |
apalmieri | 0:0a9c622571d7 | 13 | * Redistribution and use in source and binary forms, with or without modification, |
apalmieri | 0:0a9c622571d7 | 14 | * are permitted provided that the following conditions are met: |
apalmieri | 0:0a9c622571d7 | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
apalmieri | 0:0a9c622571d7 | 16 | * this list of conditions and the following disclaimer. |
apalmieri | 0:0a9c622571d7 | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
apalmieri | 0:0a9c622571d7 | 18 | * this list of conditions and the following disclaimer in the documentation |
apalmieri | 0:0a9c622571d7 | 19 | * and/or other materials provided with the distribution. |
apalmieri | 0:0a9c622571d7 | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
apalmieri | 0:0a9c622571d7 | 21 | * may be used to endorse or promote products derived from this software |
apalmieri | 0:0a9c622571d7 | 22 | * without specific prior written permission. |
apalmieri | 0:0a9c622571d7 | 23 | * |
apalmieri | 0:0a9c622571d7 | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
apalmieri | 0:0a9c622571d7 | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
apalmieri | 0:0a9c622571d7 | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
apalmieri | 0:0a9c622571d7 | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
apalmieri | 0:0a9c622571d7 | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
apalmieri | 0:0a9c622571d7 | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
apalmieri | 0:0a9c622571d7 | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
apalmieri | 0:0a9c622571d7 | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
apalmieri | 0:0a9c622571d7 | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
apalmieri | 0:0a9c622571d7 | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
apalmieri | 0:0a9c622571d7 | 34 | * |
apalmieri | 0:0a9c622571d7 | 35 | ****************************************************************************** |
apalmieri | 0:0a9c622571d7 | 36 | */ |
apalmieri | 0:0a9c622571d7 | 37 | |
apalmieri | 0:0a9c622571d7 | 38 | #ifndef __GPS_PROVIDER_COMMON_H__ |
apalmieri | 0:0a9c622571d7 | 39 | #define __GPS_PROVIDER_COMMON_H__ |
apalmieri | 0:0a9c622571d7 | 40 | |
apalmieri | 0:0a9c622571d7 | 41 | #ifdef __cplusplus |
apalmieri | 0:0a9c622571d7 | 42 | extern "C" { |
apalmieri | 0:0a9c622571d7 | 43 | #endif |
apalmieri | 0:0a9c622571d7 | 44 | |
apalmieri | 0:0a9c622571d7 | 45 | |
apalmieri | 0:0a9c622571d7 | 46 | enum { |
apalmieri | 0:0a9c622571d7 | 47 | GEOFENCE_STATUS_UNKNOWN = 0, |
apalmieri | 0:0a9c622571d7 | 48 | GEOFENCE_STATUS_OUTSIDE_CIRCLE = 1, |
apalmieri | 0:0a9c622571d7 | 49 | GEOFENCE_STATUS_BOUNDARY_CIRCLE = 2, |
apalmieri | 0:0a9c622571d7 | 50 | GEOFENCE_STATUS_INSIDE_CIRCLE = 3 |
apalmieri | 0:0a9c622571d7 | 51 | }; |
apalmieri | 0:0a9c622571d7 | 52 | |
apalmieri | 0:0a9c622571d7 | 53 | /*! @brief Error codes for the GNSS API. */ |
apalmieri | 0:0a9c622571d7 | 54 | enum gps_provider_error_t { |
apalmieri | 0:0a9c622571d7 | 55 | GPS_ERROR_NONE = 0, /**< No error. */ |
apalmieri | 0:0a9c622571d7 | 56 | GPS_ERROR_FEATURE_ENABLING = 1, /**< Feature enabling failed. */ |
apalmieri | 0:0a9c622571d7 | 57 | GPS_ERROR_GEOFENCE_MAX_EXCEEDED = 2, /**< Max num of Geofence regions exceeded error. */ |
apalmieri | 0:0a9c622571d7 | 58 | GPS_ERROR_GEOFENCE_CFG = 3, /**< Geofence regions config failed. */ |
apalmieri | 0:0a9c622571d7 | 59 | GPS_ERROR_GEOFENCE_STATUS = 4, /**< Geofence regions status failed. */ |
apalmieri | 0:0a9c622571d7 | 60 | GPS_ERROR_GEOFENCE_NOT_IMPLEMENTED = 5, /**< Geofence feature is not supported. */ |
apalmieri | 0:0a9c622571d7 | 61 | GPS_ERROR_DATALOG_CFG = 6, /**< Datalog config error. */ |
apalmieri | 0:0a9c622571d7 | 62 | GPS_ERROR_DATALOG_START = 7, /**< Datalog start error. */ |
apalmieri | 0:0a9c622571d7 | 63 | GPS_ERROR_DATALOG_STOP = 8, /**< Datalog stop error. */ |
apalmieri | 0:0a9c622571d7 | 64 | GPS_ERROR_DATALOG_ERASE = 9, /**< Datalog erase error. */ |
apalmieri | 0:0a9c622571d7 | 65 | GPS_ERROR_LOG_REQ_STATUS = 10, /**< Datalog req status error. */ |
apalmieri | 0:0a9c622571d7 | 66 | GPS_ERROR_LOG_REQ_QUERY = 11, /**< Datalog req query error. */ |
apalmieri | 0:0a9c622571d7 | 67 | GPS_ERROR_LOG_NOT_IMPLEMENTED = 12, /**< Datalog feature is not supported. */ |
apalmieri | 0:0a9c622571d7 | 68 | GPS_ERROR_ODO_START = 13, /**< Odometer start error. */ |
apalmieri | 0:0a9c622571d7 | 69 | GPS_ERROR_ODO_STOP = 14, /**< Odometer start error. */ |
apalmieri | 0:0a9c622571d7 | 70 | GPS_ERROR_ODO_RESET = 15, /**< Odometer reset error. */ |
apalmieri | 0:0a9c622571d7 | 71 | GPS_ERROR_ODO_NOT_IMPLEMENTED = 16, /**< Odometer feature is not supported. */ |
apalmieri | 0:0a9c622571d7 | 72 | GPS_ERROR_MSGLIST_CFG = 17, /**< Msg List config error. */ |
apalmieri | 0:0a9c622571d7 | 73 | GPS_ERROR_SAVEPAR = 18, /**< Save parmas error. */ |
apalmieri | 0:0a9c622571d7 | 74 | GPS_ERROR_NO_MEM = 19 |
apalmieri | 0:0a9c622571d7 | 75 | }; |
apalmieri | 0:0a9c622571d7 | 76 | |
apalmieri | 0:0a9c622571d7 | 77 | #ifdef __cplusplus |
apalmieri | 0:0a9c622571d7 | 78 | } |
apalmieri | 0:0a9c622571d7 | 79 | #endif |
apalmieri | 0:0a9c622571d7 | 80 | |
apalmieri | 0:0a9c622571d7 | 81 | |
apalmieri | 0:0a9c622571d7 | 82 | #endif /* __GPS_PROVIDER_COMMON_H__ */ |