Skip to main content

decode_pv_request_fields

Function decode_pv_request_fields 

Source
pub fn decode_pv_request_fields(body: &[u8], is_be: bool) -> Option<Vec<String>>
Expand description

Parse a pvRequest structure from the INIT body bytes and return the list of requested field paths.

Paths are returned as dot-separated strings (e.g. "value", "alarm.severity"). An empty inner field {} structure, or a body that cannot be parsed, is reported as None, meaning “return all fields” (no filtering).

A field whose inner pvRequest sub-structure is itself empty selects the whole sub-tree rooted at that field (so field(alarm)["alarm"] selects the entire alarm structure). Non-empty sub-structures expand into one entry per leaf path (so field(alarm{severity}) → ["alarm.severity"]).