forked from wb2osz/direwolf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hdlc_rec2.h
67 lines (44 loc) · 1.44 KB
/
hdlc_rec2.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef HDLC_REC2_H
#define HDLC_REC2_H 1
#include "ax25_pad.h" /* for packet_t, alevel_t */
#include "rrbb.h"
#include "audio.h" /* for struct audio_s */
typedef enum retry_mode_e {
RETRY_MODE_CONTIGUOUS=0,
RETRY_MODE_SEPARATED=1,
} retry_mode_t;
typedef enum retry_type_e {
RETRY_TYPE_NONE=0,
RETRY_TYPE_SWAP=1 } retry_type_t;
typedef struct retry_conf_s {
retry_t retry;
retry_mode_t mode;
retry_type_t type;
union {
struct {
int bit_idx_a; /* */
int bit_idx_b; /* */
int bit_idx_c; /* */
} sep; /* RETRY_MODE_SEPARATED */
struct {
int bit_idx;
int nr_bits;
} contig; /* RETRY_MODE_CONTIGUOUS */
} u_bits;
int insert_value;
} retry_conf_t;
#if defined(DIREWOLF_C) || defined(ATEST_C) || defined(UDPTEST_C)
static const char * retry_text[] = {
"NONE",
"SINGLE",
"DOUBLE",
"TRIPLE",
"TWO_SEP",
"PASSALL" };
#endif
void hdlc_rec2_init (struct audio_s *audio_config_p);
void hdlc_rec2_block (rrbb_t block);
int hdlc_rec2_try_to_fix_later (rrbb_t block, int chan, int subchan, int slice, alevel_t alevel);
/* Provided by the top level application to process a complete frame. */
void app_process_rec_packet (int chan, int subchan, int slice, packet_t pp, alevel_t level, retry_t retries, char *spectrum);
#endif