}
}
- 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 {
}
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 ?! */) {}
Close,
}
-fn spawn_reader<T: Tnc + Send + 'static>(mut tnc: T, adapters: Arc<RwLock<Adapters>>) {
+fn spawn_reader<T: Tnc>(mut tnc: T, adapters: Arc<RwLock<Adapters>>) {
std::thread::spawn(move || {
let mut kiss_buffer = KissBuffer::new();
let mut stream_running = false;
});
}
-fn spawn_writer<T: Tnc + Send + 'static>(mut tnc: T, event_rx: mpsc::Receiver<TncControlEvent>) {
+fn spawn_writer<T: Tnc>(mut tnc: T, event_rx: mpsc::Receiver<TncControlEvent>) {
std::thread::spawn(move || {
while let Ok(ev) = event_rx.recv() {
match ev {