rtl433  UNKNOWN
RTL-433 utility
decoder_util.c File Reference

High-level utility functions for decoders. More...

Functions

r_devicecreate_device (r_device *dev_template)
 Create a new r_device, copy from dev_template if not NULL. More...
 
void bitbuffer_printf (const bitbuffer_t *bitbuffer, char const *restrict format,...)
 Print the content of the bitbuffer. More...
 
void bitbuffer_debugf (const bitbuffer_t *bitbuffer, char const *restrict format,...)
 Debug print the content of the bitbuffer. More...
 
void bitrow_printf (bitrow_t const bitrow, unsigned bit_len, char const *restrict format,...)
 Print the content of a bit row (byte buffer). More...
 
void bitrow_debugf (bitrow_t const bitrow, unsigned bit_len, char const *restrict format,...)
 Debug print the content of a bit row (byte buffer). More...
 
void decoder_output_messagef (r_device *decoder, char const *restrict format,...)
 Output a message with args. More...
 
void decoder_output_bitbufferf (r_device *decoder, bitbuffer_t const *bitbuffer, char const *restrict format,...)
 Output a message with args and the content of a bitbuffer. More...
 
void decoder_output_bitbuffer_arrayf (r_device *decoder, bitbuffer_t const *bitbuffer, char const *restrict format,...)
 Output a message with args and the content of a bitbuffer. More...
 
void decoder_output_bitrowf (r_device *decoder, bitrow_t const bitrow, unsigned bit_len, char const *restrict format,...)
 Output a message with args and the content of a bit row (byte buffer). More...
 
void decoder_output_data (r_device *decoder, data_t *data)
 Output data. More...
 
void decoder_output_message (r_device *decoder, char const *msg)
 Output a message. More...
 
static char * bitrow_print_bits (bitrow_t const bitrow, unsigned bit_len)
 
void decoder_output_bitbuffer (r_device *decoder, bitbuffer_t const *bitbuffer, char const *msg)
 Output a message and the content of a bitbuffer. More...
 
void decoder_output_bitbuffer_array (r_device *decoder, bitbuffer_t const *bitbuffer, char const *msg)
 Output a message and the content of a bitbuffer. More...
 
void decoder_output_bitrow (r_device *decoder, bitrow_t const bitrow, unsigned bit_len, char const *msg)
 Output a message and the content of a bit row (byte buffer). More...
 

Detailed Description

High-level utility functions for decoders.

Copyright (C) 2018 Christian Zuckschwerdt

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Function Documentation

◆ bitbuffer_debugf()

void bitbuffer_debugf ( const bitbuffer_t bitbuffer,
char const *restrict  format,
  ... 
)

Debug print the content of the bitbuffer.

For quick and easy debugging, not for regular usage.

References bitbuffer_debug().

◆ bitbuffer_printf()

void bitbuffer_printf ( const bitbuffer_t bitbuffer,
char const *restrict  format,
  ... 
)

◆ bitrow_debugf()

void bitrow_debugf ( bitrow_t const  bitrow,
unsigned  bit_len,
char const *restrict  format,
  ... 
)

Debug print the content of a bit row (byte buffer).

For quick and easy debugging, not for regular usage.

References bitrow_debug().

◆ bitrow_print_bits()

static char* bitrow_print_bits ( bitrow_t const  bitrow,
unsigned  bit_len 
)
static

◆ bitrow_printf()

◆ create_device()

r_device* create_device ( r_device dev_template)

Create a new r_device, copy from dev_template if not NULL.

Referenced by fineoffset_WH2_create().

◆ decoder_output_bitbuffer()

void decoder_output_bitbuffer ( r_device decoder,
bitbuffer_t const *  bitbuffer,
char const *  msg 
)

◆ decoder_output_bitbuffer_array()

void decoder_output_bitbuffer_array ( r_device decoder,
bitbuffer_t const *  bitbuffer,
char const *  msg 
)

Output a message and the content of a bitbuffer.

Usage not recommended.

References bitbuffer::bb, bitbuffer::bits_per_row, DATA_ARRAY, DATA_DATA, DATA_INT, data_make(), DATA_STRING, decoder_output_data(), and bitbuffer::num_rows.

Referenced by decoder_output_bitbuffer_arrayf().

◆ decoder_output_bitbuffer_arrayf()

void decoder_output_bitbuffer_arrayf ( r_device decoder,
bitbuffer_t const *  bitbuffer,
char const *restrict  format,
  ... 
)

Output a message with args and the content of a bitbuffer.

References decoder_output_bitbuffer_array().

◆ decoder_output_bitbufferf()

void decoder_output_bitbufferf ( r_device decoder,
bitbuffer_t const *  bitbuffer,
char const *restrict  format,
  ... 
)

Output a message with args and the content of a bitbuffer.

References decoder_output_bitbuffer().

Referenced by ikea_sparsnas_callback(), and xc0324_callback().

◆ decoder_output_bitrow()

void decoder_output_bitrow ( r_device decoder,
bitrow_t const  bitrow,
unsigned  bit_len,
char const *  msg 
)

Output a message and the content of a bit row (byte buffer).

References bitrow_print_bits(), data_append(), data_make(), DATA_STRING, decoder_output_data(), and r_device::verbose_bits.

Referenced by decoder_output_bitrowf().

◆ decoder_output_bitrowf()

void decoder_output_bitrowf ( r_device decoder,
bitrow_t const  bitrow,
unsigned  bit_len,
char const *restrict  format,
  ... 
)

Output a message with args and the content of a bit row (byte buffer).

References decoder_output_bitrow().

Referenced by decode_xc0324_message(), ikea_sparsnas_callback(), and xc0324_callback().

◆ decoder_output_data()

void decoder_output_data ( r_device decoder,
data_t data 
)

Output data.

References r_device::output_fn.

Referenced by acurite_00275rm_decode(), acurite_6045_decode(), acurite_606_decode(), acurite_986_decode(), acurite_rain_896_decode(), acurite_th_decode(), acurite_txr_decode(), akhan_rke_callback(), alecto_ws1200v1_callback(), alecto_ws1200v2_callback(), alecto_ws1200v2_dcf_callback(), alectov1_callback(), ambient_weather_decode(), ambientweather_tx8300_callback(), ambientweather_wh31e_callback(), blyss_callback(), brennenstuhl_rcs_2044_process_row(), bresser_3ch_callback(), bresser_5in1_callback(), bt_rain_callback(), calibeur_rf104_callback(), cardin_callback(), chuango_callback(), companion_wtr001_decode(), current_cost_decode(), danfoss_cfr_callback(), decoder_output_bitbuffer(), decoder_output_bitbuffer_array(), decoder_output_bitrow(), decoder_output_message(), directv_decode(), dish_remote_6_3_callback(), dsc_callback(), ecowitt_decode(), efergy_e2_classic_callback(), efergy_optical_callback(), elro_db286a_callback(), em1000_callback(), emontx_callback(), esa_cost_callback(), esic_emt7110_decode(), esperanza_ews_callback(), eurochron_callback(), fineoffset_WH0290_callback(), fineoffset_WH0530_callback(), fineoffset_wh1050_callback(), fineoffset_wh1080_callback(), fineoffset_WH24_callback(), fineoffset_WH25_callback(), fineoffset_WH2_callback(), flex_callback(), fordremote_callback(), fs20_decode(), ft004b_callback(), ge_coloreffects_decode(), generic_motion_callback(), generic_remote_callback(), generic_temperature_sensor_callback(), gt_wt_02_process_row(), hcs200_callback(), hideki_ts04_callback(), holman_ws5029_decode(), hondaremote_callback(), honeywell_callback(), honeywell_wdb_callback(), ht680_callback(), ibis_beacon_callback(), ikea_sparsnas_callback(), infactory_callback(), interlogix_callback(), intertechno_callback(), kedsum_callback(), kerui_callback(), kw9015b_callback(), lacrosse_it(), lacrosse_tx141x_decode(), lacrosse_ws7000_decode(), lacrossetx_callback(), lacrossews_callback(), lightwave_rf_callback(), m_bus_output_data(), maverick_et73_sensor_callback(), maverick_et73x_callback(), mebus433_callback(), new_template_decode(), newkaku_callback(), nexa_callback(), nexus_callback(), oil_standard_decode(), oil_watchman_callback(), opus_xt300_callback(), oregon_scientific_sl109h_callback(), oregon_scientific_v1_callback(), oregon_scientific_v2_1_decode(), oregon_scientific_v3_decode(), philips_aj3650_decode(), philips_aj7010_decode(), prologue_callback(), proove_callback(), quhwa_callback(), radiohead_ask_callback(), rftech_callback(), rubicson_48659_decode(), rubicson_callback(), s3318p_callback(), schrader_EG53MA4_callback(), schraeder_callback(), sensible_living_callback(), silvercrest_callback(), smoke_gs558_callback(), solight_te44_callback(), springfield_callback(), ss_keypad_commands(), ss_pinentry_parser(), ss_sensor_parser(), steelmate_callback(), tfa_303196_callback(), tfa_pool_thermometer_callback(), tfa_twin_plus_303049_callback(), thermopro_tp11_sensor_callback(), thermopro_tp12_sensor_callback(), tpms_citroen_decode(), tpms_ford_decode(), tpms_jansite_decode(), tpms_pmv107j_decode(), tpms_renault_decode(), tpms_toyota_decode(), ts_ft002_decoder(), ttx201_decode(), vaillant_vrt340_callback(), waveman_callback(), wg_pb12v1_decode(), ws2000_callback(), wssensor_callback(), wt1024_callback(), wt450_callback(), x10_rf_callback(), x10_sec_callback(), and xc0324_callback().

◆ decoder_output_message()

void decoder_output_message ( r_device decoder,
char const *  msg 
)

Output a message.

References data_make(), DATA_STRING, and decoder_output_data().

Referenced by decoder_output_messagef().

◆ decoder_output_messagef()

void decoder_output_messagef ( r_device decoder,
char const *restrict  format,
  ... 
)

Output a message with args.

References decoder_output_message().

Referenced by decode_xc0324_message(), and xc0324_callback().