summaryrefslogtreecommitdiff
path: root/include/hybbx/crdop.h
blob: be982006f52bdb4e87ed34281e0fc76226003cd0 (plain)
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
#ifndef HYBBX_CRDOP_H
#define HYBBX_CRDOP_H

/**
 * CRDOP — CB Radio Digital Open Protocol (Level 2, experimental).
 *
 * HyBBX `crdop` plugin: CB host-client bridge to external CRDOPC.
 * ARDOP uses the `ardop` plugin with ARDOPC/ardopcf.
 * Modem DSP stays outside HyBBX. Profile helpers shared with `ardop`.
 */

#include "hybbx/types.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef enum hybbx_crdop_radio_profile {
    HYBBX_CRDOP_PROFILE_AMATEUR = 0,
    HYBBX_CRDOP_PROFILE_CB = 1
} hybbx_crdop_radio_profile_t;

/** Parse radio_profile INI value (cb, amateur). */
hybbx_crdop_radio_profile_t hybbx_crdop_profile_parse(const char *value);

const char *hybbx_crdop_profile_name(hybbx_crdop_radio_profile_t profile);

/** Default ARQ bandwidth string for profile when INI omits arq_bandwidth. */
const char *hybbx_crdop_default_arq_bandwidth(hybbx_crdop_radio_profile_t profile);

/** Non-zero when bandwidth string is above CB-safe ceiling (1000MAX). */
int hybbx_crdop_bandwidth_exceeds_cb(const char *arq_bandwidth);

struct hybbx_ardop_config;

/** Parse `[transport.crdop]` config (CB defaults). */
hybbx_result_t hybbx_crdop_config_parse(const char *config,
                                        struct hybbx_ardop_config *out);

#ifdef __cplusplus
}
#endif

#endif /* HYBBX_CRDOP_H */
git clone -b <branch> https://cgit.mode42.com/<repo>.git
git clone -b <branch> git://cgit.mode42.com/<repo>.git

info@mode42.com