This commit is contained in:
parent
2f08365247
commit
e4d8c0c9a7
@ -165,13 +165,16 @@ mod tests {
|
||||
thread,
|
||||
};
|
||||
|
||||
use crate::{tmtc::{ReceivesTcCore, TmPacketSource}, hal::std::tcp_server::ServerConfig, parsers::tests::{SIMPLE_PACKET, INVERTED_PACKET}};
|
||||
use alloc::{collections::VecDeque, sync::Arc, vec::Vec, boxed::Box};
|
||||
use crate::{
|
||||
hal::std::tcp_server::ServerConfig,
|
||||
parsers::tests::{INVERTED_PACKET, SIMPLE_PACKET},
|
||||
tmtc::{ReceivesTcCore, TmPacketSource},
|
||||
};
|
||||
use alloc::{boxed::Box, collections::VecDeque, sync::Arc, vec::Vec};
|
||||
use cobs::encode;
|
||||
|
||||
use super::TcpTmtcInCobsServer;
|
||||
|
||||
|
||||
#[derive(Default, Clone)]
|
||||
struct SyncTcCacher {
|
||||
tc_queue: Arc<Mutex<VecDeque<Vec<u8>>>>,
|
||||
|
@ -156,7 +156,7 @@ pub(crate) mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
pub (crate) fn encode_simple_packet(encoded_buf: &mut [u8], current_idx: &mut usize) {
|
||||
pub(crate) fn encode_simple_packet(encoded_buf: &mut [u8], current_idx: &mut usize) {
|
||||
encoded_buf[*current_idx] = 0;
|
||||
*current_idx += 1;
|
||||
*current_idx += encode(&SIMPLE_PACKET, &mut encoded_buf[*current_idx..]);
|
||||
|
Loading…
Reference in New Issue
Block a user