From: Thomas Karpiniec Date: Mon, 30 Dec 2024 10:14:00 +0000 (+1100) Subject: Move transmit_packet method to TxHandle X-Git-Url: https://code.octet-stream.net/m17rt/commitdiff_plain/6437aa4e3e028e05ea84af469b15ed91ba0d8cc2?ds=sidebyside;hp=b8702d115ebc071a9ae97e9aa9c4bc00196b5e26 Move transmit_packet method to TxHandle --- diff --git a/m17app/src/app.rs b/m17app/src/app.rs index 8130455..6d056f9 100644 --- a/m17app/src/app.rs +++ b/m17app/src/app.rs @@ -60,14 +60,6 @@ impl M17App { } } - pub fn transmit_packet(&self, packet_type: PacketType, payload: &[u8]) { - // hang on where do we get the LSF details from? We need a destination obviously - // our source address needs to be configured here too - // also there is possible CAN, encryption, meta payload - - // we will immediately convert this into a KISS payload before sending into channel so we only need borrow on data - } - /// Create a handle that can be used to transmit data on the TNC pub fn tx(&self) -> TxHandle { TxHandle { @@ -89,6 +81,14 @@ pub struct TxHandle { } impl TxHandle { + pub fn transmit_packet(&self, packet_type: PacketType, payload: &[u8]) { + // hang on where do we get the LSF details from? We need a destination obviously + // our source address needs to be configured here too + // also there is possible CAN, encryption, meta payload + + // we will immediately convert this into a KISS payload before sending into channel so we only need borrow on data + } + // add more methods here for stream outgoing pub fn transmit_stream_start(&self /* lsf?, payload? what needs to be configured ?! */) {}