Skip to content

Commit

Permalink
[Bug-Fix][Data Deserialization] (#1)
Browse files Browse the repository at this point in the history
* bitmap is a vec
    * field is a vec
    * some fields numeric types were incorrect

Co-authored-by: Abdul Rehman <[email protected]>
  • Loading branch information
abrehman94 and Abdul Rehman authored Sep 9, 2024
1 parent d173f82 commit 8656bb0
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/dataformats/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ pub struct Range {
#[serde(rename = "@Order")]
order: i8,

bit_count: i8,
bit_offset: i8,
bit_count: i16,
bit_offset: u8,
}

#[derive(Debug, PartialEq, Deserialize)]
Expand All @@ -35,7 +35,13 @@ pub struct BitMap {
#[serde(rename = "@Order")]
order: Option<i8>,

field: Option<Field>,
field: Option<Vec<Field>>,
}

#[derive(Debug, PartialEq, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DataAttributes {
pub bit_map: Vec<BitMap>
}

#[derive(Debug, PartialEq, Deserialize)]
Expand All @@ -46,7 +52,7 @@ pub struct DataFormat {
pub data_type: String,
pub bit_count: i16,
pub component_count: i8,
pub data_attributes: BitMap,
pub data_attributes: DataAttributes,
}

#[derive(Debug, PartialEq, Deserialize)]
Expand Down

0 comments on commit 8656bb0

Please sign in to comment.