pub fn parse_cmd(&self, i_start: usize, rowlen :usize) -> Result<Vec<Vec<u8>>, Box<dyn Error>> {
        let mut o: Vec<Vec<u8>> = Vec::new();
        let mut i_end = i_start;
        while i_end < rowlen {
            let mut out_vec : Vec<u8> = Vec::new();
            while i_end < rowlen && self.tmp_read_buf[i_end] != 0x20 {
                out_vec.push(self.tmp_read_buf[i_end]);
                i_end += 1;
            }
            o.push(out_vec);
            while i_end < rowlen && self.tmp_read_buf[i_end] == 0x20 {i_end += 1;}

        }
        Ok(o)
    }
// This is a very very slow implementation, but it's ok, this is called extremely infrequently to decode a command
This is a very very slow implementation, but it's ok, this is called extremely infrequently to decode a command
This is a very very slow implementation but it ' s ok this is called extremely infrequently to decode a command
pub fn parse_cmd(&self, i_start: usize, rowlen :usize) -> Result<Vec<Vec<u8>>, Box<dyn Error>> {
        let mut o: Vec<Vec<u8>> = Vec::new();
        let mut i_end = i_start;
        while i_end < rowlen {
            let mut out_vec : Vec<u8> = Vec::new();
            while i_end < rowlen && self.tmp_read_buf[i_end] != 0x20 {
                out_vec.push(self.tmp_read_buf[i_end]);
                i_end += 1;
            }
            o.push(out_vec);
            while i_end < rowlen && self.tmp_read_buf[i_end] == 0x20 {i_end += 1;}
        }
        Ok(o)
    }
pub fn parse_cmd ( & self , i_start : usize , rowlen : usize ) -> Result < Vec < Vec < u8 > > , Box < dyn Error > > { let mut o : Vec < Vec < u8 > > = Vec :: new ( ) ; let mut i_end = i_start ; while i_end < rowlen { let mut out_vec : Vec < u8 > = Vec :: new ( ) ; while i_end < rowlen && self . tmp_read_buf [ i_end ] != 0x20 { out_vec . push ( self . tmp_read_buf [ i_end ] ) ; i_end += 1 ; } o . push ( out_vec ) ; while i_end < rowlen && self . tmp_read_buf [ i_end ] == 0x20 { i_end += 1 ; } } Ok ( o ) }
This is a very very slow implementation, but it's ok, this is called extremely infrequently to decode a command
This is a very very slow implementation but it ' s ok this is called extremely infrequently to decode a command
&self
i_start
usize
rowlen
usize
&self
i_start
usize
rowlen
usize