From 805beab3f2065506de2c769aa6c589be20c4dd19 Mon Sep 17 00:00:00 2001 From: Russell Mull Date: Thu, 23 May 2024 14:19:48 -0700 Subject: [PATCH] Make header size functions public --- src/dlt.rs | 2 +- src/parse.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dlt.rs b/src/dlt.rs index a09e7a2..68207af 100644 --- a/src/dlt.rs +++ b/src/dlt.rs @@ -1631,7 +1631,7 @@ pub(crate) fn calculate_standard_header_length(header_type: u8) -> u16 { // TODO use header struct not u8 /// Use header type to determine the length of the all headers together -pub(crate) fn calculate_all_headers_length(header_type: u8) -> u16 { +pub fn calculate_all_headers_length(header_type: u8) -> u16 { let mut length = calculate_standard_header_length(header_type); if (header_type & WITH_EXTENDED_HEADER_FLAG) != 0 { length += EXTENDED_HEADER_LENGTH; diff --git a/src/parse.rs b/src/parse.rs index 831d3e0..f78b4be 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -225,7 +225,7 @@ fn nom_to_dlt_parse_error(ne: nom::Err, desc: &str) -> DltParseEr /// The standard header is part of every DLT message /// all big endian format [PRS_Dlt_00091] -pub(crate) fn dlt_standard_header(input: &[u8]) -> IResult<&[u8], StandardHeader, DltParseError> { +pub fn dlt_standard_header(input: &[u8]) -> IResult<&[u8], StandardHeader, DltParseError> { let (input, header_type_byte) = be_u8(input)?; let has_ecu_id = (header_type_byte & WITH_ECU_ID_FLAG) != 0; let has_session_id = (header_type_byte & WITH_SESSION_ID_FLAG) != 0;