[fix](trx-rs): add AUDIO_MSG_HF_APRS_DECODE wire type for HF APRS
Assigns message type 0x09 to HF APRS decoded frames on the binary audio TCP channel and wires it up in all three layers: - trx-core: AUDIO_MSG_HF_APRS_DECODE = 0x09 - trx-server: emit 0x09 in the live dispatch match and include hf_aprs history in the connection-open replay blob - trx-client: recognise 0x09 and forward to the decode broadcast Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -19,8 +19,8 @@ use trx_frontend::RemoteRigEntry;
|
|||||||
|
|
||||||
use trx_core::audio::{
|
use trx_core::audio::{
|
||||||
read_audio_msg, write_audio_msg, AudioStreamInfo, AUDIO_MSG_AIS_DECODE, AUDIO_MSG_APRS_DECODE,
|
read_audio_msg, write_audio_msg, AudioStreamInfo, AUDIO_MSG_AIS_DECODE, AUDIO_MSG_APRS_DECODE,
|
||||||
AUDIO_MSG_CW_DECODE, AUDIO_MSG_FT8_DECODE, AUDIO_MSG_RX_FRAME, AUDIO_MSG_STREAM_INFO,
|
AUDIO_MSG_CW_DECODE, AUDIO_MSG_FT8_DECODE, AUDIO_MSG_HF_APRS_DECODE, AUDIO_MSG_RX_FRAME,
|
||||||
AUDIO_MSG_TX_FRAME, AUDIO_MSG_VDES_DECODE, AUDIO_MSG_WSPR_DECODE,
|
AUDIO_MSG_STREAM_INFO, AUDIO_MSG_TX_FRAME, AUDIO_MSG_VDES_DECODE, AUDIO_MSG_WSPR_DECODE,
|
||||||
};
|
};
|
||||||
use trx_core::decode::DecodedMessage;
|
use trx_core::decode::DecodedMessage;
|
||||||
|
|
||||||
@@ -151,6 +151,7 @@ async fn handle_audio_connection(
|
|||||||
AUDIO_MSG_VDES_DECODE
|
AUDIO_MSG_VDES_DECODE
|
||||||
| AUDIO_MSG_AIS_DECODE
|
| AUDIO_MSG_AIS_DECODE
|
||||||
| AUDIO_MSG_APRS_DECODE
|
| AUDIO_MSG_APRS_DECODE
|
||||||
|
| AUDIO_MSG_HF_APRS_DECODE
|
||||||
| AUDIO_MSG_CW_DECODE
|
| AUDIO_MSG_CW_DECODE
|
||||||
| AUDIO_MSG_FT8_DECODE
|
| AUDIO_MSG_FT8_DECODE
|
||||||
| AUDIO_MSG_WSPR_DECODE,
|
| AUDIO_MSG_WSPR_DECODE,
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ pub const AUDIO_MSG_FT8_DECODE: u8 = 0x05;
|
|||||||
pub const AUDIO_MSG_WSPR_DECODE: u8 = 0x06;
|
pub const AUDIO_MSG_WSPR_DECODE: u8 = 0x06;
|
||||||
pub const AUDIO_MSG_AIS_DECODE: u8 = 0x07;
|
pub const AUDIO_MSG_AIS_DECODE: u8 = 0x07;
|
||||||
pub const AUDIO_MSG_VDES_DECODE: u8 = 0x08;
|
pub const AUDIO_MSG_VDES_DECODE: u8 = 0x08;
|
||||||
|
pub const AUDIO_MSG_HF_APRS_DECODE: u8 = 0x09;
|
||||||
|
|
||||||
/// Maximum payload size (1 MB) to reject bogus frames early.
|
/// Maximum payload size (1 MB) to reject bogus frames early.
|
||||||
const MAX_PAYLOAD_SIZE: u32 = 1_048_576;
|
const MAX_PAYLOAD_SIZE: u32 = 1_048_576;
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ use trx_aprs::AprsDecoder;
|
|||||||
use trx_core::audio::{
|
use trx_core::audio::{
|
||||||
read_audio_msg, write_audio_msg, AudioStreamInfo,
|
read_audio_msg, write_audio_msg, AudioStreamInfo,
|
||||||
AUDIO_MSG_AIS_DECODE, AUDIO_MSG_APRS_DECODE, AUDIO_MSG_CW_DECODE, AUDIO_MSG_FT8_DECODE,
|
AUDIO_MSG_AIS_DECODE, AUDIO_MSG_APRS_DECODE, AUDIO_MSG_CW_DECODE, AUDIO_MSG_FT8_DECODE,
|
||||||
AUDIO_MSG_RX_FRAME, AUDIO_MSG_STREAM_INFO, AUDIO_MSG_TX_FRAME, AUDIO_MSG_VDES_DECODE,
|
AUDIO_MSG_HF_APRS_DECODE, AUDIO_MSG_RX_FRAME, AUDIO_MSG_STREAM_INFO, AUDIO_MSG_TX_FRAME,
|
||||||
AUDIO_MSG_WSPR_DECODE,
|
AUDIO_MSG_VDES_DECODE, AUDIO_MSG_WSPR_DECODE,
|
||||||
};
|
};
|
||||||
use trx_core::decode::{
|
use trx_core::decode::{
|
||||||
AisMessage, AprsPacket, CwEvent, DecodedMessage, Ft8Message, VdesMessage, WsprMessage,
|
AisMessage, AprsPacket, CwEvent, DecodedMessage, Ft8Message, VdesMessage, WsprMessage,
|
||||||
@@ -1847,6 +1847,7 @@ async fn handle_audio_client(
|
|||||||
push_history!(histories.snapshot_ais_history(), DecodedMessage::Ais, AUDIO_MSG_AIS_DECODE);
|
push_history!(histories.snapshot_ais_history(), DecodedMessage::Ais, AUDIO_MSG_AIS_DECODE);
|
||||||
push_history!(histories.snapshot_vdes_history(), DecodedMessage::Vdes, AUDIO_MSG_VDES_DECODE);
|
push_history!(histories.snapshot_vdes_history(), DecodedMessage::Vdes, AUDIO_MSG_VDES_DECODE);
|
||||||
push_history!(histories.snapshot_aprs_history(), DecodedMessage::Aprs, AUDIO_MSG_APRS_DECODE);
|
push_history!(histories.snapshot_aprs_history(), DecodedMessage::Aprs, AUDIO_MSG_APRS_DECODE);
|
||||||
|
push_history!(histories.snapshot_hf_aprs_history(), DecodedMessage::HfAprs, AUDIO_MSG_HF_APRS_DECODE);
|
||||||
push_history!(histories.snapshot_ft8_history(), DecodedMessage::Ft8, AUDIO_MSG_FT8_DECODE);
|
push_history!(histories.snapshot_ft8_history(), DecodedMessage::Ft8, AUDIO_MSG_FT8_DECODE);
|
||||||
push_history!(histories.snapshot_wspr_history(), DecodedMessage::Wspr, AUDIO_MSG_WSPR_DECODE);
|
push_history!(histories.snapshot_wspr_history(), DecodedMessage::Wspr, AUDIO_MSG_WSPR_DECODE);
|
||||||
push_history!(histories.snapshot_cw_history(), DecodedMessage::Cw, AUDIO_MSG_CW_DECODE);
|
push_history!(histories.snapshot_cw_history(), DecodedMessage::Cw, AUDIO_MSG_CW_DECODE);
|
||||||
@@ -1895,6 +1896,7 @@ async fn handle_audio_client(
|
|||||||
DecodedMessage::Ais(_) => AUDIO_MSG_AIS_DECODE,
|
DecodedMessage::Ais(_) => AUDIO_MSG_AIS_DECODE,
|
||||||
DecodedMessage::Vdes(_) => AUDIO_MSG_VDES_DECODE,
|
DecodedMessage::Vdes(_) => AUDIO_MSG_VDES_DECODE,
|
||||||
DecodedMessage::Aprs(_) => AUDIO_MSG_APRS_DECODE,
|
DecodedMessage::Aprs(_) => AUDIO_MSG_APRS_DECODE,
|
||||||
|
DecodedMessage::HfAprs(_) => AUDIO_MSG_HF_APRS_DECODE,
|
||||||
DecodedMessage::Cw(_) => AUDIO_MSG_CW_DECODE,
|
DecodedMessage::Cw(_) => AUDIO_MSG_CW_DECODE,
|
||||||
DecodedMessage::Ft8(_) => AUDIO_MSG_FT8_DECODE,
|
DecodedMessage::Ft8(_) => AUDIO_MSG_FT8_DECODE,
|
||||||
DecodedMessage::Wspr(_) => AUDIO_MSG_WSPR_DECODE,
|
DecodedMessage::Wspr(_) => AUDIO_MSG_WSPR_DECODE,
|
||||||
|
|||||||
Reference in New Issue
Block a user