libosmogsm 1.9.0.196-9975
Osmocom GSM library
gsm44021.c File Reference
#include <errno.h>
#include <osmocom/core/bits.h>
#include <osmocom/isdn/v110.h>

Functions

int osmo_csd_12k_6k_decode_frame (struct osmo_v110_decoded_frame *fr, const ubit_t *ra_bits, size_t n_bits)
 Decode a 60-bit GSM 12kbit/s CSD frame present as 60 ubits into a struct osmo_v110_decoded_frame. More...
 
int osmo_csd_12k_6k_encode_frame (ubit_t *ra_bits, size_t ra_bits_size, const struct osmo_v110_decoded_frame *fr)
 
int osmo_csd_3k6_decode_frame (struct osmo_v110_decoded_frame *fr, const ubit_t *ra_bits, size_t n_bits)
 Decode a 36-bit GSM 3k6kbit/s CSD frame present as 36 ubits into a struct osmo_v110_decoded_frame. More...
 
int osmo_csd_3k6_encode_frame (ubit_t *ra_bits, size_t ra_bits_size, const struct osmo_v110_decoded_frame *fr)
 
void osmo_csd_ubit_dump (FILE *outf, const ubit_t *fr, size_t in_len)
 Print a encoded "CSD modififed V.110" frame in the same table-like structure as the spec. More...
 

Function Documentation

◆ osmo_csd_12k_6k_decode_frame()

int osmo_csd_12k_6k_decode_frame ( struct osmo_v110_decoded_frame fr,
const ubit_t ra_bits,
size_t  n_bits 
)

Decode a 60-bit GSM 12kbit/s CSD frame present as 60 ubits into a struct osmo_v110_decoded_frame.

Parameters
[out]caller-allocatedoutput data structure, filled by this function
[in]ra_bitsOne V.110 frame as 60 unpacked bits.

References osmo_v110_decoded_frame::d_bits, osmo_v110_decoded_frame::e_bits, osmo_v110_decoded_frame::s_bits, and osmo_v110_decoded_frame::x_bits.

◆ osmo_csd_12k_6k_encode_frame()

int osmo_csd_12k_6k_encode_frame ( ubit_t ra_bits,
size_t  ra_bits_size,
const struct osmo_v110_decoded_frame fr 
)

◆ osmo_csd_3k6_decode_frame()

int osmo_csd_3k6_decode_frame ( struct osmo_v110_decoded_frame fr,
const ubit_t ra_bits,
size_t  n_bits 
)

Decode a 36-bit GSM 3k6kbit/s CSD frame present as 36 ubits into a struct osmo_v110_decoded_frame.

Parameters
[out]caller-allocatedoutput data structure, filled by this function
[in]ra_bitsOne V.110 frame as 36 unpacked bits.

References osmo_v110_decoded_frame::d_bits, osmo_v110_decoded_frame::e_bits, OSMO_ASSERT, osmo_v110_decoded_frame::s_bits, and osmo_v110_decoded_frame::x_bits.

◆ osmo_csd_3k6_encode_frame()

int osmo_csd_3k6_encode_frame ( ubit_t ra_bits,
size_t  ra_bits_size,
const struct osmo_v110_decoded_frame fr 
)

◆ osmo_csd_ubit_dump()

void osmo_csd_ubit_dump ( FILE *  outf,
const ubit_t fr,
size_t  in_len 
)

Print a encoded "CSD modififed V.110" frame in the same table-like structure as the spec.

Parameters
outfoutput FILE stream to which to dump
[in]frunpacked bits to dump
[in]in_lenlength of unpacked bits available at fr.