GNU Radio's GSM Package
bitvec.h File Reference
#include <stdint.h>
#include <osmocom/core/defs.h>
#include <stdbool.h>

Go to the source code of this file.

Classes

struct  bitvec
 

Enumerations

enum  bit_value { ZERO = 0, ONE = 1, L = 2, H = 3 }
 

Functions

enum bit_value bitvec_get_bit_pos (const struct bitvec *bv, unsigned int bitnr)
 
enum bit_value bitvec_get_bit_pos_high (const struct bitvec *bv, unsigned int bitnr)
 
unsigned int bitvec_get_nth_set_bit (const struct bitvec *bv, unsigned int n)
 
int bitvec_set_bit_pos (struct bitvec *bv, unsigned int bitnum, enum bit_value bit)
 
int bitvec_set_bit (struct bitvec *bv, enum bit_value bit)
 
int bitvec_get_bit_high (struct bitvec *bv)
 
int bitvec_set_bits (struct bitvec *bv, const enum bit_value *bits, unsigned int count)
 
int bitvec_set_u64 (struct bitvec *bv, uint64_t v, uint8_t num_bits, bool use_lh)
 
int bitvec_set_uint (struct bitvec *bv, unsigned int in, unsigned int count)
 
int bitvec_get_uint (struct bitvec *bv, unsigned int num_bits)
 
int bitvec_find_bit_pos (const struct bitvec *bv, unsigned int n, enum bit_value val)
 
int bitvec_spare_padding (struct bitvec *bv, unsigned int up_to_bit)
 
int bitvec_get_bytes (struct bitvec *bv, uint8_t *bytes, unsigned int count)
 
int bitvec_set_bytes (struct bitvec *bv, const uint8_t *bytes, unsigned int count)
 
int bitvec_unhex (struct bitvec *bv, const char *src)
 
unsigned int bitvec_pack (const struct bitvec *bv, uint8_t *buffer)
 
unsigned int bitvec_unpack (struct bitvec *bv, const uint8_t *buffer)
 
uint64_t bitvec_read_field (struct bitvec *bv, unsigned int *read_index, unsigned int len)
 
int bitvec_write_field (struct bitvec *bv, unsigned int *write_index, uint64_t val, unsigned int len)
 
int bitvec_fill (struct bitvec *bv, unsigned int num_bits, enum bit_value fill)
 
char bit_value_to_char (enum bit_value v)
 
void bitvec_to_string_r (const struct bitvec *bv, char *str)
 
void bitvec_zero (struct bitvec *bv)
 
unsigned bitvec_rl (const struct bitvec *bv, bool b)
 
unsigned bitvec_rl_curbit (struct bitvec *bv, bool b, int max_bits)
 
void bitvec_shiftl (struct bitvec *bv, unsigned int n)
 
int16_t bitvec_get_int16_msb (const struct bitvec *bv, unsigned int num_bits)
 
unsigned int bitvec_add_array (struct bitvec *bv, const uint32_t *array, unsigned int array_len, bool dry_run, unsigned int num_bits)