Skip to main content

list_messages_params

Function list_messages_params 

Source
pub fn list_messages_params(
    max_count: u16,
    offset: u16,
    read_status: Option<u8>,
    originating_address: Option<&str>,
    period_begin: Option<&str>,
    period_end: Option<&str>,
) -> Result<Vec<u8>, MapError>
Expand description

Builds a MAP app-params blob for ListMessages.

Encodes MaxListCount and ListStartOffset unconditionally. Appends FilterReadStatus when read_status is Some. String filters are encoded as null-terminated UTF-8 with a 1-byte length prefix ([tag][len = bytes+1][UTF-8][0x00]).

§Errors

Returns MapError::InvalidInput if any string contains a null byte or exceeds 254 UTF-8 bytes.