From c569a0330d2a6dbe93db208b5b9b53db19718ee6 Mon Sep 17 00:00:00 2001 From: Shimomura Shunsuke Date: Wed, 12 Jun 2024 15:31:23 +0900 Subject: [PATCH] change ParamField into ParameterField --- gaia-ccsds-c2a/src/access/cmd/schema.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gaia-ccsds-c2a/src/access/cmd/schema.rs b/gaia-ccsds-c2a/src/access/cmd/schema.rs index 2dffc1dc..5ba5ce66 100644 --- a/gaia-ccsds-c2a/src/access/cmd/schema.rs +++ b/gaia-ccsds-c2a/src/access/cmd/schema.rs @@ -18,18 +18,18 @@ pub struct Metadata { #[derive(Debug, Clone)] pub struct CommandSchema { - pub sized_parameters: Vec, + pub sized_parameters: Vec, pub static_size: usize, pub has_trailer_parameter: bool, } #[derive(Debug, Clone)] -pub struct ParamField { +pub struct ParameterField { pub value: NumericField, pub description: String, } -impl SizedField for ParamField { +impl SizedField for ParameterField { type Value<'a> = NumericValue; fn read<'a>(&self, bytes: &'a [u8]) -> Result> { @@ -53,7 +53,7 @@ impl CommandSchema { pub fn build_writer<'b>( &'b self, bytes: &'b mut [u8], - ) -> Writer<'b, std::slice::Iter<'b, ParamField>> { + ) -> Writer<'b, std::slice::Iter<'b, ParameterField>> { Writer::new( self.sized_parameters.iter(), self.static_size, @@ -120,7 +120,7 @@ fn build_schema(db: &cmddb::Command) -> Result { for parameter in params_iter.by_ref() { if let Some(field) = build_numeric_field(static_size_bits, parameter) { static_size_bits += field.bit_len(); - sized_parameters.push(ParamField { + sized_parameters.push(ParameterField { value: field, description: parameter.description.clone(), });