Skip to main content

parse_notification_stream

Function parse_notification_stream 

Source
pub fn parse_notification_stream(
    payload: &[u8],
    namespace: u32,
    public_qos: u32,
    db_name: Option<&str>,
) -> Result<Vec<NotificationRecord>>
Expand description

Decode every OAC record in a notification stream. The reference reads one leading message_type byte (TNS_MSG_TYPE_OAC) then loops _process_oac until end_of_response; the driver chains network packets into payload so this operates on the full concatenated TTC stream.

Returns the decoded records in order. A trailing NotificationRecord::Stop (or a record whose end_of_response is set) marks the end of the stream.