TCP Server #77

Merged
muellerr merged 52 commits from tcp-server into main 2023-09-21 18:11:38 +02:00
Showing only changes of commit 54bc37b086 - Show all commits

View File

@ -15,18 +15,14 @@ pub trait ApidLookup {
/// The parser will write all packets which were decoded successfully to the given `tc_receiver`. /// The parser will write all packets which were decoded successfully to the given `tc_receiver`.
pub fn parse_buffer_for_ccsds_space_packets<E>( pub fn parse_buffer_for_ccsds_space_packets<E>(
buf: &mut [u8], buf: &mut [u8],
apid_lookup: &dyn ApidLookup, _apid_lookup: &dyn ApidLookup,
tc_receiver: &mut dyn ReceivesTc<Error = E>, _tc_receiver: &mut dyn ReceivesTc<Error = E>,
next_write_idx: &mut usize, _next_write_idx: &mut usize,
) -> Result<u32, E> { ) -> Result<u32, E> {
let mut start_index_packet = 0; let packets_found = 0;
let mut start_found = false; for _ in 0..buf.len() {
let mut last_byte = false;
let mut packets_found = 0;
for i in 0..buf.len() {
todo!(); todo!();
} }
// Split frame at the end for a multi-packet frame. Move it to the front of the buffer. // Split frame at the end for a multi-packet frame. Move it to the front of the buffer.
if start_index_packet > 0 && start_found && packets_found > 0 {}
Ok(packets_found) Ok(packets_found)
} }