HERMES Modem
Hermes ARQ/Broadcast modem
Loading...
Searching...
No Matches
arq_channels.h
Go to the documentation of this file.
1#ifndef ARQ_CHANNELS_H_
2#define ARQ_CHANNELS_H_
3
4#include <stddef.h>
5
6#include "chan.h"
7#include "arq_events.h"
8
9#define ARQ_CH_CAP_TCP_CMD 64
10#define ARQ_CH_CAP_TCP_PAYLOAD 128
11#define ARQ_CH_CAP_MODEM_FRAME 128
12#define ARQ_CH_CAP_MODEM_METRICS 128
13#define ARQ_CH_CAP_MODEM_TX 128
14#define ARQ_CH_CAP_TCP_STATUS 128
15#define ARQ_CH_CAP_SHUTDOWN 1
16
18typedef struct
19{
20 chan_t *tcp_cmd;
21 chan_t *tcp_payload;
22 chan_t *modem_frame;
24 chan_t *modem_tx;
25 chan_t *tcp_status;
26 chan_t *shutdown;
28
35
41
47
55
63int arq_channel_bus_try_send_payload(arq_channel_bus_t *bus, const uint8_t *data, size_t len);
64
72
80
81#endif /* ARQ_CHANNELS_H_ */
int arq_channel_bus_try_send_payload(arq_channel_bus_t *bus, const uint8_t *data, size_t len)
Try to enqueue TCP payload bytes into ARQ bus.
Definition arq_channels.c:132
int arq_channel_bus_recv_payload(arq_channel_bus_t *bus, arq_bytes_msg_t *msg)
Receive next TCP payload message from ARQ bus.
Definition arq_channels.c:188
int arq_channel_bus_try_send_cmd(arq_channel_bus_t *bus, const arq_cmd_msg_t *msg)
Try to enqueue a TCP control command into ARQ bus.
Definition arq_channels.c:101
int arq_channel_bus_init(arq_channel_bus_t *bus)
Initialize ARQ channel bus.
Definition arq_channels.c:43
int arq_channel_bus_recv_cmd(arq_channel_bus_t *bus, arq_cmd_msg_t *msg)
Receive next TCP command from ARQ bus.
Definition arq_channels.c:164
void arq_channel_bus_close(arq_channel_bus_t *bus)
Close all ARQ channel endpoints to stop producers/consumers.
Definition arq_channels.c:71
void arq_channel_bus_dispose(arq_channel_bus_t *bus)
Dispose ARQ channel resources.
Definition arq_channels.c:86
Definition arq_events.h:59
ARQ message-bus channels connecting TCP, modem, and ARQ workers.
Definition arq_channels.h:19
chan_t * modem_tx
Definition arq_channels.h:24
chan_t * shutdown
Definition arq_channels.h:26
chan_t * tcp_status
Definition arq_channels.h:25
chan_t * modem_metrics
Definition arq_channels.h:23
chan_t * tcp_cmd
Definition arq_channels.h:20
chan_t * modem_frame
Definition arq_channels.h:22
chan_t * tcp_payload
Definition arq_channels.h:21
Definition arq_events.h:50