(&mut self, prop: &Prop)
| 118 | } |
| 119 | |
| 120 | pub fn decode_array(&mut self, prop: &Prop) -> Option<Vec<i32>> { |
| 121 | // SUS |
| 122 | let b = (prop.num_elements as f32).log2().floor() + 1.0; |
| 123 | let num_elements = self.read_nbits(b as u32)?; |
| 124 | |
| 125 | let p = prop.arr.as_ref().unwrap(); |
| 126 | let mut elems = vec![]; |
| 127 | for _ in 0..num_elements { |
| 128 | let pro = Prop { |
| 129 | table: "oopsie".to_string(), |
| 130 | name: p.to_string(), |
| 131 | arr: None, |
| 132 | col: 0, |
| 133 | data: None, |
| 134 | flags: p.flags(), |
| 135 | num_elements: p.num_elements(), |
| 136 | num_bits: p.num_bits(), |
| 137 | low_value: p.high_value(), |
| 138 | high_value: p.high_value(), |
| 139 | priority: p.priority(), |
| 140 | p_type: p.type_(), |
| 141 | }; |
| 142 | let val = self.decode(&pro); |
| 143 | elems.push(val); |
| 144 | } |
| 145 | Some(vec![0, 0, 0]) |
| 146 | } |
| 147 | #[inline(always)] |
| 148 | pub fn read_string(&mut self, length: i32) -> Option<String> { |
| 149 | let mut s: Vec<u8> = Vec::new(); |
no test coverage detected