pub fn extract_bit_action_parameter(
parameter_data: &[u8],
offset: usize,
size: usize,
) -> BitVec<u8, Msb0>Expand description
Extract a bit<size> action parameter from the control-plane action data.
Action data lays out each parameter in declaration order as
size.div_ceil(8) little-endian bytes, starting at offset. x4c keeps
every numeric value little-endian inside a program (header fields are
byte-reversed on parse and once again on deparse), so the control plane
passes these values into this representation with no conversion necessary;
the same is true for exact and range keys.
The returned vector has the same layout as bitvec_resize output and
header fields of the same width, so load_le recovers the value whenever
the width fits the target integer (up to 128 bits for u128).