spandsp: ademco_contactid.c File Reference

spandsp 0.0.6

Classes | Macros | Functions
ademco_contactid.c File Reference
`#include <inttypes.h>`
`#include <stdlib.h>`
`#include <stdio.h>`
`#include <string.h>`
`#include "floating_fudge.h"`
`#include <memory.h>`
`#include <limits.h>`
`#include <assert.h>`
`#include "spandsp/telephony.h"`
`#include "spandsp/fast_convert.h"`
`#include "spandsp/logging.h"`
`#include "spandsp/queue.h"`
`#include "spandsp/complex.h"`
`#include "spandsp/dds.h"`
`#include "spandsp/power_meter.h"`
`#include "spandsp/async.h"`
`#include "spandsp/vector_float.h"`
`#include "spandsp/complex_vector_float.h"`
`#include "spandsp/vector_int.h"`
`#include "spandsp/complex_vector_int.h"`
`#include "spandsp/tone_detect.h"`
`#include "spandsp/tone_generate.h"`
`#include "spandsp/super_tone_rx.h"`
`#include "spandsp/dtmf.h"`
`#include "spandsp/ademco_contactid.h"`
`#include "spandsp/private/logging.h"`
`#include "spandsp/private/queue.h"`
`#include "spandsp/private/tone_detect.h"`
`#include "spandsp/private/tone_generate.h"`
`#include "spandsp/private/dtmf.h"`
`#include "spandsp/private/ademco_contactid.h"`

## Classes
struct | ademco_code_s

## Macros
#define | GOERTZEL_SAMPLES_PER_BLOCK 55 /* We need to detect over a +-5% range */
#define | DETECTION_THRESHOLD 2104205.6f /* -42dBm0 [((GOERTZEL_SAMPLES_PER_BLOCK*GOERTZEL_SAMPLES_PER_BLOCK*32768.0/1.4142)*10^((-42 - DBM0_MAX_SINE_POWER)/20.0))^2] */
#define | TONE_TWIST 3.981f /* 6dB */
#define | TONE_TO_TOTAL_ENERGY 1.995f /* 3dB */

## Functions
int | encode_msg (char buf[], const ademco_contactid_report_t *report)
int | decode_msg (ademco_contactid_report_t *report, const char buf[])
const char * | ademco_contactid_msg_qualifier_to_str (int q)
const char * | ademco_contactid_event_to_str (int xyz)
int | ademco_contactid_receiver_log_msg (ademco_contactid_receiver_state_t *s, const ademco_contactid_report_t *report)
int | ademco_contactid_receiver_tx (ademco_contactid_receiver_state_t *s, int16_t amp[], int max_samples)
int | ademco_contactid_receiver_rx (ademco_contactid_receiver_state_t *s, const int16_t amp[], int samples)
int | ademco_contactid_receiver_fillin (ademco_contactid_receiver_state_t *s, int samples)
logging_state_t * | ademco_contactid_receiver_get_logging_state (ademco_contactid_receiver_state_t *s)
void | ademco_contactid_receiver_set_realtime_callback (ademco_contactid_receiver_state_t *s, ademco_contactid_report_func_t callback, void *user_data)
ademco_contactid_receiver_state_t * | ademco_contactid_receiver_init (ademco_contactid_receiver_state_t *s, ademco_contactid_report_func_t callback, void *user_data)
int | ademco_contactid_receiver_release (ademco_contactid_receiver_state_t *s)
int | ademco_contactid_receiver_free (ademco_contactid_receiver_state_t *s)
int | ademco_contactid_sender_tx (ademco_contactid_sender_state_t *s, int16_t amp[], int max_samples)
int | ademco_contactid_sender_rx (ademco_contactid_sender_state_t *s, const int16_t amp[], int samples)
int | ademco_contactid_sender_fillin (ademco_contactid_sender_state_t *s, int samples)
int | ademco_contactid_sender_put (ademco_contactid_sender_state_t *s, const ademco_contactid_report_t *report)
logging_state_t * | ademco_contactid_sender_get_logging_state (ademco_contactid_sender_state_t *s)
void | ademco_contactid_sender_set_realtime_callback (ademco_contactid_sender_state_t *s, tone_report_func_t callback, void *user_data)
ademco_contactid_sender_state_t * | ademco_contactid_sender_init (ademco_contactid_sender_state_t *s, tone_report_func_t callback, void *user_data)
int | ademco_contactid_sender_release (ademco_contactid_sender_state_t *s)
int | ademco_contactid_sender_free (ademco_contactid_sender_state_t *s)