rtl433  UNKNOWN
RTL-433 utility
flex.c File Reference

Data Structures

struct  flex_map
 
struct  flex_get
 
struct  flex_params
 

Functions

static int bit (const uint8_t *bytes, unsigned bit)
 
unsigned long compact_number (uint8_t *data, unsigned bit_offset, unsigned long mask)
 extract all mask bits skipping unmasked bits of a number up to 32/64 bits More...
 
unsigned long extract_number (uint8_t *data, unsigned bit_offset, unsigned bit_count)
 extract a number up to 32/64 bits from given offset with given bit length More...
 
static void print_row_bytes (char *row_bytes, uint8_t *bits, int num_bits)
 
static void render_getters (data_t *data, uint8_t *bits, struct flex_params *params)
 
static int flex_callback (r_device *decoder, bitbuffer_t *bitbuffer)
 
static void usage ()
 
static void help ()
 
static unsigned parse_modulation (char const *str)
 
static unsigned parse_bits (const char *code, bitrow_t bitrow)
 
const char * parse_map (const char *arg, struct flex_get *getter)
 
static void parse_getter (const char *arg, struct flex_get *getter)
 
r_deviceflex_create_device (char *spec)
 

Variables

static char * output_fields []
 

Function Documentation

◆ bit()

static int bit ( const uint8_t bytes,
unsigned  bit 
)
inlinestatic

Referenced by compact_number().

◆ compact_number()

unsigned long compact_number ( uint8_t data,
unsigned  bit_offset,
unsigned long  mask 
)

extract all mask bits skipping unmasked bits of a number up to 32/64 bits

References bit().

Referenced by render_getters().

◆ extract_number()

unsigned long extract_number ( uint8_t data,
unsigned  bit_offset,
unsigned  bit_count 
)

extract a number up to 32/64 bits from given offset with given bit length

References emontx::len.

Referenced by parse_getter(), and render_getters().

◆ flex_callback()

◆ flex_create_device()

◆ help()

static void help ( )
static

Referenced by flex_create_device().

◆ parse_bits()

static unsigned parse_bits ( const char *  code,
bitrow_t  bitrow 
)
static

◆ parse_getter()

static void parse_getter ( const char *  arg,
struct flex_get getter 
)
static

◆ parse_map()

const char* parse_map ( const char *  arg,
struct flex_get getter 
)

References flex_map::key, flex_get::map, and flex_map::val.

Referenced by parse_getter().

◆ parse_modulation()

◆ print_row_bytes()

static void print_row_bytes ( char *  row_bytes,
uint8_t bits,
int  num_bits 
)
static

Referenced by flex_callback().

◆ render_getters()

◆ usage()

static void usage ( )
static

Variable Documentation

◆ output_fields

char* output_fields[]
static
Initial value:
= {
"model",
"count",
"num_rows",
"rows",
"codes",
NULL,
}

Referenced by flex_create_device().