MCPcopy Index your code
hub / github.com/RizeCrime/linuxblaster_control / feature_at

Function feature_at

sniffer/src/main.rs:460–465  ·  view source on GitHub ↗

Parse one feature entry from d[off..off+6]: [family, id, f32_LE×4]

(d: &[u8], off: usize)

Source from the content-addressed store, hash-verified

458
459/// Parse one feature entry from d[off..off+6]: [family, id, f32_LE×4]
460fn feature_at(d: &[u8], off: usize) -> FeatureEntry {
461 if off + 6 > d.len() {
462 return FeatureEntry { family: "?".into(), name: "?".into(), value: None };
463 }
464 feature_raw(d[off], d[off + 1], [d[off+2], d[off+3], d[off+4], d[off+5]])
465}
466
467fn feature_raw(family: u8, id: u8, f32_bytes: [u8; 4]) -> FeatureEntry {
468 let value = Some(f32::from_le_bytes(f32_bytes));

Callers 1

decode_sbFunction · 0.85

Calls 1

feature_rawFunction · 0.85

Tested by

no test coverage detected