mirror of
https://agent.ghink.cloud/wb2osz/direwolf
synced 2025-04-06 20:58:30 +00:00
modified: .gitattributes modified: APRStt-Implementation-Notes.pdf modified: CHANGES.txt modified: Makefile.linux modified: Makefile.win new file: Raspberry-Pi-APRS-Tracker.pdf modified: Raspberry-Pi-APRS.pdf modified: User-Guide.pdf modified: aclients.c modified: aprs_tt.c modified: aprs_tt.h modified: atest.c modified: audio.c modified: audio.h modified: audio_win.c modified: ax25_pad.c modified: ax25_pad.h modified: beacon.c modified: beacon.h modified: config.c modified: config.h modified: decode_aprs.c modified: decode_aprs.h modified: demod_afsk.c modified: digipeater.c modified: digipeater.h modified: direwolf.c modified: direwolf.conf modified: direwolf.h modified: dsp.c modified: dwgps.c modified: encode_aprs.c modified: encode_aprs.h modified: fsk_demod_state.h new file: grm_sym.h modified: hdlc_rec.c modified: hdlc_rec2.c modified: hdlc_rec2.h modified: kiss.c modified: kiss_frame.c modified: kiss_frame.h modified: kissnet.c modified: latlong.c modified: latlong.h new file: log.c new file: log.h new file: log2gpx.c new file: mgn_icon.h modified: misc/README-dire-wolf.txt modified: multi_modem.c new file: nmea.c new file: nmea.h modified: ptt.c modified: rdq.c modified: regex/README-dire-wolf.txt new file: rpack.h modified: rrbb.c modified: rrbb.h modified: server.c modified: symbols-new.txt modified: symbols.c modified: symbolsX.txt new file: telemetry.c new file: telemetry.h modified: textcolor.c modified: tocalls.txt modified: utm/README.txt modified: version.h modified: xmit.c modified: xmit.h
88 lines
1.8 KiB
C
88 lines
1.8 KiB
C
|
|
#ifndef HDLC_REC2_H
|
|
#define HDLC_REC2_H 1
|
|
|
|
|
|
#include "ax25_pad.h" /* for packet_t */
|
|
#include "rrbb.h"
|
|
|
|
typedef enum retry_e {
|
|
RETRY_NONE=0,
|
|
RETRY_SWAP_SINGLE=1,
|
|
RETRY_SWAP_DOUBLE=2,
|
|
RETRY_SWAP_TRIPLE=3,
|
|
RETRY_REMOVE_SINGLE=4,
|
|
RETRY_REMOVE_DOUBLE=5,
|
|
RETRY_REMOVE_TRIPLE=6,
|
|
RETRY_INSERT_SINGLE=7,
|
|
RETRY_INSERT_DOUBLE=8,
|
|
RETRY_SWAP_TWO_SEP=9,
|
|
RETRY_SWAP_MANY=10,
|
|
RETRY_REMOVE_MANY=11,
|
|
RETRY_REMOVE_TWO_SEP=12,
|
|
RETRY_MAX = 13} retry_t;
|
|
|
|
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_REMOVE=2,
|
|
RETRY_TYPE_INSERT=3} 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",
|
|
"REMOVE_SINGLE",
|
|
"REMOVE_DOUBLE",
|
|
"REMOVE_TRIPLE",
|
|
"INSERT_SINGLE",
|
|
"INSERT_DOUBLE",
|
|
"TWO_SEP",
|
|
"MANY",
|
|
"REMOVE_MANY",
|
|
"REMOVE_SEP"};
|
|
#endif
|
|
|
|
void hdlc_rec2_block (rrbb_t block, retry_t fix_bits);
|
|
|
|
void hdlc_rec2_try_to_fix_later (rrbb_t block, int chan, int subchan, int alevel);
|
|
|
|
/* Provided by the top level application to process a complete frame. */
|
|
|
|
void app_process_rec_packet (int chan, int subchan, packet_t pp, int level, retry_t retries, char *spectrum);
|
|
|
|
|
|
#endif
|