#include <stdbool.h>
#include <stddef.h>
#include "arq.h"
#include "arq_fsm.h"
Go to the source code of this file.
◆ arq_modem_dequeue()
| bool arq_modem_dequeue |
( |
arq_action_t * |
action, |
|
|
int |
timeout_ms |
|
) |
| |
Dequeue the next modem action (called from modem TX worker).
Blocks up to timeout_ms milliseconds waiting for an action.
- Parameters
-
| action | Output action. |
| timeout_ms | Wait timeout in milliseconds. |
- Returns
- true if an action was dequeued, false on timeout.
◆ arq_modem_enqueue()
Enqueue a modem action (called from FSM action callbacks).
- Returns
- 0 on success, -1 if queue full.
◆ arq_modem_preferred_rx_mode()
Return the preferred RX FreeDV mode for the current session state.
- Parameters
-
| sess | Current session (read-only). |
- Returns
- FREEDV_MODE_* constant.
◆ arq_modem_preferred_tx_mode()
Return the preferred TX FreeDV mode for the current session state.
- Parameters
-
| sess | Current session (read-only). |
- Returns
- FREEDV_MODE_* constant.
◆ arq_modem_ptt_off()
| void arq_modem_ptt_off |
( |
void |
| ) |
|
Notify ARQ that PTT has gone OFF.
◆ arq_modem_ptt_on()
| void arq_modem_ptt_on |
( |
int |
mode, |
|
|
size_t |
frame_size |
|
) |
| |
Notify ARQ that PTT has gone ON.
- Parameters
-
| mode | FreeDV mode of the frame now on air. |
| frame_size | Frame size in bytes. |
◆ arq_modem_queue_init()
| int arq_modem_queue_init |
( |
size_t |
capacity | ) |
|
Initialise the action queue.
- Parameters
-
| capacity | Maximum number of pending actions. |
- Returns
- 0 on success, -1 on allocation failure.
◆ arq_modem_queue_shutdown()
| void arq_modem_queue_shutdown |
( |
void |
| ) |
|
Flush and destroy the action queue.
◆ arq_modem_set_event_fn()
| void arq_modem_set_event_fn |
( |
void(*)(int mode, bool ptt_on) |
fn | ) |
|
Register the PTT event injection function (called from arq.c init).
- Parameters
-
| fn | Callback: mode >= 0 and ptt_on=true → TX_STARTED; ptt_on=false → TX_COMPLETE. |