Harald Welte | 47ab210 | 2012-07-18 22:04:09 +0200 | [diff] [blame^] | 1 | /*
|
| 2 | * rrlp.h
|
| 3 | *
|
| 4 | * RRLP Header
|
| 5 | *
|
| 6 | *
|
| 7 | * Copyright (C) 2009 Sylvain Munaut <tnt@246tNt.com>
|
| 8 | *
|
| 9 | * This program is free software: you can redistribute it and/or modify
|
| 10 | * it under the terms of the GNU General Public License as published by
|
| 11 | * the Free Software Foundation, either version 2 of the License, or
|
| 12 | * (at your option) any later version.
|
| 13 | *
|
| 14 | * This program is distributed in the hope that it will be useful,
|
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 17 | * GNU General Public License for more details.
|
| 18 | *
|
| 19 | * You should have received a copy of the GNU General Public License
|
| 20 | * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 21 | */
|
| 22 |
|
| 23 | #ifndef __RRLP_H__
|
| 24 | #define __RRLP_H__
|
| 25 |
|
| 26 | #include <stdint.h>
|
| 27 |
|
| 28 | #include "gps.h"
|
| 29 |
|
| 30 | #ifdef __cplusplus
|
| 31 | extern "C" {
|
| 32 | #endif
|
| 33 |
|
| 34 |
|
| 35 | /* Our internal simplified structure for requests */
|
| 36 |
|
| 37 | #define RRLP_AR_REF_LOC (1<<0)
|
| 38 | #define RRLP_AR_REF_TIME (1<<1)
|
| 39 | #define RRLP_AR_UTC_MODEL (1<<2)
|
| 40 | #define RRLP_AR_IONO_MODEL (1<<3)
|
| 41 | #define RRLP_AR_ALMANAC (1<<4)
|
| 42 | #define RRLP_AR_EPHEMERIS (1<<5)
|
| 43 | #define RRLP_AR_REALTIME_INT (1<<6)
|
| 44 |
|
| 45 | struct rrlp_assist_req {
|
| 46 | uint32_t req_elems;
|
| 47 | uint64_t eph_svs;
|
| 48 | };
|
| 49 |
|
| 50 |
|
| 51 | /* Methods */
|
| 52 | int rrlp_decode_assistance_request(struct rrlp_assist_req *ar,
|
| 53 | void *req, int req_len);
|
| 54 |
|
| 55 | int rrlp_gps_assist_pdus(int refnum,
|
| 56 | struct gps_assist_data *gps_ad, struct rrlp_assist_req *req,
|
| 57 | void **o_pdu, int *o_len, int o_max_pdus);
|
| 58 |
|
| 59 |
|
| 60 | #ifdef __cplusplus
|
| 61 | }
|
| 62 | #endif
|
| 63 |
|
| 64 | #endif /* __RRLP_H__ */
|
| 65 |
|