Loading...
Searching...
No Matches
gad.c File Reference
3GPP TS 23.032 GAD: Universal Geographical Area Description.

Message encoding and decoding for 3GPP TS 23.032 GAD: Universal Geographical Area Description. More...

`#include <errno.h>`
`#include <inttypes.h>`
`#include <osmocom/core/msgb.h>`
`#include <osmocom/core/utils.h>`
`#include <osmocom/gsm/gad.h>`

## Macros

#define | DEC_ERR(RC, TYPE, fmt, args...)

## Functions

uint32_t | osmo_gad_enc_lat (int32_t deg_1e6)
| Encode a latitude value according to 3GPP TS 23.032.
int32_t | osmo_gad_dec_lat (uint32_t lat)
| Decode a latitude value according to 3GPP TS 23.032.
uint32_t | osmo_gad_enc_lon (int32_t deg_1e6)
| Encode a longitude value according to 3GPP TS 23.032.
int32_t | osmo_gad_dec_lon (uint32_t lon)
| Decode a longitude value according to 3GPP TS 23.032.
uint32_t | osmo_gad_dec_unc (uint8_t unc)
| Decode an uncertainty circle value according to 3GPP TS 23.032.
uint8_t | osmo_gad_enc_unc (uint32_t mm)
| Encode an uncertainty circle value according to 3GPP TS 23.032.
static int | osmo_gad_enc_ell_point_unc_circle (struct gad_raw_ell_point_unc_circle *raw, const struct osmo_gad_ell_point_unc_circle *v)
static int | osmo_gad_dec_ell_point_unc_circle (struct osmo_gad_ell_point_unc_circle *v, struct osmo_gad_err **err, void *err_ctx, const struct gad_raw_ell_point_unc_circle *raw)
static int | osmo_gad_raw_len (const union gad_raw *gad_raw)
int | osmo_gad_raw_write (struct msgb *msg, const union gad_raw *gad_raw)
| Append a GAD PDU to the msgb.
int | osmo_gad_raw_read (union gad_raw *gad_raw, struct osmo_gad_err **err, void *err_ctx, const uint8_t *data, uint8_t len)
| Read a GAD PDU and validate structure.
int | osmo_gad_enc (union gad_raw *gad_raw, const struct osmo_gad *gad)
| Write GAD values with consistent units to raw GAD PDU representation.
int | osmo_gad_dec (struct osmo_gad *gad, struct osmo_gad_err **err, void *err_ctx, const union gad_raw *raw)
| Decode GAD raw PDU to values with consistent units.
int | osmo_gad_raw_to_str_buf (char *buf, size_t buflen, const union gad_raw *raw)
| Return a human readable representation of a raw GAD PDU.
char * | osmo_gad_raw_to_str_c (void *ctx, const union gad_raw *raw)
| Return a human readable representation of a raw GAD PDU.
int | osmo_gad_to_str_buf (char *buf, size_t buflen, const struct osmo_gad *gad)
| Return a human readable representation of GAD (location estimate) values.
char * | osmo_gad_to_str_c (void *ctx, const struct osmo_gad *gad)
| Return a human readable representation of GAD (location estimate) values.

## Variables

const struct value_string | osmo_gad_type_names []
static uint32_t | table_uncertainty_1e3 [128]

## Detailed Description

Message encoding and decoding for 3GPP TS 23.032 GAD: Universal Geographical Area Description.