diff --git a/src/ast/attribute_definition.rs b/src/ast/attribute_definition.rs index 3b989ae..d882288 100644 --- a/src/ast/attribute_definition.rs +++ b/src/ast/attribute_definition.rs @@ -1,20 +1,18 @@ -use can_dbc_pest::{Pair, Pairs, Rule}; +use can_dbc_pest::{Pair, Rule}; -use crate::parser::{validated_inner, DbcError}; -use crate::DbcResult; +use crate::parser::{ + expect_empty, inner_str, next, next_optional_rule, next_rule, validated_inner, DbcError, +}; +use crate::AttributeValueType; #[derive(Clone, Debug, PartialEq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub enum AttributeDefinition { - // TODO add properties - Message(String), - // TODO add properties - Node(String), - // TODO add properties - Signal(String), - EnvironmentVariable(String), - // TODO figure out name - Plain(String), + Message(String, AttributeValueType), + Node(String, AttributeValueType), + Signal(String, AttributeValueType), + EnvironmentVariable(String, AttributeValueType), + Plain(String, AttributeValueType), } impl TryFrom> for AttributeDefinition { @@ -22,42 +20,24 @@ impl TryFrom> for AttributeDefinition { /// Parse attribute definition: `BA_DEF_ [object_type] attribute_name attribute_type [min max];` fn try_from(value: Pair<'_, Rule>) -> Result { - let inner_pairs = validated_inner(value, Rule::attr_def)?; - let (definition_string, object_type) = parse_obj_type_vals(inner_pairs)?; + let mut pairs = validated_inner(value, Rule::attr_def)?; - Ok(match object_type { - "SG_" => Self::Signal(definition_string), - "BO_" => Self::Message(definition_string), - "BU_" => Self::Node(definition_string), - "EV_" => Self::EnvironmentVariable(definition_string), - _ => Self::Plain(definition_string), - }) - } -} + let object_type = if let Some(v) = next_optional_rule(&mut pairs, Rule::object_type) { + v.as_str().to_string() + } else { + String::new() + }; -pub(crate) fn parse_obj_type_vals(inner_pairs: Pairs<'_, Rule>) -> DbcResult<(String, &str)> { - let mut definition_string = String::new(); - let mut object_type = ""; + let name = inner_str(next_rule(&mut pairs, Rule::attribute_name)?); + let value = next(&mut pairs)?.try_into()?; + expect_empty(&pairs)?; - // Process all pairs - for pair in inner_pairs { - match pair.as_rule() { - Rule::object_type => { - object_type = pair.as_str(); - } - Rule::attribute_name - | Rule::attribute_type_int - | Rule::attribute_type_hex - | Rule::attribute_type_float - | Rule::attribute_type_string - | Rule::attribute_type_enum => { - if !definition_string.is_empty() { - definition_string.push(' '); - } - definition_string.push_str(pair.as_str()); - } - v => return Err(DbcError::UnknownRule(v)), - } + Ok(match object_type.as_str() { + "SG_" => Self::Signal(name, value), + "BO_" => Self::Message(name, value), + "BU_" => Self::Node(name, value), + "EV_" => Self::EnvironmentVariable(name, value), + _ => Self::Plain(name, value), + }) } - Ok((definition_string, object_type)) } diff --git a/src/ast/attribute_definition_for_relation.rs b/src/ast/attribute_definition_for_relation.rs index c0186f6..89921ed 100644 --- a/src/ast/attribute_definition_for_relation.rs +++ b/src/ast/attribute_definition_for_relation.rs @@ -2,6 +2,8 @@ use can_dbc_pest::{Pair, Rule}; use crate::parser::{inner_str, validated_inner, DbcError}; +// FIXME: consider using AttributeDefinition instead + #[derive(Clone, Debug, PartialEq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct AttributeDefinitionForRelation { diff --git a/src/ast/attribute_value.rs b/src/ast/attribute_value.rs index d4d5f6b..ad2fa72 100644 --- a/src/ast/attribute_value.rs +++ b/src/ast/attribute_value.rs @@ -1,6 +1,7 @@ use can_dbc_pest::{Pair, Rule}; -use crate::parser::{inner_str, parse_float, parse_int, parse_uint, DbcError}; +use crate::parser::{inner_str, DbcError}; +use crate::NumericValue; #[derive(Clone, Debug, PartialEq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] @@ -17,15 +18,11 @@ impl TryFrom> for AttributeValue { fn try_from(value: Pair<'_, Rule>) -> Result { match value.as_rule() { Rule::quoted_str => Ok(Self::String(inner_str(value))), - Rule::number => { - if let Ok(result) = parse_uint(&value) { - Ok(Self::Uint(result)) - } else if let Ok(result) = parse_int(&value) { - Ok(Self::Int(result)) - } else { - Ok(Self::Double(parse_float(&value)?)) - } - } + Rule::number => Ok(match value.as_str().parse()? { + NumericValue::Uint(u) => Self::Uint(u), + NumericValue::Int(i) => Self::Int(i), + NumericValue::Double(d) => Self::Double(d), + }), _ => Err(Self::Error::ExpectedStrNumber(value.as_rule())), } } diff --git a/src/ast/attribute_value_type.rs b/src/ast/attribute_value_type.rs index fd801e4..5b688a6 100644 --- a/src/ast/attribute_value_type.rs +++ b/src/ast/attribute_value_type.rs @@ -1,10 +1,51 @@ -// FIXME: not used! +use can_dbc_pest::{Pair, Rule}; + +use crate::parser::{expect_empty, inner_str, next_rule}; +use crate::{DbcError, DbcResult, NumericValue}; + #[derive(Clone, Debug, PartialEq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub enum AttributeValueType { - Int(i64, i64), - Hex(i64, i64), - Float(f64, f64), + Int(NumericValue, NumericValue), + Hex(NumericValue, NumericValue), + Float(NumericValue, NumericValue), String, Enum(Vec), } + +impl TryFrom> for AttributeValueType { + type Error = DbcError; + + fn try_from(pair: Pair<'_, Rule>) -> Result { + let rule = pair.as_rule(); + Ok(match rule { + Rule::attribute_type_int | Rule::attribute_type_hex | Rule::attribute_type_float => { + let mut pairs = pair.into_inner(); + let min = next_rule(&mut pairs, Rule::minimum)?.as_str().parse()?; + let max = next_rule(&mut pairs, Rule::maximum)?.as_str().parse()?; + expect_empty(&pairs)?; + match rule { + Rule::attribute_type_int => AttributeValueType::Int(min, max), + Rule::attribute_type_hex => AttributeValueType::Hex(min, max), + Rule::attribute_type_float => AttributeValueType::Float(min, max), + _ => unreachable!(), + } + } + Rule::attribute_type_string => AttributeValueType::String, + Rule::attribute_type_enum => { + let enum_values: DbcResult<_> = pair + .into_inner() + .map(|pair| { + if pair.as_rule() == Rule::quoted_str { + Ok(inner_str(pair)) + } else { + Err(DbcError::ExpectedRule(Rule::quoted_str, pair.as_rule())) + } + }) + .collect(); + AttributeValueType::Enum(enum_values?) + } + v => return Err(DbcError::UnknownRule(v)), + }) + } +} diff --git a/src/ast/mod.rs b/src/ast/mod.rs index 4bda895..dc0cf56 100644 --- a/src/ast/mod.rs +++ b/src/ast/mod.rs @@ -1,4 +1,3 @@ -// Re-export all types from individual files mod access_node; mod access_type; mod attr_default; @@ -25,6 +24,7 @@ mod message_id; mod message_transmitter; mod multiplex_indicator; mod node; +mod numeric_value; mod signal; mod signal_attribute_value; mod signal_extended_value_type; @@ -67,6 +67,7 @@ pub use message_id::*; pub use message_transmitter::*; pub use multiplex_indicator::*; pub use node::*; +pub use numeric_value::*; pub use signal::*; pub use signal_attribute_value::*; pub use signal_extended_value_type::*; diff --git a/src/ast/numeric_value.rs b/src/ast/numeric_value.rs new file mode 100644 index 0000000..d9fed36 --- /dev/null +++ b/src/ast/numeric_value.rs @@ -0,0 +1,27 @@ +use std::str::FromStr; + +use crate::DbcError; + +#[derive(Clone, Debug, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub enum NumericValue { + Uint(u64), + Int(i64), + Double(f64), +} + +impl FromStr for NumericValue { + type Err = DbcError; + + fn from_str(value: &str) -> Result { + if let Ok(v) = value.parse::() { + Ok(NumericValue::Uint(v)) + } else if let Ok(v) = value.parse::() { + Ok(NumericValue::Int(v)) + } else if let Ok(v) = value.parse::() { + Ok(NumericValue::Double(v)) + } else { + Err(DbcError::InvalidNumericValue(value.to_string())) + } + } +} diff --git a/src/parser.rs b/src/parser.rs index 4a55d6a..cba823d 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -49,6 +49,8 @@ pub enum DbcError { UnknownMultiplexIndicator(String), #[error("Unknown rule: {0:?}")] UnknownRule(Rule), + #[error("Invalid numeric value: '{0}'")] + InvalidNumericValue(String), } impl From> for DbcError { diff --git a/src/parser_tests.rs b/src/parser_tests.rs index 25dad34..5af4e06 100644 --- a/src/parser_tests.rs +++ b/src/parser_tests.rs @@ -625,7 +625,8 @@ BA_DEF_ BO_ "GenMsgSendType" STRING ; "#; let pair = parse(def.trim_start(), Rule::attr_def).unwrap(); let val = test_into::(&pair); - let exp = AttributeDefinition::Message(r#""GenMsgSendType" STRING"#.to_string()); + let exp = + AttributeDefinition::Message("GenMsgSendType".to_string(), AttributeValueType::String); assert_eq!(val, exp); } @@ -636,7 +637,10 @@ BA_DEF_ BU_ "BuDef1BO" INT 0 1000000; "#; let pair = parse(def.trim_start(), Rule::attr_def).unwrap(); let val = test_into::(&pair); - let exp = AttributeDefinition::Node(r#""BuDef1BO" INT 0 1000000"#.to_string()); + let exp = AttributeDefinition::Node( + "BuDef1BO".to_string(), + AttributeValueType::Int(NumericValue::Uint(0), NumericValue::Uint(1_000_000)), + ); assert_eq!(val, exp); } @@ -647,7 +651,10 @@ BA_DEF_ SG_ "SgDef1BO" INT 0 1000000; "#; let pair = parse(def.trim_start(), Rule::attr_def).unwrap(); let val = test_into::(&pair); - let exp = AttributeDefinition::Signal(r#""SgDef1BO" INT 0 1000000"#.to_string()); + let exp = AttributeDefinition::Signal( + "SgDef1BO".to_string(), + AttributeValueType::Int(NumericValue::Uint(0), NumericValue::Uint(1_000_000)), + ); assert_eq!(val, exp); } diff --git a/tests/snapshots/dbc-cantools/BU_BO_REL_.snap b/tests/snapshots/dbc-cantools/BU_BO_REL_.snap index e2ba629..1254676 100644 --- a/tests/snapshots/dbc-cantools/BU_BO_REL_.snap +++ b/tests/snapshots/dbc-cantools/BU_BO_REL_.snap @@ -1,6 +1,5 @@ --- source: tests/snapshots.rs -assertion_line: 152 --- version: "" new_symbols: @@ -57,7 +56,11 @@ messages: receivers: - Vector__XXX attribute_definitions: - - Message: "\"GenMsgCycleTime\" INT 0 65535" + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 65535 relation_attribute_definitions: - name: MsgProject value_spec: "\"MsgProject\" ENUM \"A\",\"B\",\"C\"" diff --git a/tests/snapshots/dbc-cantools/BU_BO_REL_Message.snap b/tests/snapshots/dbc-cantools/BU_BO_REL_Message.snap index a2e506d..5045614 100644 --- a/tests/snapshots/dbc-cantools/BU_BO_REL_Message.snap +++ b/tests/snapshots/dbc-cantools/BU_BO_REL_Message.snap @@ -1,6 +1,5 @@ --- source: tests/snapshots.rs -assertion_line: 152 --- version: "" new_symbols: @@ -58,7 +57,11 @@ messages: receivers: - ECU2 attribute_definitions: - - Message: "\"GenMsgCycleTime\" INT 0 65535" + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 65535 relation_attribute_definitions: - name: MsgProject value_spec: "\"MsgProject\" ENUM \"A\",\"B\",\"C\"" diff --git a/tests/snapshots/dbc-cantools/abs.snap b/tests/snapshots/dbc-cantools/abs.snap index d68300d..034a0ff 100644 --- a/tests/snapshots/dbc-cantools/abs.snap +++ b/tests/snapshots/dbc-cantools/abs.snap @@ -1682,9 +1682,33 @@ comments: name: P_RA comment: Brake pressure on the rear axle. attribute_definitions: - - Message: "\"GenMsgCycleTime\" INT 1 3000" - - Message: "\"VFrameFormat\" ENUM \"StandardCAN\",\"ExtendedCAN\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"StandardCAN_FD\",\"ExtendedCAN_FD\"" - - Plain: "\"BusType\" STRING" + - Message: + - GenMsgCycleTime + - Int: + - Uint: 1 + - Uint: 3000 + - Message: + - VFrameFormat + - Enum: + - StandardCAN + - ExtendedCAN + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - StandardCAN_FD + - ExtendedCAN_FD + - Plain: + - BusType + - String attribute_defaults: - name: GenMsgCycleTime value: diff --git a/tests/snapshots/dbc-cantools/attribute_Event.snap b/tests/snapshots/dbc-cantools/attribute_Event.snap index b981b15..3abb041 100644 --- a/tests/snapshots/dbc-cantools/attribute_Event.snap +++ b/tests/snapshots/dbc-cantools/attribute_Event.snap @@ -56,8 +56,14 @@ messages: receivers: - Vector__XXX attribute_definitions: - - Message: "\"GenMsgSendType\" STRING" - - Message: "\"GenMsgCycleTime\" INT 0 100" + - Message: + - GenMsgSendType + - String + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 100 attribute_values_message: - name: GenMsgSendType message_id: diff --git a/tests/snapshots/dbc-cantools/attributes.snap b/tests/snapshots/dbc-cantools/attributes.snap index 78fc3a4..506833e 100644 --- a/tests/snapshots/dbc-cantools/attributes.snap +++ b/tests/snapshots/dbc-cantools/attributes.snap @@ -78,29 +78,135 @@ comments: name: TheNode comment: TheNodeComment attribute_definitions: - - Signal: "\"TheSignalStringAttribute\" STRING" - - Plain: "\"TheNetworkAttribute\" INT 0 100" - - Message: "\"TheUnusedAttributeDefinitionWithoutDefault\" HEX 0 8" - - Message: "\"TheHexAttribute\" HEX 0 8" - - Message: "\"TheFloatAttribute\" FLOAT 5 87" - - Node: "\"TheNodeAttribute\" INT 50 150" - - Node: "\"NodeLayerModules\" STRING" - - Message: "\"GenMsgStartDelayTime\" INT 0 65535" - - Signal: "\"NWM-WakeupAllowed\" ENUM \"No\",\"Yes\"" - - Message: "\"NmMessage\" ENUM \"no\",\"yes\"" - - Message: "\"GenMsgILSupport\" ENUM \"No\",\"Yes\"" - - Node: "\"NmNode\" ENUM \"no\",\"yes\"" - - Node: "\"NmStationAddress\" INT 0 63" - - Plain: "\"NmBaseAddress\" HEX 1024 1087" - - Message: "\"GenMsgCycleTimeFast\" INT 0 50000" - - Plain: "\"BusType\" STRING" - - Message: "\"GenMsgCycleTime\" INT 0 50000" - - Message: "\"GenMsgDelayTime\" INT 0 1000" - - Message: "\"GenMsgNrOfRepetition\" INT 0 999999" - - Message: "\"GenMsgSendType\" ENUM \"Cyclic\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"IfActive\",\"NoMsgSendType\",\"NotUsed\",\"vector_leerstring\"" - - Signal: "\"GenSigInactiveValue\" INT 0 100000" - - Signal: "\"GenSigSendType\" ENUM \"Cyclic\",\"OnWrite\",\"OnWriteWithRepetition\",\"OnChange\",\"OnChangeWithRepetition\",\"IfActive\",\"IfActiveWithRepetition\",\"NoSigSendType\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\"" - - Signal: "\"GenSigStartValue\" FLOAT 0 100000000000" + - Signal: + - TheSignalStringAttribute + - String + - Plain: + - TheNetworkAttribute + - Int: + - Uint: 0 + - Uint: 100 + - Message: + - TheUnusedAttributeDefinitionWithoutDefault + - Hex: + - Uint: 0 + - Uint: 8 + - Message: + - TheHexAttribute + - Hex: + - Uint: 0 + - Uint: 8 + - Message: + - TheFloatAttribute + - Float: + - Uint: 5 + - Uint: 87 + - Node: + - TheNodeAttribute + - Int: + - Uint: 50 + - Uint: 150 + - Node: + - NodeLayerModules + - String + - Message: + - GenMsgStartDelayTime + - Int: + - Uint: 0 + - Uint: 65535 + - Signal: + - NWM-WakeupAllowed + - Enum: + - "No" + - "Yes" + - Message: + - NmMessage + - Enum: + - "no" + - "yes" + - Message: + - GenMsgILSupport + - Enum: + - "No" + - "Yes" + - Node: + - NmNode + - Enum: + - "no" + - "yes" + - Node: + - NmStationAddress + - Int: + - Uint: 0 + - Uint: 63 + - Plain: + - NmBaseAddress + - Hex: + - Uint: 1024 + - Uint: 1087 + - Message: + - GenMsgCycleTimeFast + - Int: + - Uint: 0 + - Uint: 50000 + - Plain: + - BusType + - String + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 50000 + - Message: + - GenMsgDelayTime + - Int: + - Uint: 0 + - Uint: 1000 + - Message: + - GenMsgNrOfRepetition + - Int: + - Uint: 0 + - Uint: 999999 + - Message: + - GenMsgSendType + - Enum: + - Cyclic + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - IfActive + - NoMsgSendType + - NotUsed + - vector_leerstring + - Signal: + - GenSigInactiveValue + - Int: + - Uint: 0 + - Uint: 100000 + - Signal: + - GenSigSendType + - Enum: + - Cyclic + - OnWrite + - OnWriteWithRepetition + - OnChange + - OnChangeWithRepetition + - IfActive + - IfActiveWithRepetition + - NoSigSendType + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - Signal: + - GenSigStartValue + - Float: + - Uint: 0 + - Uint: 100000000000 attribute_defaults: - name: TheSignalStringAttribute value: diff --git a/tests/snapshots/dbc-cantools/attributes_relation.snap b/tests/snapshots/dbc-cantools/attributes_relation.snap index 626d45d..14b43b9 100644 --- a/tests/snapshots/dbc-cantools/attributes_relation.snap +++ b/tests/snapshots/dbc-cantools/attributes_relation.snap @@ -1,6 +1,5 @@ --- source: tests/snapshots.rs -assertion_line: 152 --- version: "" new_symbols: @@ -82,10 +81,25 @@ comments: name: ECU1 comment: First ECU attribute_definitions: - - Signal: "\"GenSigInactiveValue\" INT 0 65535" - - Message: "\"MsgProject\" ENUM \"A\",\"B\",\"C\"" - - Plain: "\"BusType\" STRING" - - Message: "\"GenMsgCycleTime\" INT 0 65535" + - Signal: + - GenSigInactiveValue + - Int: + - Uint: 0 + - Uint: 65535 + - Message: + - MsgProject + - Enum: + - A + - B + - C + - Plain: + - BusType + - String + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 65535 relation_attribute_definitions: - name: SigFirstTimeoutTime value_spec: "\"SigFirstTimeoutTime\" INT 0 65535" diff --git a/tests/snapshots/dbc-cantools/big_numbers.snap b/tests/snapshots/dbc-cantools/big_numbers.snap index 22b7e15..7ee08ad 100644 --- a/tests/snapshots/dbc-cantools/big_numbers.snap +++ b/tests/snapshots/dbc-cantools/big_numbers.snap @@ -78,29 +78,135 @@ comments: name: TheNode comment: TheNodeComment attribute_definitions: - - Signal: "\"TheSignalStringAttribute\" STRING" - - Plain: "\"TheNetworkAttribute\" INT 0 100" - - Message: "\"TheUnusedAttributeDefinitionWithoutDefault\" HEX 0 8" - - Message: "\"TheHexAttribute\" HEX 0 8" - - Message: "\"TheFloatAttribute\" FLOAT 5 87" - - Node: "\"TheNodeAttribute\" INT -9.22337203685478E+018 1.84467440737096E+019" - - Node: "\"NodeLayerModules\" STRING" - - Message: "\"GenMsgStartDelayTime\" INT 0 65535" - - Signal: "\"NWM-WakeupAllowed\" ENUM \"No\",\"Yes\"" - - Message: "\"NmMessage\" ENUM \"no\",\"yes\"" - - Message: "\"GenMsgILSupport\" ENUM \"No\",\"Yes\"" - - Node: "\"NmNode\" ENUM \"no\",\"yes\"" - - Node: "\"NmStationAddress\" INT 0 63" - - Plain: "\"NmBaseAddress\" HEX 1024 1087" - - Message: "\"GenMsgCycleTimeFast\" INT 0 50000" - - Plain: "\"BusType\" STRING" - - Message: "\"GenMsgCycleTime\" INT 0 50000" - - Message: "\"GenMsgDelayTime\" INT 0 1000" - - Message: "\"GenMsgNrOfRepetition\" INT 0 999999" - - Message: "\"GenMsgSendType\" ENUM \"Cyclic\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"IfActive\",\"NoMsgSendType\",\"NotUsed\",\"vector_leerstring\"" - - Signal: "\"GenSigInactiveValue\" INT 0 100000" - - Signal: "\"GenSigSendType\" ENUM \"Cyclic\",\"OnWrite\",\"OnWriteWithRepetition\",\"OnChange\",\"OnChangeWithRepetition\",\"IfActive\",\"IfActiveWithRepetition\",\"NoSigSendType\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\"" - - Signal: "\"GenSigStartValue\" FLOAT 0 100000000000" + - Signal: + - TheSignalStringAttribute + - String + - Plain: + - TheNetworkAttribute + - Int: + - Uint: 0 + - Uint: 100 + - Message: + - TheUnusedAttributeDefinitionWithoutDefault + - Hex: + - Uint: 0 + - Uint: 8 + - Message: + - TheHexAttribute + - Hex: + - Uint: 0 + - Uint: 8 + - Message: + - TheFloatAttribute + - Float: + - Uint: 5 + - Uint: 87 + - Node: + - TheNodeAttribute + - Int: + - Double: -9223372036854780000 + - Double: 18446744073709600000 + - Node: + - NodeLayerModules + - String + - Message: + - GenMsgStartDelayTime + - Int: + - Uint: 0 + - Uint: 65535 + - Signal: + - NWM-WakeupAllowed + - Enum: + - "No" + - "Yes" + - Message: + - NmMessage + - Enum: + - "no" + - "yes" + - Message: + - GenMsgILSupport + - Enum: + - "No" + - "Yes" + - Node: + - NmNode + - Enum: + - "no" + - "yes" + - Node: + - NmStationAddress + - Int: + - Uint: 0 + - Uint: 63 + - Plain: + - NmBaseAddress + - Hex: + - Uint: 1024 + - Uint: 1087 + - Message: + - GenMsgCycleTimeFast + - Int: + - Uint: 0 + - Uint: 50000 + - Plain: + - BusType + - String + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 50000 + - Message: + - GenMsgDelayTime + - Int: + - Uint: 0 + - Uint: 1000 + - Message: + - GenMsgNrOfRepetition + - Int: + - Uint: 0 + - Uint: 999999 + - Message: + - GenMsgSendType + - Enum: + - Cyclic + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - IfActive + - NoMsgSendType + - NotUsed + - vector_leerstring + - Signal: + - GenSigInactiveValue + - Int: + - Uint: 0 + - Uint: 100000 + - Signal: + - GenSigSendType + - Enum: + - Cyclic + - OnWrite + - OnWriteWithRepetition + - OnChange + - OnChangeWithRepetition + - IfActive + - IfActiveWithRepetition + - NoSigSendType + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - Signal: + - GenSigStartValue + - Float: + - Uint: 0 + - Uint: 100000000000 attribute_defaults: - name: TheSignalStringAttribute value: diff --git a/tests/snapshots/dbc-cantools/bus_comment.snap b/tests/snapshots/dbc-cantools/bus_comment.snap index 012a881..a2538d5 100644 --- a/tests/snapshots/dbc-cantools/bus_comment.snap +++ b/tests/snapshots/dbc-cantools/bus_comment.snap @@ -215,14 +215,57 @@ comments: name: Multiplexor comment: Defines data content for response messages. attribute_definitions: - - Message: "\"VFrameFormat\" ENUM \"StandardCAN\",\"ExtendedCAN\",\"reserved\",\"J1939PG\"" - - Signal: "\"GenSigSendType\" ENUM \"Cyclic\",\"OnWrite\",\"OnWriteWithRepetition\",\"OnChange\",\"OnChangeWithRepetition\",\"IfActive\",\"IfActiveWithRepetition\",\"NoSigSendType\"" - - Signal: "\"GenSigInactiveValue\" INT 0 0" - - Message: "\"GenMsgCycleTime\" INT 0 0" - - Message: "\"GenMsgSendType\" ENUM \"Cyclic\",\"not_used\",\"not_used\",\"not_used\",\"not_used\",\"Cyclic\",\"not_used\",\"IfActive\",\"NoMsgSendType\"" - - Node: "\"NmStationAddress\" HEX 0 0" - - Plain: "\"DBName\" STRING" - - Plain: "\"BusType\" STRING" + - Message: + - VFrameFormat + - Enum: + - StandardCAN + - ExtendedCAN + - reserved + - J1939PG + - Signal: + - GenSigSendType + - Enum: + - Cyclic + - OnWrite + - OnWriteWithRepetition + - OnChange + - OnChangeWithRepetition + - IfActive + - IfActiveWithRepetition + - NoSigSendType + - Signal: + - GenSigInactiveValue + - Int: + - Uint: 0 + - Uint: 0 + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 0 + - Message: + - GenMsgSendType + - Enum: + - Cyclic + - not_used + - not_used + - not_used + - not_used + - Cyclic + - not_used + - IfActive + - NoMsgSendType + - Node: + - NmStationAddress + - Hex: + - Uint: 0 + - Uint: 0 + - Plain: + - DBName + - String + - Plain: + - BusType + - String attribute_defaults: - name: VFrameFormat value: diff --git a/tests/snapshots/dbc-cantools/choices.snap b/tests/snapshots/dbc-cantools/choices.snap index ce9254a..1b178d8 100644 --- a/tests/snapshots/dbc-cantools/choices.snap +++ b/tests/snapshots/dbc-cantools/choices.snap @@ -71,7 +71,9 @@ messages: receivers: - Vector__XXX attribute_definitions: - - Plain: "\"BusType\" STRING" + - Plain: + - BusType + - String attribute_defaults: - name: BusType value: diff --git a/tests/snapshots/dbc-cantools/choices_issue_with_name.snap b/tests/snapshots/dbc-cantools/choices_issue_with_name.snap index 5227389..eb54e2f 100644 --- a/tests/snapshots/dbc-cantools/choices_issue_with_name.snap +++ b/tests/snapshots/dbc-cantools/choices_issue_with_name.snap @@ -60,7 +60,9 @@ messages: receivers: - Vector__XXX attribute_definitions: - - Plain: "\"BusType\" STRING" + - Plain: + - BusType + - String attribute_defaults: - name: BusType value: diff --git a/tests/snapshots/dbc-cantools/cp1252.snap b/tests/snapshots/dbc-cantools/cp1252.snap index 796fdf2..cc3652a 100644 --- a/tests/snapshots/dbc-cantools/cp1252.snap +++ b/tests/snapshots/dbc-cantools/cp1252.snap @@ -39,7 +39,9 @@ comments: name: Node1 comment: " !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u007f€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" attribute_definitions: - - Plain: "\"BusType\" STRING" + - Plain: + - BusType + - String attribute_defaults: - name: BusType value: diff --git a/tests/snapshots/dbc-cantools/empty_choice.snap b/tests/snapshots/dbc-cantools/empty_choice.snap index 2f3237e..730678e 100644 --- a/tests/snapshots/dbc-cantools/empty_choice.snap +++ b/tests/snapshots/dbc-cantools/empty_choice.snap @@ -89,7 +89,9 @@ messages: receivers: - Vector__XXX attribute_definitions: - - Plain: "\"BusType\" STRING" + - Plain: + - BusType + - String attribute_defaults: - name: BusType value: diff --git a/tests/snapshots/dbc-cantools/fd_test.snap b/tests/snapshots/dbc-cantools/fd_test.snap index bb3428c..a68c380 100644 --- a/tests/snapshots/dbc-cantools/fd_test.snap +++ b/tests/snapshots/dbc-cantools/fd_test.snap @@ -110,16 +110,62 @@ messages: receivers: - Vector__XXX attribute_definitions: - - Message: "\"CANFD_BRS\" ENUM \"0\",\"1\"" - - Plain: "\"DBName\" STRING" - - Plain: "\"BusType\" STRING" - - Node: "\"NodeLayerModules\" STRING" - - Node: "\"ECU\" STRING" - - Node: "\"CANoeJitterMax\" INT 0 0" - - Node: "\"CANoeJitterMin\" INT 0 0" - - Node: "\"CANoeDrift\" INT 0 0" - - Node: "\"CANoeStartDelay\" INT 0 0" - - Message: "\"VFrameFormat\" ENUM \"StandardCAN\",\"ExtendedCAN\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"StandardCAN_FD\",\"ExtendedCAN_FD\"" + - Message: + - CANFD_BRS + - Enum: + - "0" + - "1" + - Plain: + - DBName + - String + - Plain: + - BusType + - String + - Node: + - NodeLayerModules + - String + - Node: + - ECU + - String + - Node: + - CANoeJitterMax + - Int: + - Uint: 0 + - Uint: 0 + - Node: + - CANoeJitterMin + - Int: + - Uint: 0 + - Uint: 0 + - Node: + - CANoeDrift + - Int: + - Uint: 0 + - Uint: 0 + - Node: + - CANoeStartDelay + - Int: + - Uint: 0 + - Uint: 0 + - Message: + - VFrameFormat + - Enum: + - StandardCAN + - ExtendedCAN + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - StandardCAN_FD + - ExtendedCAN_FD attribute_defaults: - name: CANFD_BRS value: diff --git a/tests/snapshots/dbc-cantools/floating_point.snap b/tests/snapshots/dbc-cantools/floating_point.snap index 0c975b7..6655dbb 100644 --- a/tests/snapshots/dbc-cantools/floating_point.snap +++ b/tests/snapshots/dbc-cantools/floating_point.snap @@ -93,7 +93,11 @@ comments: name: TestNode comment: "" attribute_definitions: - - Message: "\"GenMsgCycleTime\" INT 0 65535" + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 65535 attribute_defaults: - name: GenMsgCycleTime value: diff --git a/tests/snapshots/dbc-cantools/floating_point_use_float.snap b/tests/snapshots/dbc-cantools/floating_point_use_float.snap index c35b2ad..580c4b4 100644 --- a/tests/snapshots/dbc-cantools/floating_point_use_float.snap +++ b/tests/snapshots/dbc-cantools/floating_point_use_float.snap @@ -112,7 +112,11 @@ comments: name: TestNode comment: "" attribute_definitions: - - Message: "\"GenMsgCycleTime\" INT 0 65535" + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 65535 attribute_defaults: - name: GenMsgCycleTime value: diff --git a/tests/snapshots/dbc-cantools/foobar.snap b/tests/snapshots/dbc-cantools/foobar.snap index 9422ac6..50adfdd 100644 --- a/tests/snapshots/dbc-cantools/foobar.snap +++ b/tests/snapshots/dbc-cantools/foobar.snap @@ -1,6 +1,5 @@ --- source: tests/snapshots.rs -assertion_line: 152 --- version: "2.0" new_symbols: @@ -205,15 +204,57 @@ comments: name: Bar comment: Bar. attribute_definitions: - - Plain: "\"DBName\" STRING" - - Plain: "\"Baudrate\" INT 0 1000000" - - Plain: "\"AFloat\" FLOAT 0 100" - - Plain: "\"BusType\" STRING" - - Node: "\"FOO\" INT 0 100" - - Node: "\"BAR\" STRING" - - Message: "\"VFrameFormat\" ENUM \"StandardCAN\",\"ExtendedCAN\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"StandardCAN_FD\",\"ExtendedCAN_FD\"" - - Message: "\"GenMsgStartValue\" STRING" - - Message: "\"GenMsgCycleTime\" INT 0 1000" + - Plain: + - DBName + - String + - Plain: + - Baudrate + - Int: + - Uint: 0 + - Uint: 1000000 + - Plain: + - AFloat + - Float: + - Uint: 0 + - Uint: 100 + - Plain: + - BusType + - String + - Node: + - FOO + - Int: + - Uint: 0 + - Uint: 100 + - Node: + - BAR + - String + - Message: + - VFrameFormat + - Enum: + - StandardCAN + - ExtendedCAN + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - StandardCAN_FD + - ExtendedCAN_FD + - Message: + - GenMsgStartValue + - String + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 1000 relation_attribute_definitions: - name: AFloat2 value_spec: "\"AFloat2\" FLOAT 0 65535" diff --git a/tests/snapshots/dbc-cantools/issue_163_newline.snap b/tests/snapshots/dbc-cantools/issue_163_newline.snap index 57e9c1b..407dfdf 100644 --- a/tests/snapshots/dbc-cantools/issue_163_newline.snap +++ b/tests/snapshots/dbc-cantools/issue_163_newline.snap @@ -42,13 +42,50 @@ messages: transmitter: NodeName: dummy_node attribute_definitions: - - Signal: "\"GenSigSendType\" ENUM \"Cyclic\",\"OnWrite\",\"OnWriteWithRepetition\",\"OnChange\",\"OnChangeWithRepetition\",\"IfActive\",\"IfActiveWithRepetition\",\"NoSigSendType\"" - - Signal: "\"GenSigInactiveValue\" INT 0 0" - - Message: "\"GenMsgCycleTime\" INT 0 0" - - Message: "\"GenMsgSendType\" ENUM \"Cyclic\",\"not_used\",\"not_used\",\"not_used\",\"not_used\",\"Cyclic\",\"not_used\",\"IfActive\",\"NoMsgSendType\"" - - Node: "\"NmStationAddress\" HEX 0 0" - - Plain: "\"DBName\" STRING" - - Plain: "\"BusType\" STRING" + - Signal: + - GenSigSendType + - Enum: + - Cyclic + - OnWrite + - OnWriteWithRepetition + - OnChange + - OnChangeWithRepetition + - IfActive + - IfActiveWithRepetition + - NoSigSendType + - Signal: + - GenSigInactiveValue + - Int: + - Uint: 0 + - Uint: 0 + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 0 + - Message: + - GenMsgSendType + - Enum: + - Cyclic + - not_used + - not_used + - not_used + - not_used + - Cyclic + - not_used + - IfActive + - NoMsgSendType + - Node: + - NmStationAddress + - Hex: + - Uint: 0 + - Uint: 0 + - Plain: + - DBName + - String + - Plain: + - BusType + - String attribute_defaults: - name: GenSigSendType value: diff --git a/tests/snapshots/dbc-cantools/issue_168.snap b/tests/snapshots/dbc-cantools/issue_168.snap index 6803024..e4213d2 100644 --- a/tests/snapshots/dbc-cantools/issue_168.snap +++ b/tests/snapshots/dbc-cantools/issue_168.snap @@ -1,6 +1,5 @@ --- source: tests/snapshots.rs -assertion_line: 152 --- version: "2.0" new_symbols: @@ -205,15 +204,57 @@ comments: name: Bar comment: Bar. attribute_definitions: - - Plain: "\"DBName\" STRING" - - Plain: "\"Baudrate\" INT 0 1000000" - - Plain: "\"AFloat\" FLOAT 0 100" - - Plain: "\"BusType\" STRING" - - Node: "\"FOO\" INT 0 100" - - Node: "\"BAR\" STRING" - - Message: "\"VFrameFormat\" ENUM \"StandardCAN\",\"ExtendedCAN\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"StandardCAN_FD\",\"ExtendedCAN_FD\"" - - Message: "\"GenMsgStartValue\" STRING" - - Message: "\"GenMsgCycleTime\" INT 0 1000" + - Plain: + - DBName + - String + - Plain: + - Baudrate + - Int: + - Uint: 0 + - Uint: 1000000 + - Plain: + - AFloat + - Float: + - Uint: 0 + - Uint: 100 + - Plain: + - BusType + - String + - Node: + - FOO + - Int: + - Uint: 0 + - Uint: 100 + - Node: + - BAR + - String + - Message: + - VFrameFormat + - Enum: + - StandardCAN + - ExtendedCAN + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - StandardCAN_FD + - ExtendedCAN_FD + - Message: + - GenMsgStartValue + - String + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 1000 relation_attribute_definitions: - name: AFloat2 value_spec: "\"AFloat2\" FLOAT 0 65535" diff --git a/tests/snapshots/dbc-cantools/issue_184_extended_mux_cascaded.snap b/tests/snapshots/dbc-cantools/issue_184_extended_mux_cascaded.snap index 654a7eb..abc6778 100644 --- a/tests/snapshots/dbc-cantools/issue_184_extended_mux_cascaded.snap +++ b/tests/snapshots/dbc-cantools/issue_184_extended_mux_cascaded.snap @@ -109,38 +109,178 @@ messages: receivers: - Vector__XXX attribute_definitions: - - Signal: "\"SigType\" ENUM \"Default\",\"Range\",\"RangeSigned\",\"ASCII\",\"Discrete\",\"Control\",\"ReferencePGN\",\"DTC\",\"StringDelimiter\",\"StringLength\",\"StringLengthControl\"" - - Signal: "\"GenSigEVName\" STRING" - - Signal: "\"GenSigILSupport\" ENUM \"No\",\"Yes\"" - - Signal: "\"GenSigSendType\" ENUM \"Cyclic\",\"OnWrite\",\"OnWriteWithRepetition\",\"OnChange\",\"OnChangeWithRepetition\",\"IfActive\",\"IfActiveWithRepetition\",\"NoSigSendType\"" - - Message: "\"GenMsgFastOnStart\" INT 0 100000" - - Signal: "\"GenSigInactiveValue\" INT 0 0" - - Message: "\"GenMsgCycleTimeFast\" INT 0 3600000" - - Message: "\"GenMsgNrOfRepetition\" INT 0 1000000" - - Signal: "\"GenSigStartValue\" INT 0 10000" - - Message: "\"GenMsgDelayTime\" INT 0 1000" - - Message: "\"GenMsgILSupport\" ENUM \"No\",\"Yes\"" - - Message: "\"GenMsgStartDelayTime\" INT 0 100000" - - Node: "\"NodeLayerModules\" STRING" - - Node: "\"ECU\" STRING" - - Node: "\"NmJ1939SystemInstance\" INT 0 15" - - Node: "\"NmJ1939System\" INT 0 127" - - Node: "\"NmJ1939ManufacturerCode\" INT 0 2047" - - Node: "\"NmJ1939IndustryGroup\" INT 0 7" - - Node: "\"NmJ1939IdentityNumber\" INT 0 2097151" - - Node: "\"NmJ1939FunctionInstance\" INT 0 7" - - Node: "\"NmJ1939Function\" INT 0 255" - - Node: "\"NmJ1939ECUInstance\" INT 0 3" - - Node: "\"NmJ1939AAC\" INT 0 1" - - Node: "\"NmStationAddress\" INT 0 255" - - Message: "\"GenMsgSendType\" ENUM \"cyclic\",\"NotUsed\",\"IfActive\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"noMsgSendType\"" - - Message: "\"GenMsgRequestable\" INT 0 1" - - Message: "\"GenMsgCycleTime\" INT 0 3600000" - - Signal: "\"SPN\" INT 0 524287" - - Plain: "\"DBName\" STRING" - - Plain: "\"BusType\" STRING" - - Plain: "\"ProtocolType\" STRING" - - Message: "\"VFrameFormat\" ENUM \"StandardCAN\",\"ExtendedCAN\",\"reserved\",\"J1939PG\"" + - Signal: + - SigType + - Enum: + - Default + - Range + - RangeSigned + - ASCII + - Discrete + - Control + - ReferencePGN + - DTC + - StringDelimiter + - StringLength + - StringLengthControl + - Signal: + - GenSigEVName + - String + - Signal: + - GenSigILSupport + - Enum: + - "No" + - "Yes" + - Signal: + - GenSigSendType + - Enum: + - Cyclic + - OnWrite + - OnWriteWithRepetition + - OnChange + - OnChangeWithRepetition + - IfActive + - IfActiveWithRepetition + - NoSigSendType + - Message: + - GenMsgFastOnStart + - Int: + - Uint: 0 + - Uint: 100000 + - Signal: + - GenSigInactiveValue + - Int: + - Uint: 0 + - Uint: 0 + - Message: + - GenMsgCycleTimeFast + - Int: + - Uint: 0 + - Uint: 3600000 + - Message: + - GenMsgNrOfRepetition + - Int: + - Uint: 0 + - Uint: 1000000 + - Signal: + - GenSigStartValue + - Int: + - Uint: 0 + - Uint: 10000 + - Message: + - GenMsgDelayTime + - Int: + - Uint: 0 + - Uint: 1000 + - Message: + - GenMsgILSupport + - Enum: + - "No" + - "Yes" + - Message: + - GenMsgStartDelayTime + - Int: + - Uint: 0 + - Uint: 100000 + - Node: + - NodeLayerModules + - String + - Node: + - ECU + - String + - Node: + - NmJ1939SystemInstance + - Int: + - Uint: 0 + - Uint: 15 + - Node: + - NmJ1939System + - Int: + - Uint: 0 + - Uint: 127 + - Node: + - NmJ1939ManufacturerCode + - Int: + - Uint: 0 + - Uint: 2047 + - Node: + - NmJ1939IndustryGroup + - Int: + - Uint: 0 + - Uint: 7 + - Node: + - NmJ1939IdentityNumber + - Int: + - Uint: 0 + - Uint: 2097151 + - Node: + - NmJ1939FunctionInstance + - Int: + - Uint: 0 + - Uint: 7 + - Node: + - NmJ1939Function + - Int: + - Uint: 0 + - Uint: 255 + - Node: + - NmJ1939ECUInstance + - Int: + - Uint: 0 + - Uint: 3 + - Node: + - NmJ1939AAC + - Int: + - Uint: 0 + - Uint: 1 + - Node: + - NmStationAddress + - Int: + - Uint: 0 + - Uint: 255 + - Message: + - GenMsgSendType + - Enum: + - cyclic + - NotUsed + - IfActive + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - noMsgSendType + - Message: + - GenMsgRequestable + - Int: + - Uint: 0 + - Uint: 1 + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 3600000 + - Signal: + - SPN + - Int: + - Uint: 0 + - Uint: 524287 + - Plain: + - DBName + - String + - Plain: + - BusType + - String + - Plain: + - ProtocolType + - String + - Message: + - VFrameFormat + - Enum: + - StandardCAN + - ExtendedCAN + - reserved + - J1939PG attribute_defaults: - name: SigType value: diff --git a/tests/snapshots/dbc-cantools/issue_184_extended_mux_cascaded_dumped.snap b/tests/snapshots/dbc-cantools/issue_184_extended_mux_cascaded_dumped.snap index b51220d..9381911 100644 --- a/tests/snapshots/dbc-cantools/issue_184_extended_mux_cascaded_dumped.snap +++ b/tests/snapshots/dbc-cantools/issue_184_extended_mux_cascaded_dumped.snap @@ -108,38 +108,178 @@ messages: receivers: - Vector__XXX attribute_definitions: - - Signal: "\"SigType\" ENUM \"Default\",\"Range\",\"RangeSigned\",\"ASCII\",\"Discrete\",\"Control\",\"ReferencePGN\",\"DTC\",\"StringDelimiter\",\"StringLength\",\"StringLengthControl\"" - - Signal: "\"GenSigEVName\" STRING" - - Signal: "\"GenSigILSupport\" ENUM \"No\",\"Yes\"" - - Signal: "\"GenSigSendType\" ENUM \"Cyclic\",\"OnWrite\",\"OnWriteWithRepetition\",\"OnChange\",\"OnChangeWithRepetition\",\"IfActive\",\"IfActiveWithRepetition\",\"NoSigSendType\"" - - Message: "\"GenMsgFastOnStart\" INT 0 100000" - - Signal: "\"GenSigInactiveValue\" INT 0 0" - - Message: "\"GenMsgCycleTimeFast\" INT 0 3600000" - - Message: "\"GenMsgNrOfRepetition\" INT 0 1000000" - - Signal: "\"GenSigStartValue\" INT 0 10000" - - Message: "\"GenMsgDelayTime\" INT 0 1000" - - Message: "\"GenMsgILSupport\" ENUM \"No\",\"Yes\"" - - Message: "\"GenMsgStartDelayTime\" INT 0 100000" - - Node: "\"NodeLayerModules\" STRING" - - Node: "\"ECU\" STRING" - - Node: "\"NmJ1939SystemInstance\" INT 0 15" - - Node: "\"NmJ1939System\" INT 0 127" - - Node: "\"NmJ1939ManufacturerCode\" INT 0 2047" - - Node: "\"NmJ1939IndustryGroup\" INT 0 7" - - Node: "\"NmJ1939IdentityNumber\" INT 0 2097151" - - Node: "\"NmJ1939FunctionInstance\" INT 0 7" - - Node: "\"NmJ1939Function\" INT 0 255" - - Node: "\"NmJ1939ECUInstance\" INT 0 3" - - Node: "\"NmJ1939AAC\" INT 0 1" - - Node: "\"NmStationAddress\" INT 0 255" - - Message: "\"GenMsgSendType\" ENUM \"cyclic\",\"NotUsed\",\"IfActive\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"noMsgSendType\"" - - Message: "\"GenMsgRequestable\" INT 0 1" - - Message: "\"GenMsgCycleTime\" INT 0 3600000" - - Signal: "\"SPN\" INT 0 524287" - - Plain: "\"DBName\" STRING" - - Plain: "\"BusType\" STRING" - - Plain: "\"ProtocolType\" STRING" - - Message: "\"VFrameFormat\" ENUM \"StandardCAN\",\"ExtendedCAN\",\"reserved\",\"J1939PG\"" + - Signal: + - SigType + - Enum: + - Default + - Range + - RangeSigned + - ASCII + - Discrete + - Control + - ReferencePGN + - DTC + - StringDelimiter + - StringLength + - StringLengthControl + - Signal: + - GenSigEVName + - String + - Signal: + - GenSigILSupport + - Enum: + - "No" + - "Yes" + - Signal: + - GenSigSendType + - Enum: + - Cyclic + - OnWrite + - OnWriteWithRepetition + - OnChange + - OnChangeWithRepetition + - IfActive + - IfActiveWithRepetition + - NoSigSendType + - Message: + - GenMsgFastOnStart + - Int: + - Uint: 0 + - Uint: 100000 + - Signal: + - GenSigInactiveValue + - Int: + - Uint: 0 + - Uint: 0 + - Message: + - GenMsgCycleTimeFast + - Int: + - Uint: 0 + - Uint: 3600000 + - Message: + - GenMsgNrOfRepetition + - Int: + - Uint: 0 + - Uint: 1000000 + - Signal: + - GenSigStartValue + - Int: + - Uint: 0 + - Uint: 10000 + - Message: + - GenMsgDelayTime + - Int: + - Uint: 0 + - Uint: 1000 + - Message: + - GenMsgILSupport + - Enum: + - "No" + - "Yes" + - Message: + - GenMsgStartDelayTime + - Int: + - Uint: 0 + - Uint: 100000 + - Node: + - NodeLayerModules + - String + - Node: + - ECU + - String + - Node: + - NmJ1939SystemInstance + - Int: + - Uint: 0 + - Uint: 15 + - Node: + - NmJ1939System + - Int: + - Uint: 0 + - Uint: 127 + - Node: + - NmJ1939ManufacturerCode + - Int: + - Uint: 0 + - Uint: 2047 + - Node: + - NmJ1939IndustryGroup + - Int: + - Uint: 0 + - Uint: 7 + - Node: + - NmJ1939IdentityNumber + - Int: + - Uint: 0 + - Uint: 2097151 + - Node: + - NmJ1939FunctionInstance + - Int: + - Uint: 0 + - Uint: 7 + - Node: + - NmJ1939Function + - Int: + - Uint: 0 + - Uint: 255 + - Node: + - NmJ1939ECUInstance + - Int: + - Uint: 0 + - Uint: 3 + - Node: + - NmJ1939AAC + - Int: + - Uint: 0 + - Uint: 1 + - Node: + - NmStationAddress + - Int: + - Uint: 0 + - Uint: 255 + - Message: + - GenMsgSendType + - Enum: + - cyclic + - NotUsed + - IfActive + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - noMsgSendType + - Message: + - GenMsgRequestable + - Int: + - Uint: 0 + - Uint: 1 + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 3600000 + - Signal: + - SPN + - Int: + - Uint: 0 + - Uint: 524287 + - Plain: + - DBName + - String + - Plain: + - BusType + - String + - Plain: + - ProtocolType + - String + - Message: + - VFrameFormat + - Enum: + - StandardCAN + - ExtendedCAN + - reserved + - J1939PG attribute_defaults: - name: SigType value: diff --git a/tests/snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors.snap b/tests/snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors.snap index 01a659a..b9a7abb 100644 --- a/tests/snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors.snap +++ b/tests/snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors.snap @@ -122,38 +122,178 @@ messages: receivers: - Vector__XXX attribute_definitions: - - Signal: "\"SigType\" ENUM \"Default\",\"Range\",\"RangeSigned\",\"ASCII\",\"Discrete\",\"Control\",\"ReferencePGN\",\"DTC\",\"StringDelimiter\",\"StringLength\",\"StringLengthControl\"" - - Signal: "\"GenSigEVName\" STRING" - - Signal: "\"GenSigILSupport\" ENUM \"No\",\"Yes\"" - - Signal: "\"GenSigSendType\" ENUM \"Cyclic\",\"OnWrite\",\"OnWriteWithRepetition\",\"OnChange\",\"OnChangeWithRepetition\",\"IfActive\",\"IfActiveWithRepetition\",\"NoSigSendType\"" - - Message: "\"GenMsgFastOnStart\" INT 0 100000" - - Signal: "\"GenSigInactiveValue\" INT 0 0" - - Message: "\"GenMsgCycleTimeFast\" INT 0 3600000" - - Message: "\"GenMsgNrOfRepetition\" INT 0 1000000" - - Signal: "\"GenSigStartValue\" INT 0 10000" - - Message: "\"GenMsgDelayTime\" INT 0 1000" - - Message: "\"GenMsgILSupport\" ENUM \"No\",\"Yes\"" - - Message: "\"GenMsgStartDelayTime\" INT 0 100000" - - Node: "\"NodeLayerModules\" STRING" - - Node: "\"ECU\" STRING" - - Node: "\"NmJ1939SystemInstance\" INT 0 15" - - Node: "\"NmJ1939System\" INT 0 127" - - Node: "\"NmJ1939ManufacturerCode\" INT 0 2047" - - Node: "\"NmJ1939IndustryGroup\" INT 0 7" - - Node: "\"NmJ1939IdentityNumber\" INT 0 2097151" - - Node: "\"NmJ1939FunctionInstance\" INT 0 7" - - Node: "\"NmJ1939Function\" INT 0 255" - - Node: "\"NmJ1939ECUInstance\" INT 0 3" - - Node: "\"NmJ1939AAC\" INT 0 1" - - Node: "\"NmStationAddress\" INT 0 255" - - Message: "\"GenMsgSendType\" ENUM \"cyclic\",\"NotUsed\",\"IfActive\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"noMsgSendType\"" - - Message: "\"GenMsgRequestable\" INT 0 1" - - Message: "\"GenMsgCycleTime\" INT 0 3600000" - - Signal: "\"SPN\" INT 0 524287" - - Plain: "\"DBName\" STRING" - - Plain: "\"BusType\" STRING" - - Plain: "\"ProtocolType\" STRING" - - Message: "\"VFrameFormat\" ENUM \"StandardCAN\",\"ExtendedCAN\",\"reserved\",\"J1939PG\"" + - Signal: + - SigType + - Enum: + - Default + - Range + - RangeSigned + - ASCII + - Discrete + - Control + - ReferencePGN + - DTC + - StringDelimiter + - StringLength + - StringLengthControl + - Signal: + - GenSigEVName + - String + - Signal: + - GenSigILSupport + - Enum: + - "No" + - "Yes" + - Signal: + - GenSigSendType + - Enum: + - Cyclic + - OnWrite + - OnWriteWithRepetition + - OnChange + - OnChangeWithRepetition + - IfActive + - IfActiveWithRepetition + - NoSigSendType + - Message: + - GenMsgFastOnStart + - Int: + - Uint: 0 + - Uint: 100000 + - Signal: + - GenSigInactiveValue + - Int: + - Uint: 0 + - Uint: 0 + - Message: + - GenMsgCycleTimeFast + - Int: + - Uint: 0 + - Uint: 3600000 + - Message: + - GenMsgNrOfRepetition + - Int: + - Uint: 0 + - Uint: 1000000 + - Signal: + - GenSigStartValue + - Int: + - Uint: 0 + - Uint: 10000 + - Message: + - GenMsgDelayTime + - Int: + - Uint: 0 + - Uint: 1000 + - Message: + - GenMsgILSupport + - Enum: + - "No" + - "Yes" + - Message: + - GenMsgStartDelayTime + - Int: + - Uint: 0 + - Uint: 100000 + - Node: + - NodeLayerModules + - String + - Node: + - ECU + - String + - Node: + - NmJ1939SystemInstance + - Int: + - Uint: 0 + - Uint: 15 + - Node: + - NmJ1939System + - Int: + - Uint: 0 + - Uint: 127 + - Node: + - NmJ1939ManufacturerCode + - Int: + - Uint: 0 + - Uint: 2047 + - Node: + - NmJ1939IndustryGroup + - Int: + - Uint: 0 + - Uint: 7 + - Node: + - NmJ1939IdentityNumber + - Int: + - Uint: 0 + - Uint: 2097151 + - Node: + - NmJ1939FunctionInstance + - Int: + - Uint: 0 + - Uint: 7 + - Node: + - NmJ1939Function + - Int: + - Uint: 0 + - Uint: 255 + - Node: + - NmJ1939ECUInstance + - Int: + - Uint: 0 + - Uint: 3 + - Node: + - NmJ1939AAC + - Int: + - Uint: 0 + - Uint: 1 + - Node: + - NmStationAddress + - Int: + - Uint: 0 + - Uint: 255 + - Message: + - GenMsgSendType + - Enum: + - cyclic + - NotUsed + - IfActive + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - noMsgSendType + - Message: + - GenMsgRequestable + - Int: + - Uint: 0 + - Uint: 1 + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 3600000 + - Signal: + - SPN + - Int: + - Uint: 0 + - Uint: 524287 + - Plain: + - DBName + - String + - Plain: + - BusType + - String + - Plain: + - ProtocolType + - String + - Message: + - VFrameFormat + - Enum: + - StandardCAN + - ExtendedCAN + - reserved + - J1939PG attribute_defaults: - name: SigType value: diff --git a/tests/snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors_dumped.snap b/tests/snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors_dumped.snap index eaa6b1f..70bd121 100644 --- a/tests/snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors_dumped.snap +++ b/tests/snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors_dumped.snap @@ -122,38 +122,178 @@ messages: receivers: - Vector__XXX attribute_definitions: - - Signal: "\"SigType\" ENUM \"Default\",\"Range\",\"RangeSigned\",\"ASCII\",\"Discrete\",\"Control\",\"ReferencePGN\",\"DTC\",\"StringDelimiter\",\"StringLength\",\"StringLengthControl\"" - - Signal: "\"GenSigEVName\" STRING" - - Signal: "\"GenSigILSupport\" ENUM \"No\",\"Yes\"" - - Signal: "\"GenSigSendType\" ENUM \"Cyclic\",\"OnWrite\",\"OnWriteWithRepetition\",\"OnChange\",\"OnChangeWithRepetition\",\"IfActive\",\"IfActiveWithRepetition\",\"NoSigSendType\"" - - Message: "\"GenMsgFastOnStart\" INT 0 100000" - - Signal: "\"GenSigInactiveValue\" INT 0 0" - - Message: "\"GenMsgCycleTimeFast\" INT 0 3600000" - - Message: "\"GenMsgNrOfRepetition\" INT 0 1000000" - - Signal: "\"GenSigStartValue\" INT 0 10000" - - Message: "\"GenMsgDelayTime\" INT 0 1000" - - Message: "\"GenMsgILSupport\" ENUM \"No\",\"Yes\"" - - Message: "\"GenMsgStartDelayTime\" INT 0 100000" - - Node: "\"NodeLayerModules\" STRING" - - Node: "\"ECU\" STRING" - - Node: "\"NmJ1939SystemInstance\" INT 0 15" - - Node: "\"NmJ1939System\" INT 0 127" - - Node: "\"NmJ1939ManufacturerCode\" INT 0 2047" - - Node: "\"NmJ1939IndustryGroup\" INT 0 7" - - Node: "\"NmJ1939IdentityNumber\" INT 0 2097151" - - Node: "\"NmJ1939FunctionInstance\" INT 0 7" - - Node: "\"NmJ1939Function\" INT 0 255" - - Node: "\"NmJ1939ECUInstance\" INT 0 3" - - Node: "\"NmJ1939AAC\" INT 0 1" - - Node: "\"NmStationAddress\" INT 0 255" - - Message: "\"GenMsgSendType\" ENUM \"cyclic\",\"NotUsed\",\"IfActive\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"noMsgSendType\"" - - Message: "\"GenMsgRequestable\" INT 0 1" - - Message: "\"GenMsgCycleTime\" INT 0 3600000" - - Signal: "\"SPN\" INT 0 524287" - - Plain: "\"DBName\" STRING" - - Plain: "\"BusType\" STRING" - - Plain: "\"ProtocolType\" STRING" - - Message: "\"VFrameFormat\" ENUM \"StandardCAN\",\"ExtendedCAN\",\"reserved\",\"J1939PG\"" + - Signal: + - SigType + - Enum: + - Default + - Range + - RangeSigned + - ASCII + - Discrete + - Control + - ReferencePGN + - DTC + - StringDelimiter + - StringLength + - StringLengthControl + - Signal: + - GenSigEVName + - String + - Signal: + - GenSigILSupport + - Enum: + - "No" + - "Yes" + - Signal: + - GenSigSendType + - Enum: + - Cyclic + - OnWrite + - OnWriteWithRepetition + - OnChange + - OnChangeWithRepetition + - IfActive + - IfActiveWithRepetition + - NoSigSendType + - Message: + - GenMsgFastOnStart + - Int: + - Uint: 0 + - Uint: 100000 + - Signal: + - GenSigInactiveValue + - Int: + - Uint: 0 + - Uint: 0 + - Message: + - GenMsgCycleTimeFast + - Int: + - Uint: 0 + - Uint: 3600000 + - Message: + - GenMsgNrOfRepetition + - Int: + - Uint: 0 + - Uint: 1000000 + - Signal: + - GenSigStartValue + - Int: + - Uint: 0 + - Uint: 10000 + - Message: + - GenMsgDelayTime + - Int: + - Uint: 0 + - Uint: 1000 + - Message: + - GenMsgILSupport + - Enum: + - "No" + - "Yes" + - Message: + - GenMsgStartDelayTime + - Int: + - Uint: 0 + - Uint: 100000 + - Node: + - NodeLayerModules + - String + - Node: + - ECU + - String + - Node: + - NmJ1939SystemInstance + - Int: + - Uint: 0 + - Uint: 15 + - Node: + - NmJ1939System + - Int: + - Uint: 0 + - Uint: 127 + - Node: + - NmJ1939ManufacturerCode + - Int: + - Uint: 0 + - Uint: 2047 + - Node: + - NmJ1939IndustryGroup + - Int: + - Uint: 0 + - Uint: 7 + - Node: + - NmJ1939IdentityNumber + - Int: + - Uint: 0 + - Uint: 2097151 + - Node: + - NmJ1939FunctionInstance + - Int: + - Uint: 0 + - Uint: 7 + - Node: + - NmJ1939Function + - Int: + - Uint: 0 + - Uint: 255 + - Node: + - NmJ1939ECUInstance + - Int: + - Uint: 0 + - Uint: 3 + - Node: + - NmJ1939AAC + - Int: + - Uint: 0 + - Uint: 1 + - Node: + - NmStationAddress + - Int: + - Uint: 0 + - Uint: 255 + - Message: + - GenMsgSendType + - Enum: + - cyclic + - NotUsed + - IfActive + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - noMsgSendType + - Message: + - GenMsgRequestable + - Int: + - Uint: 0 + - Uint: 1 + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 3600000 + - Signal: + - SPN + - Int: + - Uint: 0 + - Uint: 524287 + - Plain: + - DBName + - String + - Plain: + - BusType + - String + - Plain: + - ProtocolType + - String + - Message: + - VFrameFormat + - Enum: + - StandardCAN + - ExtendedCAN + - reserved + - J1939PG attribute_defaults: - name: SigType value: diff --git a/tests/snapshots/dbc-cantools/issue_184_extended_mux_multiple_values.snap b/tests/snapshots/dbc-cantools/issue_184_extended_mux_multiple_values.snap index edaf06a..18c10f8 100644 --- a/tests/snapshots/dbc-cantools/issue_184_extended_mux_multiple_values.snap +++ b/tests/snapshots/dbc-cantools/issue_184_extended_mux_multiple_values.snap @@ -95,38 +95,178 @@ messages: receivers: - Vector__XXX attribute_definitions: - - Signal: "\"SigType\" ENUM \"Default\",\"Range\",\"RangeSigned\",\"ASCII\",\"Discrete\",\"Control\",\"ReferencePGN\",\"DTC\",\"StringDelimiter\",\"StringLength\",\"StringLengthControl\"" - - Signal: "\"GenSigEVName\" STRING" - - Signal: "\"GenSigILSupport\" ENUM \"No\",\"Yes\"" - - Signal: "\"GenSigSendType\" ENUM \"Cyclic\",\"OnWrite\",\"OnWriteWithRepetition\",\"OnChange\",\"OnChangeWithRepetition\",\"IfActive\",\"IfActiveWithRepetition\",\"NoSigSendType\"" - - Message: "\"GenMsgFastOnStart\" INT 0 100000" - - Signal: "\"GenSigInactiveValue\" INT 0 0" - - Message: "\"GenMsgCycleTimeFast\" INT 0 3600000" - - Message: "\"GenMsgNrOfRepetition\" INT 0 1000000" - - Signal: "\"GenSigStartValue\" INT 0 10000" - - Message: "\"GenMsgDelayTime\" INT 0 1000" - - Message: "\"GenMsgILSupport\" ENUM \"No\",\"Yes\"" - - Message: "\"GenMsgStartDelayTime\" INT 0 100000" - - Node: "\"NodeLayerModules\" STRING" - - Node: "\"ECU\" STRING" - - Node: "\"NmJ1939SystemInstance\" INT 0 15" - - Node: "\"NmJ1939System\" INT 0 127" - - Node: "\"NmJ1939ManufacturerCode\" INT 0 2047" - - Node: "\"NmJ1939IndustryGroup\" INT 0 7" - - Node: "\"NmJ1939IdentityNumber\" INT 0 2097151" - - Node: "\"NmJ1939FunctionInstance\" INT 0 7" - - Node: "\"NmJ1939Function\" INT 0 255" - - Node: "\"NmJ1939ECUInstance\" INT 0 3" - - Node: "\"NmJ1939AAC\" INT 0 1" - - Node: "\"NmStationAddress\" INT 0 255" - - Message: "\"GenMsgSendType\" ENUM \"cyclic\",\"NotUsed\",\"IfActive\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"noMsgSendType\"" - - Message: "\"GenMsgRequestable\" INT 0 1" - - Message: "\"GenMsgCycleTime\" INT 0 3600000" - - Signal: "\"SPN\" INT 0 524287" - - Plain: "\"DBName\" STRING" - - Plain: "\"BusType\" STRING" - - Plain: "\"ProtocolType\" STRING" - - Message: "\"VFrameFormat\" ENUM \"StandardCAN\",\"ExtendedCAN\",\"reserved\",\"J1939PG\"" + - Signal: + - SigType + - Enum: + - Default + - Range + - RangeSigned + - ASCII + - Discrete + - Control + - ReferencePGN + - DTC + - StringDelimiter + - StringLength + - StringLengthControl + - Signal: + - GenSigEVName + - String + - Signal: + - GenSigILSupport + - Enum: + - "No" + - "Yes" + - Signal: + - GenSigSendType + - Enum: + - Cyclic + - OnWrite + - OnWriteWithRepetition + - OnChange + - OnChangeWithRepetition + - IfActive + - IfActiveWithRepetition + - NoSigSendType + - Message: + - GenMsgFastOnStart + - Int: + - Uint: 0 + - Uint: 100000 + - Signal: + - GenSigInactiveValue + - Int: + - Uint: 0 + - Uint: 0 + - Message: + - GenMsgCycleTimeFast + - Int: + - Uint: 0 + - Uint: 3600000 + - Message: + - GenMsgNrOfRepetition + - Int: + - Uint: 0 + - Uint: 1000000 + - Signal: + - GenSigStartValue + - Int: + - Uint: 0 + - Uint: 10000 + - Message: + - GenMsgDelayTime + - Int: + - Uint: 0 + - Uint: 1000 + - Message: + - GenMsgILSupport + - Enum: + - "No" + - "Yes" + - Message: + - GenMsgStartDelayTime + - Int: + - Uint: 0 + - Uint: 100000 + - Node: + - NodeLayerModules + - String + - Node: + - ECU + - String + - Node: + - NmJ1939SystemInstance + - Int: + - Uint: 0 + - Uint: 15 + - Node: + - NmJ1939System + - Int: + - Uint: 0 + - Uint: 127 + - Node: + - NmJ1939ManufacturerCode + - Int: + - Uint: 0 + - Uint: 2047 + - Node: + - NmJ1939IndustryGroup + - Int: + - Uint: 0 + - Uint: 7 + - Node: + - NmJ1939IdentityNumber + - Int: + - Uint: 0 + - Uint: 2097151 + - Node: + - NmJ1939FunctionInstance + - Int: + - Uint: 0 + - Uint: 7 + - Node: + - NmJ1939Function + - Int: + - Uint: 0 + - Uint: 255 + - Node: + - NmJ1939ECUInstance + - Int: + - Uint: 0 + - Uint: 3 + - Node: + - NmJ1939AAC + - Int: + - Uint: 0 + - Uint: 1 + - Node: + - NmStationAddress + - Int: + - Uint: 0 + - Uint: 255 + - Message: + - GenMsgSendType + - Enum: + - cyclic + - NotUsed + - IfActive + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - noMsgSendType + - Message: + - GenMsgRequestable + - Int: + - Uint: 0 + - Uint: 1 + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 3600000 + - Signal: + - SPN + - Int: + - Uint: 0 + - Uint: 524287 + - Plain: + - DBName + - String + - Plain: + - BusType + - String + - Plain: + - ProtocolType + - String + - Message: + - VFrameFormat + - Enum: + - StandardCAN + - ExtendedCAN + - reserved + - J1939PG attribute_defaults: - name: SigType value: diff --git a/tests/snapshots/dbc-cantools/issue_184_extended_mux_multiple_values_dumped.snap b/tests/snapshots/dbc-cantools/issue_184_extended_mux_multiple_values_dumped.snap index 8bda0c8..974352e 100644 --- a/tests/snapshots/dbc-cantools/issue_184_extended_mux_multiple_values_dumped.snap +++ b/tests/snapshots/dbc-cantools/issue_184_extended_mux_multiple_values_dumped.snap @@ -95,38 +95,178 @@ messages: receivers: - Vector__XXX attribute_definitions: - - Signal: "\"SigType\" ENUM \"Default\",\"Range\",\"RangeSigned\",\"ASCII\",\"Discrete\",\"Control\",\"ReferencePGN\",\"DTC\",\"StringDelimiter\",\"StringLength\",\"StringLengthControl\"" - - Signal: "\"GenSigEVName\" STRING" - - Signal: "\"GenSigILSupport\" ENUM \"No\",\"Yes\"" - - Signal: "\"GenSigSendType\" ENUM \"Cyclic\",\"OnWrite\",\"OnWriteWithRepetition\",\"OnChange\",\"OnChangeWithRepetition\",\"IfActive\",\"IfActiveWithRepetition\",\"NoSigSendType\"" - - Message: "\"GenMsgFastOnStart\" INT 0 100000" - - Signal: "\"GenSigInactiveValue\" INT 0 0" - - Message: "\"GenMsgCycleTimeFast\" INT 0 3600000" - - Message: "\"GenMsgNrOfRepetition\" INT 0 1000000" - - Signal: "\"GenSigStartValue\" INT 0 10000" - - Message: "\"GenMsgDelayTime\" INT 0 1000" - - Message: "\"GenMsgILSupport\" ENUM \"No\",\"Yes\"" - - Message: "\"GenMsgStartDelayTime\" INT 0 100000" - - Node: "\"NodeLayerModules\" STRING" - - Node: "\"ECU\" STRING" - - Node: "\"NmJ1939SystemInstance\" INT 0 15" - - Node: "\"NmJ1939System\" INT 0 127" - - Node: "\"NmJ1939ManufacturerCode\" INT 0 2047" - - Node: "\"NmJ1939IndustryGroup\" INT 0 7" - - Node: "\"NmJ1939IdentityNumber\" INT 0 2097151" - - Node: "\"NmJ1939FunctionInstance\" INT 0 7" - - Node: "\"NmJ1939Function\" INT 0 255" - - Node: "\"NmJ1939ECUInstance\" INT 0 3" - - Node: "\"NmJ1939AAC\" INT 0 1" - - Node: "\"NmStationAddress\" INT 0 255" - - Message: "\"GenMsgSendType\" ENUM \"cyclic\",\"NotUsed\",\"IfActive\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"noMsgSendType\"" - - Message: "\"GenMsgRequestable\" INT 0 1" - - Message: "\"GenMsgCycleTime\" INT 0 3600000" - - Signal: "\"SPN\" INT 0 524287" - - Plain: "\"DBName\" STRING" - - Plain: "\"BusType\" STRING" - - Plain: "\"ProtocolType\" STRING" - - Message: "\"VFrameFormat\" ENUM \"StandardCAN\",\"ExtendedCAN\",\"reserved\",\"J1939PG\"" + - Signal: + - SigType + - Enum: + - Default + - Range + - RangeSigned + - ASCII + - Discrete + - Control + - ReferencePGN + - DTC + - StringDelimiter + - StringLength + - StringLengthControl + - Signal: + - GenSigEVName + - String + - Signal: + - GenSigILSupport + - Enum: + - "No" + - "Yes" + - Signal: + - GenSigSendType + - Enum: + - Cyclic + - OnWrite + - OnWriteWithRepetition + - OnChange + - OnChangeWithRepetition + - IfActive + - IfActiveWithRepetition + - NoSigSendType + - Message: + - GenMsgFastOnStart + - Int: + - Uint: 0 + - Uint: 100000 + - Signal: + - GenSigInactiveValue + - Int: + - Uint: 0 + - Uint: 0 + - Message: + - GenMsgCycleTimeFast + - Int: + - Uint: 0 + - Uint: 3600000 + - Message: + - GenMsgNrOfRepetition + - Int: + - Uint: 0 + - Uint: 1000000 + - Signal: + - GenSigStartValue + - Int: + - Uint: 0 + - Uint: 10000 + - Message: + - GenMsgDelayTime + - Int: + - Uint: 0 + - Uint: 1000 + - Message: + - GenMsgILSupport + - Enum: + - "No" + - "Yes" + - Message: + - GenMsgStartDelayTime + - Int: + - Uint: 0 + - Uint: 100000 + - Node: + - NodeLayerModules + - String + - Node: + - ECU + - String + - Node: + - NmJ1939SystemInstance + - Int: + - Uint: 0 + - Uint: 15 + - Node: + - NmJ1939System + - Int: + - Uint: 0 + - Uint: 127 + - Node: + - NmJ1939ManufacturerCode + - Int: + - Uint: 0 + - Uint: 2047 + - Node: + - NmJ1939IndustryGroup + - Int: + - Uint: 0 + - Uint: 7 + - Node: + - NmJ1939IdentityNumber + - Int: + - Uint: 0 + - Uint: 2097151 + - Node: + - NmJ1939FunctionInstance + - Int: + - Uint: 0 + - Uint: 7 + - Node: + - NmJ1939Function + - Int: + - Uint: 0 + - Uint: 255 + - Node: + - NmJ1939ECUInstance + - Int: + - Uint: 0 + - Uint: 3 + - Node: + - NmJ1939AAC + - Int: + - Uint: 0 + - Uint: 1 + - Node: + - NmStationAddress + - Int: + - Uint: 0 + - Uint: 255 + - Message: + - GenMsgSendType + - Enum: + - cyclic + - NotUsed + - IfActive + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - noMsgSendType + - Message: + - GenMsgRequestable + - Int: + - Uint: 0 + - Uint: 1 + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 3600000 + - Signal: + - SPN + - Int: + - Uint: 0 + - Uint: 524287 + - Plain: + - DBName + - String + - Plain: + - BusType + - String + - Plain: + - ProtocolType + - String + - Message: + - VFrameFormat + - Enum: + - StandardCAN + - ExtendedCAN + - reserved + - J1939PG attribute_defaults: - name: SigType value: diff --git a/tests/snapshots/dbc-cantools/issue_199.snap b/tests/snapshots/dbc-cantools/issue_199.snap index cbdffc8..1b8c7da 100644 --- a/tests/snapshots/dbc-cantools/issue_199.snap +++ b/tests/snapshots/dbc-cantools/issue_199.snap @@ -1,6 +1,5 @@ --- source: tests/snapshots.rs -assertion_line: 143 --- version: "" new_symbols: @@ -488,9 +487,17 @@ messages: receivers: - NEO attribute_definitions: - - Plain: "\"UseGMParameterIDs\" INT 0 0" - - Plain: "\"ProtocolType\" STRING" - - Plain: "\"BusType\" STRING" + - Plain: + - UseGMParameterIDs + - Int: + - Uint: 0 + - Uint: 0 + - Plain: + - ProtocolType + - String + - Plain: + - BusType + - String attribute_defaults: - name: UseGMParameterIDs value: diff --git a/tests/snapshots/dbc-cantools/issue_199_extended.snap b/tests/snapshots/dbc-cantools/issue_199_extended.snap index 0d875a9..75e612e 100644 --- a/tests/snapshots/dbc-cantools/issue_199_extended.snap +++ b/tests/snapshots/dbc-cantools/issue_199_extended.snap @@ -1,6 +1,5 @@ --- source: tests/snapshots.rs -assertion_line: 143 --- version: "" new_symbols: @@ -488,9 +487,17 @@ messages: receivers: - NEO attribute_definitions: - - Plain: "\"UseGMParameterIDs\" INT 0 0" - - Plain: "\"ProtocolType\" STRING" - - Plain: "\"BusType\" STRING" + - Plain: + - UseGMParameterIDs + - Int: + - Uint: 0 + - Uint: 0 + - Plain: + - ProtocolType + - String + - Plain: + - BusType + - String attribute_defaults: - name: UseGMParameterIDs value: diff --git a/tests/snapshots/dbc-cantools/issue_207_sig_plus.snap b/tests/snapshots/dbc-cantools/issue_207_sig_plus.snap index b865a34..40a175a 100644 --- a/tests/snapshots/dbc-cantools/issue_207_sig_plus.snap +++ b/tests/snapshots/dbc-cantools/issue_207_sig_plus.snap @@ -66,7 +66,9 @@ messages: receivers: - Vector__XXX attribute_definitions: - - Plain: "\"BusType\" STRING" + - Plain: + - BusType + - String attribute_defaults: - name: BusType value: diff --git a/tests/snapshots/dbc-cantools/issue_228.snap b/tests/snapshots/dbc-cantools/issue_228.snap index 00329a6..ef286b9 100644 --- a/tests/snapshots/dbc-cantools/issue_228.snap +++ b/tests/snapshots/dbc-cantools/issue_228.snap @@ -113,7 +113,9 @@ messages: receivers: - Vector__XXX attribute_definitions: - - Plain: "\"BusType\" STRING" + - Plain: + - BusType + - String attribute_defaults: - name: BusType value: diff --git a/tests/snapshots/dbc-cantools/issue_636_negative_scaling.snap b/tests/snapshots/dbc-cantools/issue_636_negative_scaling.snap index 1a7adb7..e8691c2 100644 --- a/tests/snapshots/dbc-cantools/issue_636_negative_scaling.snap +++ b/tests/snapshots/dbc-cantools/issue_636_negative_scaling.snap @@ -70,8 +70,16 @@ comments: Standard: 496 comment: Example message attribute_definitions: - - Signal: "\"GenSigStartValue\" INT -2147483648 2147483647" - - Message: "\"GenMsgCycleTime\" INT 0 65535" + - Signal: + - GenSigStartValue + - Int: + - Int: -2147483648 + - Uint: 2147483647 + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 65535 attribute_defaults: - name: GenSigStartValue value: diff --git a/tests/snapshots/dbc-cantools/issue_725.snap b/tests/snapshots/dbc-cantools/issue_725.snap index 4170a52..ad51b8e 100644 --- a/tests/snapshots/dbc-cantools/issue_725.snap +++ b/tests/snapshots/dbc-cantools/issue_725.snap @@ -57,10 +57,22 @@ messages: receivers: - Node2 attribute_definitions: - - Plain: "\"MultiplexExtEnabled\" ENUM \"No\",\"Yes\"" - - Plain: "\"BusType\" STRING" - - Plain: "\"DBName\" STRING" - - Signal: "\"GenSigStartValue\" INT -2147483648 2147483647" + - Plain: + - MultiplexExtEnabled + - Enum: + - "No" + - "Yes" + - Plain: + - BusType + - String + - Plain: + - DBName + - String + - Signal: + - GenSigStartValue + - Int: + - Int: -2147483648 + - Uint: 2147483647 attribute_defaults: - name: MultiplexExtEnabled value: diff --git a/tests/snapshots/dbc-cantools/j1939.snap b/tests/snapshots/dbc-cantools/j1939.snap index 3babb50..43ead0d 100644 --- a/tests/snapshots/dbc-cantools/j1939.snap +++ b/tests/snapshots/dbc-cantools/j1939.snap @@ -77,39 +77,185 @@ messages: receivers: - Node1 attribute_definitions: - - Message: "\"TpJ1939VarDlc\" ENUM \"No\",\"Yes\"" - - Signal: "\"SigType\" ENUM \"Default\",\"Range\",\"RangeSigned\",\"ASCII\",\"Discrete\",\"Control\",\"ReferencePGN\",\"DTC\",\"StringDelimiter\",\"StringLength\",\"StringLengthControl\",\"MessageCounter\",\"MessageChecksum\"" - - Signal: "\"GenSigEVName\" STRING" - - Signal: "\"GenSigILSupport\" ENUM \"No\",\"Yes\"" - - Signal: "\"GenSigSendType\" ENUM \"Cyclic\",\"OnWrite\",\"OnWriteWithRepetition\",\"OnChange\",\"OnChangeWithRepetition\",\"IfActive\",\"IfActiveWithRepetition\",\"NoSigSendType\"" - - Message: "\"GenMsgFastOnStart\" INT 0 100000" - - Signal: "\"GenSigInactiveValue\" INT 0 0" - - Message: "\"GenMsgCycleTimeFast\" INT 0 3600000" - - Message: "\"GenMsgNrOfRepetition\" INT 0 1000000" - - Signal: "\"GenSigStartValue\" INT 0 2147483647" - - Message: "\"GenMsgDelayTime\" INT 0 1000" - - Message: "\"GenMsgILSupport\" ENUM \"No\",\"Yes\"" - - Message: "\"GenMsgStartDelayTime\" INT 0 100000" - - Node: "\"NodeLayerModules\" STRING" - - Node: "\"ECU\" STRING" - - Node: "\"NmJ1939SystemInstance\" INT 0 15" - - Node: "\"NmJ1939System\" INT 0 127" - - Node: "\"NmJ1939ManufacturerCode\" INT 0 2047" - - Node: "\"NmJ1939IndustryGroup\" INT 0 7" - - Node: "\"NmJ1939IdentityNumber\" INT 0 2097151" - - Node: "\"NmJ1939FunctionInstance\" INT 0 7" - - Node: "\"NmJ1939Function\" INT 0 255" - - Node: "\"NmJ1939ECUInstance\" INT 0 3" - - Node: "\"NmJ1939AAC\" INT 0 1" - - Node: "\"NmStationAddress\" INT 0 255" - - Message: "\"GenMsgSendType\" ENUM \"cyclic\",\"NotUsed\",\"IfActive\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"noMsgSendType\"" - - Message: "\"GenMsgRequestable\" INT 0 1" - - Message: "\"GenMsgCycleTime\" INT 0 3600000" - - Signal: "\"SPN\" INT 0 524287" - - Plain: "\"DBName\" STRING" - - Plain: "\"BusType\" STRING" - - Plain: "\"ProtocolType\" STRING" - - Message: "\"VFrameFormat\" ENUM \"StandardCAN\",\"ExtendedCAN\",\"reserved\",\"J1939PG\"" + - Message: + - TpJ1939VarDlc + - Enum: + - "No" + - "Yes" + - Signal: + - SigType + - Enum: + - Default + - Range + - RangeSigned + - ASCII + - Discrete + - Control + - ReferencePGN + - DTC + - StringDelimiter + - StringLength + - StringLengthControl + - MessageCounter + - MessageChecksum + - Signal: + - GenSigEVName + - String + - Signal: + - GenSigILSupport + - Enum: + - "No" + - "Yes" + - Signal: + - GenSigSendType + - Enum: + - Cyclic + - OnWrite + - OnWriteWithRepetition + - OnChange + - OnChangeWithRepetition + - IfActive + - IfActiveWithRepetition + - NoSigSendType + - Message: + - GenMsgFastOnStart + - Int: + - Uint: 0 + - Uint: 100000 + - Signal: + - GenSigInactiveValue + - Int: + - Uint: 0 + - Uint: 0 + - Message: + - GenMsgCycleTimeFast + - Int: + - Uint: 0 + - Uint: 3600000 + - Message: + - GenMsgNrOfRepetition + - Int: + - Uint: 0 + - Uint: 1000000 + - Signal: + - GenSigStartValue + - Int: + - Uint: 0 + - Uint: 2147483647 + - Message: + - GenMsgDelayTime + - Int: + - Uint: 0 + - Uint: 1000 + - Message: + - GenMsgILSupport + - Enum: + - "No" + - "Yes" + - Message: + - GenMsgStartDelayTime + - Int: + - Uint: 0 + - Uint: 100000 + - Node: + - NodeLayerModules + - String + - Node: + - ECU + - String + - Node: + - NmJ1939SystemInstance + - Int: + - Uint: 0 + - Uint: 15 + - Node: + - NmJ1939System + - Int: + - Uint: 0 + - Uint: 127 + - Node: + - NmJ1939ManufacturerCode + - Int: + - Uint: 0 + - Uint: 2047 + - Node: + - NmJ1939IndustryGroup + - Int: + - Uint: 0 + - Uint: 7 + - Node: + - NmJ1939IdentityNumber + - Int: + - Uint: 0 + - Uint: 2097151 + - Node: + - NmJ1939FunctionInstance + - Int: + - Uint: 0 + - Uint: 7 + - Node: + - NmJ1939Function + - Int: + - Uint: 0 + - Uint: 255 + - Node: + - NmJ1939ECUInstance + - Int: + - Uint: 0 + - Uint: 3 + - Node: + - NmJ1939AAC + - Int: + - Uint: 0 + - Uint: 1 + - Node: + - NmStationAddress + - Int: + - Uint: 0 + - Uint: 255 + - Message: + - GenMsgSendType + - Enum: + - cyclic + - NotUsed + - IfActive + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - noMsgSendType + - Message: + - GenMsgRequestable + - Int: + - Uint: 0 + - Uint: 1 + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 3600000 + - Signal: + - SPN + - Int: + - Uint: 0 + - Uint: 524287 + - Plain: + - DBName + - String + - Plain: + - BusType + - String + - Plain: + - ProtocolType + - String + - Message: + - VFrameFormat + - Enum: + - StandardCAN + - ExtendedCAN + - reserved + - J1939PG attribute_defaults: - name: TpJ1939VarDlc value: diff --git a/tests/snapshots/dbc-cantools/long_names.snap b/tests/snapshots/dbc-cantools/long_names.snap index 941770c..ca610dd 100644 --- a/tests/snapshots/dbc-cantools/long_names.snap +++ b/tests/snapshots/dbc-cantools/long_names.snap @@ -286,11 +286,21 @@ environment_variables: access_nodes: - Name: Vector__XXX attribute_definitions: - - Plain: "\"BusType\" STRING" - - Signal: "\"SystemSignalLongSymbol\" STRING" - - Message: "\"SystemMessageLongSymbol\" STRING" - - Node: "\"SystemNodeLongSymbol\" STRING" - - EnvironmentVariable: "\"SystemEnvVarLongSymbol\" STRING" + - Plain: + - BusType + - String + - Signal: + - SystemSignalLongSymbol + - String + - Message: + - SystemMessageLongSymbol + - String + - Node: + - SystemNodeLongSymbol + - String + - EnvironmentVariable: + - SystemEnvVarLongSymbol + - String attribute_defaults: - name: BusType value: diff --git a/tests/snapshots/dbc-cantools/long_names_multiple_relations.snap b/tests/snapshots/dbc-cantools/long_names_multiple_relations.snap index d326e01..33cd9f4 100644 --- a/tests/snapshots/dbc-cantools/long_names_multiple_relations.snap +++ b/tests/snapshots/dbc-cantools/long_names_multiple_relations.snap @@ -1,6 +1,5 @@ --- source: tests/snapshots.rs -assertion_line: 143 --- version: "" new_symbols: @@ -282,16 +281,59 @@ message_transmitters: - NodeName: Node_6789_123456789_123456789_12 - NodeName: Sender_2_aaaaaaaaaaaaaaaaaaaaaaa attribute_definitions: - - Signal: "\"GenSigSendType\" ENUM \"Cyclic\",\"OnWrite\",\"OnWriteWithRepetition\",\"OnChange\",\"OnChangeWithRepetition\",\"IfActive\",\"IfActiveWithRepetition\",\"NoSigSendType\"" - - Signal: "\"GenSigInactiveValue\" INT 0 0" - - Message: "\"GenMsgCycleTime\" INT 0 0" - - Message: "\"GenMsgSendType\" ENUM \"Cyclic\",\"not_used\",\"not_used\",\"not_used\",\"not_used\",\"Cyclic\",\"not_used\",\"IfActive\",\"NoMsgSendType\"" - - Node: "\"NmStationAddress\" HEX 0 0" - - Plain: "\"DBName\" STRING" - - Plain: "\"BusType\" STRING" - - Signal: "\"SystemSignalLongSymbol\" STRING" - - Message: "\"SystemMessageLongSymbol\" STRING" - - Node: "\"SystemNodeLongSymbol\" STRING" + - Signal: + - GenSigSendType + - Enum: + - Cyclic + - OnWrite + - OnWriteWithRepetition + - OnChange + - OnChangeWithRepetition + - IfActive + - IfActiveWithRepetition + - NoSigSendType + - Signal: + - GenSigInactiveValue + - Int: + - Uint: 0 + - Uint: 0 + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 0 + - Message: + - GenMsgSendType + - Enum: + - Cyclic + - not_used + - not_used + - not_used + - not_used + - Cyclic + - not_used + - IfActive + - NoMsgSendType + - Node: + - NmStationAddress + - Hex: + - Uint: 0 + - Uint: 0 + - Plain: + - DBName + - String + - Plain: + - BusType + - String + - Signal: + - SystemSignalLongSymbol + - String + - Message: + - SystemMessageLongSymbol + - String + - Node: + - SystemNodeLongSymbol + - String attribute_defaults: - name: GenSigSendType value: diff --git a/tests/snapshots/dbc-cantools/long_names_multiple_relations_dumped.snap b/tests/snapshots/dbc-cantools/long_names_multiple_relations_dumped.snap index 2821288..f030cdc 100644 --- a/tests/snapshots/dbc-cantools/long_names_multiple_relations_dumped.snap +++ b/tests/snapshots/dbc-cantools/long_names_multiple_relations_dumped.snap @@ -1,6 +1,5 @@ --- source: tests/snapshots.rs -assertion_line: 143 --- version: "" new_symbols: @@ -282,16 +281,59 @@ message_transmitters: - NodeName: Node_6789_123456789_123456789_12 - NodeName: Sender_2_aaaaaaaaaaaaaaaaaaaaaaa attribute_definitions: - - Signal: "\"GenSigSendType\" ENUM \"Cyclic\",\"OnWrite\",\"OnWriteWithRepetition\",\"OnChange\",\"OnChangeWithRepetition\",\"IfActive\",\"IfActiveWithRepetition\",\"NoSigSendType\"" - - Signal: "\"GenSigInactiveValue\" INT 0 0" - - Message: "\"GenMsgCycleTime\" INT 0 0" - - Message: "\"GenMsgSendType\" ENUM \"Cyclic\",\"not_used\",\"not_used\",\"not_used\",\"not_used\",\"Cyclic\",\"not_used\",\"IfActive\",\"NoMsgSendType\"" - - Node: "\"NmStationAddress\" HEX 0 0" - - Plain: "\"DBName\" STRING" - - Plain: "\"BusType\" STRING" - - Signal: "\"SystemSignalLongSymbol\" STRING" - - Message: "\"SystemMessageLongSymbol\" STRING" - - Node: "\"SystemNodeLongSymbol\" STRING" + - Signal: + - GenSigSendType + - Enum: + - Cyclic + - OnWrite + - OnWriteWithRepetition + - OnChange + - OnChangeWithRepetition + - IfActive + - IfActiveWithRepetition + - NoSigSendType + - Signal: + - GenSigInactiveValue + - Int: + - Uint: 0 + - Uint: 0 + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 0 + - Message: + - GenMsgSendType + - Enum: + - Cyclic + - not_used + - not_used + - not_used + - not_used + - Cyclic + - not_used + - IfActive + - NoMsgSendType + - Node: + - NmStationAddress + - Hex: + - Uint: 0 + - Uint: 0 + - Plain: + - DBName + - String + - Plain: + - BusType + - String + - Signal: + - SystemSignalLongSymbol + - String + - Message: + - SystemMessageLongSymbol + - String + - Node: + - SystemNodeLongSymbol + - String attribute_defaults: - name: GenSigSendType value: diff --git a/tests/snapshots/dbc-cantools/mod_name_len_dest.snap b/tests/snapshots/dbc-cantools/mod_name_len_dest.snap index 8de1737..3cf7cde 100644 --- a/tests/snapshots/dbc-cantools/mod_name_len_dest.snap +++ b/tests/snapshots/dbc-cantools/mod_name_len_dest.snap @@ -60,9 +60,15 @@ comments: name: node_now_short comment: "" attribute_definitions: - - Node: "\"SystemNodeLongSymbol\" STRING" - - Message: "\"SystemMessageLongSymbol\" STRING" - - Signal: "\"SystemSignalLongSymbol\" STRING" + - Node: + - SystemNodeLongSymbol + - String + - Message: + - SystemMessageLongSymbol + - String + - Signal: + - SystemSignalLongSymbol + - String attribute_defaults: - name: SystemNodeLongSymbol value: diff --git a/tests/snapshots/dbc-cantools/mod_name_len_src.snap b/tests/snapshots/dbc-cantools/mod_name_len_src.snap index 5a4459b..04ff148 100644 --- a/tests/snapshots/dbc-cantools/mod_name_len_src.snap +++ b/tests/snapshots/dbc-cantools/mod_name_len_src.snap @@ -60,9 +60,15 @@ comments: name: Node_will_be_shortened_456789_12 comment: "" attribute_definitions: - - Node: "\"SystemNodeLongSymbol\" STRING" - - Message: "\"SystemMessageLongSymbol\" STRING" - - Signal: "\"SystemSignalLongSymbol\" STRING" + - Node: + - SystemNodeLongSymbol + - String + - Message: + - SystemMessageLongSymbol + - String + - Signal: + - SystemSignalLongSymbol + - String attribute_defaults: - name: SystemNodeLongSymbol value: diff --git a/tests/snapshots/dbc-cantools/motohawk.snap b/tests/snapshots/dbc-cantools/motohawk.snap index e39b919..dcb6143 100644 --- a/tests/snapshots/dbc-cantools/motohawk.snap +++ b/tests/snapshots/dbc-cantools/motohawk.snap @@ -1,6 +1,5 @@ --- source: tests/snapshots.rs -assertion_line: 143 --- version: "1.0" new_symbols: @@ -90,7 +89,11 @@ comments: Standard: 496 comment: Example message used as template in MotoHawk models. attribute_definitions: - - Message: "\"GenMsgCycleTime\" INT 0 65535" + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 65535 attribute_defaults: - name: GenMsgCycleTime value: diff --git a/tests/snapshots/dbc-cantools/motohawk_fd.snap b/tests/snapshots/dbc-cantools/motohawk_fd.snap index 0f03071..cad512c 100644 --- a/tests/snapshots/dbc-cantools/motohawk_fd.snap +++ b/tests/snapshots/dbc-cantools/motohawk_fd.snap @@ -89,10 +89,38 @@ comments: Extended: 496 comment: Example message used as template in MotoHawk models. attribute_definitions: - - Message: "\"GenMsgCycleTime\" INT 0 65535" - - Plain: "\"BusType\" STRING" - - Message: "\"VFrameFormat\" ENUM \"StandardCAN\",\"ExtendedCAN\",\"reserved\",\"J1939PG\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"reserved\",\"StandardCAN_FD\",\"ExtendedCAN_FD\"" - - Message: "\"CANFD_BRS\" ENUM \"0\",\"1\"" + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 65535 + - Plain: + - BusType + - String + - Message: + - VFrameFormat + - Enum: + - StandardCAN + - ExtendedCAN + - reserved + - J1939PG + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - reserved + - StandardCAN_FD + - ExtendedCAN_FD + - Message: + - CANFD_BRS + - Enum: + - "0" + - "1" attribute_defaults: - name: GenMsgCycleTime value: diff --git a/tests/snapshots/dbc-cantools/motohawk_use_round.snap b/tests/snapshots/dbc-cantools/motohawk_use_round.snap index e39b919..dcb6143 100644 --- a/tests/snapshots/dbc-cantools/motohawk_use_round.snap +++ b/tests/snapshots/dbc-cantools/motohawk_use_round.snap @@ -1,6 +1,5 @@ --- source: tests/snapshots.rs -assertion_line: 143 --- version: "1.0" new_symbols: @@ -90,7 +89,11 @@ comments: Standard: 496 comment: Example message used as template in MotoHawk models. attribute_definitions: - - Message: "\"GenMsgCycleTime\" INT 0 65535" + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 65535 attribute_defaults: - name: GenMsgCycleTime value: diff --git a/tests/snapshots/dbc-cantools/multiple_senders.snap b/tests/snapshots/dbc-cantools/multiple_senders.snap index 3cc5feb..e749fc7 100644 --- a/tests/snapshots/dbc-cantools/multiple_senders.snap +++ b/tests/snapshots/dbc-cantools/multiple_senders.snap @@ -1,6 +1,5 @@ --- source: tests/snapshots.rs -assertion_line: 143 --- version: "" new_symbols: @@ -67,7 +66,11 @@ message_transmitters: - NodeName: BAR - NodeName: FIE attribute_definitions: - - Message: "\"GenMsgCycleTime\" INT 0 65535" + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 65535 attribute_defaults: - name: GenMsgCycleTime value: diff --git a/tests/snapshots/dbc-cantools/multiplex.snap b/tests/snapshots/dbc-cantools/multiplex.snap index a8243be..150f998 100644 --- a/tests/snapshots/dbc-cantools/multiplex.snap +++ b/tests/snapshots/dbc-cantools/multiplex.snap @@ -213,14 +213,57 @@ comments: name: Multiplexor comment: Defines data content for response messages. attribute_definitions: - - Message: "\"VFrameFormat\" ENUM \"StandardCAN\",\"ExtendedCAN\",\"reserved\",\"J1939PG\"" - - Signal: "\"GenSigSendType\" ENUM \"Cyclic\",\"OnWrite\",\"OnWriteWithRepetition\",\"OnChange\",\"OnChangeWithRepetition\",\"IfActive\",\"IfActiveWithRepetition\",\"NoSigSendType\"" - - Signal: "\"GenSigInactiveValue\" INT 0 0" - - Message: "\"GenMsgCycleTime\" INT 0 0" - - Message: "\"GenMsgSendType\" ENUM \"Cyclic\",\"not_used\",\"not_used\",\"not_used\",\"not_used\",\"Cyclic\",\"not_used\",\"IfActive\",\"NoMsgSendType\"" - - Node: "\"NmStationAddress\" HEX 0 0" - - Plain: "\"DBName\" STRING" - - Plain: "\"BusType\" STRING" + - Message: + - VFrameFormat + - Enum: + - StandardCAN + - ExtendedCAN + - reserved + - J1939PG + - Signal: + - GenSigSendType + - Enum: + - Cyclic + - OnWrite + - OnWriteWithRepetition + - OnChange + - OnChangeWithRepetition + - IfActive + - IfActiveWithRepetition + - NoSigSendType + - Signal: + - GenSigInactiveValue + - Int: + - Uint: 0 + - Uint: 0 + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 0 + - Message: + - GenMsgSendType + - Enum: + - Cyclic + - not_used + - not_used + - not_used + - not_used + - Cyclic + - not_used + - IfActive + - NoMsgSendType + - Node: + - NmStationAddress + - Hex: + - Uint: 0 + - Uint: 0 + - Plain: + - DBName + - String + - Plain: + - BusType + - String attribute_defaults: - name: VFrameFormat value: diff --git a/tests/snapshots/dbc-cantools/multiplex_2.snap b/tests/snapshots/dbc-cantools/multiplex_2.snap index 9e0dd88..c5dd9eb 100644 --- a/tests/snapshots/dbc-cantools/multiplex_2.snap +++ b/tests/snapshots/dbc-cantools/multiplex_2.snap @@ -319,39 +319,185 @@ messages: receivers: - Vector__XXX attribute_definitions: - - Message: "\"TpJ1939VarDlc\" ENUM \"No\",\"Yes\"" - - Signal: "\"SigType\" ENUM \"Default\",\"Range\",\"RangeSigned\",\"ASCII\",\"Discrete\",\"Control\",\"ReferencePGN\",\"DTC\",\"StringDelimiter\",\"StringLength\",\"StringLengthControl\",\"MessageCounter\",\"MessageChecksum\"" - - Signal: "\"GenSigEVName\" STRING" - - Signal: "\"GenSigILSupport\" ENUM \"No\",\"Yes\"" - - Signal: "\"GenSigSendType\" ENUM \"Cyclic\",\"OnWrite\",\"OnWriteWithRepetition\",\"OnChange\",\"OnChangeWithRepetition\",\"IfActive\",\"IfActiveWithRepetition\",\"NoSigSendType\"" - - Message: "\"GenMsgFastOnStart\" INT 0 100000" - - Signal: "\"GenSigInactiveValue\" INT 0 0" - - Message: "\"GenMsgCycleTimeFast\" INT 0 3600000" - - Message: "\"GenMsgNrOfRepetition\" INT 0 1000000" - - Signal: "\"GenSigStartValue\" INT 0 2147483647" - - Message: "\"GenMsgDelayTime\" INT 0 1000" - - Message: "\"GenMsgILSupport\" ENUM \"No\",\"Yes\"" - - Message: "\"GenMsgStartDelayTime\" INT 0 100000" - - Node: "\"NodeLayerModules\" STRING" - - Node: "\"ECU\" STRING" - - Node: "\"NmJ1939SystemInstance\" INT 0 15" - - Node: "\"NmJ1939System\" INT 0 127" - - Node: "\"NmJ1939ManufacturerCode\" INT 0 2047" - - Node: "\"NmJ1939IndustryGroup\" INT 0 7" - - Node: "\"NmJ1939IdentityNumber\" INT 0 2097151" - - Node: "\"NmJ1939FunctionInstance\" INT 0 7" - - Node: "\"NmJ1939Function\" INT 0 255" - - Node: "\"NmJ1939ECUInstance\" INT 0 3" - - Node: "\"NmJ1939AAC\" INT 0 1" - - Node: "\"NmStationAddress\" INT 0 255" - - Message: "\"GenMsgSendType\" ENUM \"cyclic\",\"NotUsed\",\"IfActive\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"noMsgSendType\"" - - Message: "\"GenMsgRequestable\" INT 0 1" - - Message: "\"GenMsgCycleTime\" INT 0 3600000" - - Signal: "\"SPN\" INT 0 524287" - - Plain: "\"DBName\" STRING" - - Plain: "\"BusType\" STRING" - - Plain: "\"ProtocolType\" STRING" - - Message: "\"VFrameFormat\" ENUM \"StandardCAN\",\"ExtendedCAN\",\"reserved\",\"J1939PG\"" + - Message: + - TpJ1939VarDlc + - Enum: + - "No" + - "Yes" + - Signal: + - SigType + - Enum: + - Default + - Range + - RangeSigned + - ASCII + - Discrete + - Control + - ReferencePGN + - DTC + - StringDelimiter + - StringLength + - StringLengthControl + - MessageCounter + - MessageChecksum + - Signal: + - GenSigEVName + - String + - Signal: + - GenSigILSupport + - Enum: + - "No" + - "Yes" + - Signal: + - GenSigSendType + - Enum: + - Cyclic + - OnWrite + - OnWriteWithRepetition + - OnChange + - OnChangeWithRepetition + - IfActive + - IfActiveWithRepetition + - NoSigSendType + - Message: + - GenMsgFastOnStart + - Int: + - Uint: 0 + - Uint: 100000 + - Signal: + - GenSigInactiveValue + - Int: + - Uint: 0 + - Uint: 0 + - Message: + - GenMsgCycleTimeFast + - Int: + - Uint: 0 + - Uint: 3600000 + - Message: + - GenMsgNrOfRepetition + - Int: + - Uint: 0 + - Uint: 1000000 + - Signal: + - GenSigStartValue + - Int: + - Uint: 0 + - Uint: 2147483647 + - Message: + - GenMsgDelayTime + - Int: + - Uint: 0 + - Uint: 1000 + - Message: + - GenMsgILSupport + - Enum: + - "No" + - "Yes" + - Message: + - GenMsgStartDelayTime + - Int: + - Uint: 0 + - Uint: 100000 + - Node: + - NodeLayerModules + - String + - Node: + - ECU + - String + - Node: + - NmJ1939SystemInstance + - Int: + - Uint: 0 + - Uint: 15 + - Node: + - NmJ1939System + - Int: + - Uint: 0 + - Uint: 127 + - Node: + - NmJ1939ManufacturerCode + - Int: + - Uint: 0 + - Uint: 2047 + - Node: + - NmJ1939IndustryGroup + - Int: + - Uint: 0 + - Uint: 7 + - Node: + - NmJ1939IdentityNumber + - Int: + - Uint: 0 + - Uint: 2097151 + - Node: + - NmJ1939FunctionInstance + - Int: + - Uint: 0 + - Uint: 7 + - Node: + - NmJ1939Function + - Int: + - Uint: 0 + - Uint: 255 + - Node: + - NmJ1939ECUInstance + - Int: + - Uint: 0 + - Uint: 3 + - Node: + - NmJ1939AAC + - Int: + - Uint: 0 + - Uint: 1 + - Node: + - NmStationAddress + - Int: + - Uint: 0 + - Uint: 255 + - Message: + - GenMsgSendType + - Enum: + - cyclic + - NotUsed + - IfActive + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - noMsgSendType + - Message: + - GenMsgRequestable + - Int: + - Uint: 0 + - Uint: 1 + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 3600000 + - Signal: + - SPN + - Int: + - Uint: 0 + - Uint: 524287 + - Plain: + - DBName + - String + - Plain: + - BusType + - String + - Plain: + - ProtocolType + - String + - Message: + - VFrameFormat + - Enum: + - StandardCAN + - ExtendedCAN + - reserved + - J1939PG attribute_defaults: - name: TpJ1939VarDlc value: diff --git a/tests/snapshots/dbc-cantools/multiplex_2_dumped.snap b/tests/snapshots/dbc-cantools/multiplex_2_dumped.snap index a9ccfdf..ad01b3c 100644 --- a/tests/snapshots/dbc-cantools/multiplex_2_dumped.snap +++ b/tests/snapshots/dbc-cantools/multiplex_2_dumped.snap @@ -317,39 +317,185 @@ messages: receivers: - Vector__XXX attribute_definitions: - - Message: "\"TpJ1939VarDlc\" ENUM \"No\",\"Yes\"" - - Signal: "\"SigType\" ENUM \"Default\",\"Range\",\"RangeSigned\",\"ASCII\",\"Discrete\",\"Control\",\"ReferencePGN\",\"DTC\",\"StringDelimiter\",\"StringLength\",\"StringLengthControl\",\"MessageCounter\",\"MessageChecksum\"" - - Signal: "\"GenSigEVName\" STRING" - - Signal: "\"GenSigILSupport\" ENUM \"No\",\"Yes\"" - - Signal: "\"GenSigSendType\" ENUM \"Cyclic\",\"OnWrite\",\"OnWriteWithRepetition\",\"OnChange\",\"OnChangeWithRepetition\",\"IfActive\",\"IfActiveWithRepetition\",\"NoSigSendType\"" - - Message: "\"GenMsgFastOnStart\" INT 0 100000" - - Signal: "\"GenSigInactiveValue\" INT 0 0" - - Message: "\"GenMsgCycleTimeFast\" INT 0 3600000" - - Message: "\"GenMsgNrOfRepetition\" INT 0 1000000" - - Signal: "\"GenSigStartValue\" INT 0 2147483647" - - Message: "\"GenMsgDelayTime\" INT 0 1000" - - Message: "\"GenMsgILSupport\" ENUM \"No\",\"Yes\"" - - Message: "\"GenMsgStartDelayTime\" INT 0 100000" - - Node: "\"NodeLayerModules\" STRING" - - Node: "\"ECU\" STRING" - - Node: "\"NmJ1939SystemInstance\" INT 0 15" - - Node: "\"NmJ1939System\" INT 0 127" - - Node: "\"NmJ1939ManufacturerCode\" INT 0 2047" - - Node: "\"NmJ1939IndustryGroup\" INT 0 7" - - Node: "\"NmJ1939IdentityNumber\" INT 0 2097151" - - Node: "\"NmJ1939FunctionInstance\" INT 0 7" - - Node: "\"NmJ1939Function\" INT 0 255" - - Node: "\"NmJ1939ECUInstance\" INT 0 3" - - Node: "\"NmJ1939AAC\" INT 0 1" - - Node: "\"NmStationAddress\" INT 0 255" - - Message: "\"GenMsgSendType\" ENUM \"cyclic\",\"NotUsed\",\"IfActive\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"noMsgSendType\"" - - Message: "\"GenMsgRequestable\" INT 0 1" - - Message: "\"GenMsgCycleTime\" INT 0 3600000" - - Signal: "\"SPN\" INT 0 524287" - - Plain: "\"DBName\" STRING" - - Plain: "\"BusType\" STRING" - - Plain: "\"ProtocolType\" STRING" - - Message: "\"VFrameFormat\" ENUM \"StandardCAN\",\"ExtendedCAN\",\"reserved\",\"J1939PG\"" + - Message: + - TpJ1939VarDlc + - Enum: + - "No" + - "Yes" + - Signal: + - SigType + - Enum: + - Default + - Range + - RangeSigned + - ASCII + - Discrete + - Control + - ReferencePGN + - DTC + - StringDelimiter + - StringLength + - StringLengthControl + - MessageCounter + - MessageChecksum + - Signal: + - GenSigEVName + - String + - Signal: + - GenSigILSupport + - Enum: + - "No" + - "Yes" + - Signal: + - GenSigSendType + - Enum: + - Cyclic + - OnWrite + - OnWriteWithRepetition + - OnChange + - OnChangeWithRepetition + - IfActive + - IfActiveWithRepetition + - NoSigSendType + - Message: + - GenMsgFastOnStart + - Int: + - Uint: 0 + - Uint: 100000 + - Signal: + - GenSigInactiveValue + - Int: + - Uint: 0 + - Uint: 0 + - Message: + - GenMsgCycleTimeFast + - Int: + - Uint: 0 + - Uint: 3600000 + - Message: + - GenMsgNrOfRepetition + - Int: + - Uint: 0 + - Uint: 1000000 + - Signal: + - GenSigStartValue + - Int: + - Uint: 0 + - Uint: 2147483647 + - Message: + - GenMsgDelayTime + - Int: + - Uint: 0 + - Uint: 1000 + - Message: + - GenMsgILSupport + - Enum: + - "No" + - "Yes" + - Message: + - GenMsgStartDelayTime + - Int: + - Uint: 0 + - Uint: 100000 + - Node: + - NodeLayerModules + - String + - Node: + - ECU + - String + - Node: + - NmJ1939SystemInstance + - Int: + - Uint: 0 + - Uint: 15 + - Node: + - NmJ1939System + - Int: + - Uint: 0 + - Uint: 127 + - Node: + - NmJ1939ManufacturerCode + - Int: + - Uint: 0 + - Uint: 2047 + - Node: + - NmJ1939IndustryGroup + - Int: + - Uint: 0 + - Uint: 7 + - Node: + - NmJ1939IdentityNumber + - Int: + - Uint: 0 + - Uint: 2097151 + - Node: + - NmJ1939FunctionInstance + - Int: + - Uint: 0 + - Uint: 7 + - Node: + - NmJ1939Function + - Int: + - Uint: 0 + - Uint: 255 + - Node: + - NmJ1939ECUInstance + - Int: + - Uint: 0 + - Uint: 3 + - Node: + - NmJ1939AAC + - Int: + - Uint: 0 + - Uint: 1 + - Node: + - NmStationAddress + - Int: + - Uint: 0 + - Uint: 255 + - Message: + - GenMsgSendType + - Enum: + - cyclic + - NotUsed + - IfActive + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - noMsgSendType + - Message: + - GenMsgRequestable + - Int: + - Uint: 0 + - Uint: 1 + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 3600000 + - Signal: + - SPN + - Int: + - Uint: 0 + - Uint: 524287 + - Plain: + - DBName + - String + - Plain: + - BusType + - String + - Plain: + - ProtocolType + - String + - Message: + - VFrameFormat + - Enum: + - StandardCAN + - ExtendedCAN + - reserved + - J1939PG attribute_defaults: - name: TpJ1939VarDlc value: diff --git a/tests/snapshots/dbc-cantools/multiplex_choices.snap b/tests/snapshots/dbc-cantools/multiplex_choices.snap index b1542af..182960b 100644 --- a/tests/snapshots/dbc-cantools/multiplex_choices.snap +++ b/tests/snapshots/dbc-cantools/multiplex_choices.snap @@ -461,14 +461,57 @@ comments: name: Multiplexor comment: Defines data content for response messages. attribute_definitions: - - Message: "\"VFrameFormat\" ENUM \"StandardCAN\",\"ExtendedCAN\",\"reserved\",\"J1939PG\"" - - Signal: "\"GenSigSendType\" ENUM \"Cyclic\",\"OnWrite\",\"OnWriteWithRepetition\",\"OnChange\",\"OnChangeWithRepetition\",\"IfActive\",\"IfActiveWithRepetition\",\"NoSigSendType\"" - - Signal: "\"GenSigInactiveValue\" INT 0 0" - - Message: "\"GenMsgCycleTime\" INT 0 0" - - Message: "\"GenMsgSendType\" ENUM \"Cyclic\",\"not_used\",\"not_used\",\"not_used\",\"not_used\",\"Cyclic\",\"not_used\",\"IfActive\",\"NoMsgSendType\"" - - Node: "\"NmStationAddress\" HEX 0 0" - - Plain: "\"DBName\" STRING" - - Plain: "\"BusType\" STRING" + - Message: + - VFrameFormat + - Enum: + - StandardCAN + - ExtendedCAN + - reserved + - J1939PG + - Signal: + - GenSigSendType + - Enum: + - Cyclic + - OnWrite + - OnWriteWithRepetition + - OnChange + - OnChangeWithRepetition + - IfActive + - IfActiveWithRepetition + - NoSigSendType + - Signal: + - GenSigInactiveValue + - Int: + - Uint: 0 + - Uint: 0 + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 0 + - Message: + - GenMsgSendType + - Enum: + - Cyclic + - not_used + - not_used + - not_used + - not_used + - Cyclic + - not_used + - IfActive + - NoMsgSendType + - Node: + - NmStationAddress + - Hex: + - Uint: 0 + - Uint: 0 + - Plain: + - DBName + - String + - Plain: + - BusType + - String attribute_defaults: - name: VFrameFormat value: diff --git a/tests/snapshots/dbc-cantools/multiplex_choices_dumped.snap b/tests/snapshots/dbc-cantools/multiplex_choices_dumped.snap index a106480..2b7f151 100644 --- a/tests/snapshots/dbc-cantools/multiplex_choices_dumped.snap +++ b/tests/snapshots/dbc-cantools/multiplex_choices_dumped.snap @@ -461,14 +461,57 @@ comments: name: Multiplexor comment: Defines data content for response messages. attribute_definitions: - - Message: "\"VFrameFormat\" ENUM \"StandardCAN\",\"ExtendedCAN\",\"reserved\",\"J1939PG\"" - - Signal: "\"GenSigSendType\" ENUM \"Cyclic\",\"OnWrite\",\"OnWriteWithRepetition\",\"OnChange\",\"OnChangeWithRepetition\",\"IfActive\",\"IfActiveWithRepetition\",\"NoSigSendType\"" - - Signal: "\"GenSigInactiveValue\" INT 0 0" - - Message: "\"GenMsgCycleTime\" INT 0 0" - - Message: "\"GenMsgSendType\" ENUM \"Cyclic\",\"not_used\",\"not_used\",\"not_used\",\"not_used\",\"Cyclic\",\"not_used\",\"IfActive\",\"NoMsgSendType\"" - - Node: "\"NmStationAddress\" HEX 0 0" - - Plain: "\"DBName\" STRING" - - Plain: "\"BusType\" STRING" + - Message: + - VFrameFormat + - Enum: + - StandardCAN + - ExtendedCAN + - reserved + - J1939PG + - Signal: + - GenSigSendType + - Enum: + - Cyclic + - OnWrite + - OnWriteWithRepetition + - OnChange + - OnChangeWithRepetition + - IfActive + - IfActiveWithRepetition + - NoSigSendType + - Signal: + - GenSigInactiveValue + - Int: + - Uint: 0 + - Uint: 0 + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 0 + - Message: + - GenMsgSendType + - Enum: + - Cyclic + - not_used + - not_used + - not_used + - not_used + - Cyclic + - not_used + - IfActive + - NoMsgSendType + - Node: + - NmStationAddress + - Hex: + - Uint: 0 + - Uint: 0 + - Plain: + - DBName + - String + - Plain: + - BusType + - String attribute_defaults: - name: VFrameFormat value: diff --git a/tests/snapshots/dbc-cantools/multiplex_dumped.snap b/tests/snapshots/dbc-cantools/multiplex_dumped.snap index 0ba667b..992efca 100644 --- a/tests/snapshots/dbc-cantools/multiplex_dumped.snap +++ b/tests/snapshots/dbc-cantools/multiplex_dumped.snap @@ -213,14 +213,57 @@ comments: name: Multiplexor comment: Defines data content for response messages. attribute_definitions: - - Message: "\"VFrameFormat\" ENUM \"StandardCAN\",\"ExtendedCAN\",\"reserved\",\"J1939PG\"" - - Signal: "\"GenSigSendType\" ENUM \"Cyclic\",\"OnWrite\",\"OnWriteWithRepetition\",\"OnChange\",\"OnChangeWithRepetition\",\"IfActive\",\"IfActiveWithRepetition\",\"NoSigSendType\"" - - Signal: "\"GenSigInactiveValue\" INT 0 0" - - Message: "\"GenMsgCycleTime\" INT 0 0" - - Message: "\"GenMsgSendType\" ENUM \"Cyclic\",\"not_used\",\"not_used\",\"not_used\",\"not_used\",\"Cyclic\",\"not_used\",\"IfActive\",\"NoMsgSendType\"" - - Node: "\"NmStationAddress\" HEX 0 0" - - Plain: "\"DBName\" STRING" - - Plain: "\"BusType\" STRING" + - Message: + - VFrameFormat + - Enum: + - StandardCAN + - ExtendedCAN + - reserved + - J1939PG + - Signal: + - GenSigSendType + - Enum: + - Cyclic + - OnWrite + - OnWriteWithRepetition + - OnChange + - OnChangeWithRepetition + - IfActive + - IfActiveWithRepetition + - NoSigSendType + - Signal: + - GenSigInactiveValue + - Int: + - Uint: 0 + - Uint: 0 + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 0 + - Message: + - GenMsgSendType + - Enum: + - Cyclic + - not_used + - not_used + - not_used + - not_used + - Cyclic + - not_used + - IfActive + - NoMsgSendType + - Node: + - NmStationAddress + - Hex: + - Uint: 0 + - Uint: 0 + - Plain: + - DBName + - String + - Plain: + - BusType + - String attribute_defaults: - name: VFrameFormat value: diff --git a/tests/snapshots/dbc-cantools/no_sender.snap b/tests/snapshots/dbc-cantools/no_sender.snap index 54a7fd5..ceab4f2 100644 --- a/tests/snapshots/dbc-cantools/no_sender.snap +++ b/tests/snapshots/dbc-cantools/no_sender.snap @@ -58,7 +58,9 @@ comments: Standard: 472 comment: No sender message. attribute_definitions: - - Plain: "\"BusType\" STRING" + - Plain: + - BusType + - String attribute_defaults: - name: BusType value: diff --git a/tests/snapshots/dbc-cantools/open_actuator.snap b/tests/snapshots/dbc-cantools/open_actuator.snap index 2a47bda..58aa113 100644 --- a/tests/snapshots/dbc-cantools/open_actuator.snap +++ b/tests/snapshots/dbc-cantools/open_actuator.snap @@ -368,7 +368,9 @@ comments: name: TorqueSense comment: Strain gauge torque measured attribute_definitions: - - Plain: "\"BusType\" STRING" + - Plain: + - BusType + - String attribute_defaults: - name: BusType value: diff --git a/tests/snapshots/dbc-cantools/sig_groups.snap b/tests/snapshots/dbc-cantools/sig_groups.snap index 31e289b..18de6fc 100644 --- a/tests/snapshots/dbc-cantools/sig_groups.snap +++ b/tests/snapshots/dbc-cantools/sig_groups.snap @@ -1,6 +1,5 @@ --- source: tests/snapshots.rs -assertion_line: 143 --- version: "" new_symbols: @@ -192,8 +191,14 @@ messages: receivers: - Vector__XXX attribute_definitions: - - Plain: "\"BusType\" STRING" - - Message: "\"GenMsgCycleTime\" INT 0 65535" + - Plain: + - BusType + - String + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 65535 attribute_defaults: - name: BusType value: diff --git a/tests/snapshots/dbc-cantools/sig_groups_del.snap b/tests/snapshots/dbc-cantools/sig_groups_del.snap index 524f03c..2dfc27c 100644 --- a/tests/snapshots/dbc-cantools/sig_groups_del.snap +++ b/tests/snapshots/dbc-cantools/sig_groups_del.snap @@ -1,6 +1,5 @@ --- source: tests/snapshots.rs -assertion_line: 143 --- version: "" new_symbols: @@ -192,8 +191,14 @@ messages: receivers: - Vector__XXX attribute_definitions: - - Plain: "\"BusType\" STRING" - - Message: "\"GenMsgCycleTime\" INT 0 65535" + - Plain: + - BusType + - String + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 65535 attribute_defaults: - name: BusType value: diff --git a/tests/snapshots/dbc-cantools/sig_groups_out.snap b/tests/snapshots/dbc-cantools/sig_groups_out.snap index 41e5c4f..6d2d614 100644 --- a/tests/snapshots/dbc-cantools/sig_groups_out.snap +++ b/tests/snapshots/dbc-cantools/sig_groups_out.snap @@ -1,6 +1,5 @@ --- source: tests/snapshots.rs -assertion_line: 143 --- version: "" new_symbols: @@ -192,8 +191,14 @@ messages: receivers: - Vector__XXX attribute_definitions: - - Plain: "\"BusType\" STRING" - - Message: "\"GenMsgCycleTime\" INT 0 65535" + - Plain: + - BusType + - String + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 65535 attribute_defaults: - name: BusType value: diff --git a/tests/snapshots/dbc-cantools/signed.snap b/tests/snapshots/dbc-cantools/signed.snap index efe84df..0e0afae 100644 --- a/tests/snapshots/dbc-cantools/signed.snap +++ b/tests/snapshots/dbc-cantools/signed.snap @@ -334,7 +334,9 @@ messages: receivers: - Vector__XXX attribute_definitions: - - Plain: "\"BusType\" STRING" + - Plain: + - BusType + - String attribute_defaults: - name: BusType value: diff --git a/tests/snapshots/dbc-cantools/socialledge-written-by-cantools-with-default-sort-signals.snap b/tests/snapshots/dbc-cantools/socialledge-written-by-cantools-with-default-sort-signals.snap index 1a6a5aa..bb46012 100644 --- a/tests/snapshots/dbc-cantools/socialledge-written-by-cantools-with-default-sort-signals.snap +++ b/tests/snapshots/dbc-cantools/socialledge-written-by-cantools-with-default-sort-signals.snap @@ -353,9 +353,17 @@ comments: Standard: 100 comment: Sync message used to synchronize the controllers attribute_definitions: - - Plain: "\"BusType\" STRING" - - Message: "\"GenMsgCycleTime\" INT 0 0" - - Signal: "\"FieldType\" STRING" + - Plain: + - BusType + - String + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 0 + - Signal: + - FieldType + - String attribute_defaults: - name: BusType value: diff --git a/tests/snapshots/dbc-cantools/socialledge-written-by-cantools-with-sort-signals-by-name.snap b/tests/snapshots/dbc-cantools/socialledge-written-by-cantools-with-sort-signals-by-name.snap index 553ec18..aa4235c 100644 --- a/tests/snapshots/dbc-cantools/socialledge-written-by-cantools-with-sort-signals-by-name.snap +++ b/tests/snapshots/dbc-cantools/socialledge-written-by-cantools-with-sort-signals-by-name.snap @@ -353,9 +353,17 @@ comments: Standard: 100 comment: Sync message used to synchronize the controllers attribute_definitions: - - Plain: "\"BusType\" STRING" - - Message: "\"GenMsgCycleTime\" INT 0 0" - - Signal: "\"FieldType\" STRING" + - Plain: + - BusType + - String + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 0 + - Signal: + - FieldType + - String attribute_defaults: - name: BusType value: diff --git a/tests/snapshots/dbc-cantools/socialledge-written-by-cantools.snap b/tests/snapshots/dbc-cantools/socialledge-written-by-cantools.snap index e013906..b01aafd 100644 --- a/tests/snapshots/dbc-cantools/socialledge-written-by-cantools.snap +++ b/tests/snapshots/dbc-cantools/socialledge-written-by-cantools.snap @@ -353,9 +353,17 @@ comments: Standard: 100 comment: Sync message used to synchronize the controllers attribute_definitions: - - Plain: "\"BusType\" STRING" - - Message: "\"GenMsgCycleTime\" INT 0 0" - - Signal: "\"FieldType\" STRING" + - Plain: + - BusType + - String + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 0 + - Signal: + - FieldType + - String attribute_defaults: - name: BusType value: diff --git a/tests/snapshots/dbc-cantools/socialledge.snap b/tests/snapshots/dbc-cantools/socialledge.snap index e013906..b01aafd 100644 --- a/tests/snapshots/dbc-cantools/socialledge.snap +++ b/tests/snapshots/dbc-cantools/socialledge.snap @@ -353,9 +353,17 @@ comments: Standard: 100 comment: Sync message used to synchronize the controllers attribute_definitions: - - Plain: "\"BusType\" STRING" - - Message: "\"GenMsgCycleTime\" INT 0 0" - - Signal: "\"FieldType\" STRING" + - Plain: + - BusType + - String + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 0 + - Signal: + - FieldType + - String attribute_defaults: - name: BusType value: diff --git a/tests/snapshots/dbc-cantools/test_extended_id_dump.snap b/tests/snapshots/dbc-cantools/test_extended_id_dump.snap index 9e6b388..fd40fa5 100644 --- a/tests/snapshots/dbc-cantools/test_extended_id_dump.snap +++ b/tests/snapshots/dbc-cantools/test_extended_id_dump.snap @@ -72,7 +72,9 @@ messages: receivers: - Vector__XXX attribute_definitions: - - Plain: "\"BusType\" STRING" + - Plain: + - BusType + - String attribute_defaults: - name: BusType value: diff --git a/tests/snapshots/dbc-cantools/test_multiplex_dump.snap b/tests/snapshots/dbc-cantools/test_multiplex_dump.snap index 7ad9cf4..765032c 100644 --- a/tests/snapshots/dbc-cantools/test_multiplex_dump.snap +++ b/tests/snapshots/dbc-cantools/test_multiplex_dump.snap @@ -80,7 +80,9 @@ messages: receivers: - Vector__XXX attribute_definitions: - - Plain: "\"BusType\" STRING" + - Plain: + - BusType + - String attribute_defaults: - name: BusType value: diff --git a/tests/snapshots/dbc-cantools/timing.snap b/tests/snapshots/dbc-cantools/timing.snap index d4cdfab..cc76031 100644 --- a/tests/snapshots/dbc-cantools/timing.snap +++ b/tests/snapshots/dbc-cantools/timing.snap @@ -77,8 +77,25 @@ messages: receivers: - Receiver attribute_definitions: - - Message: "\"GenMsgSendType\" ENUM \"Cyclic\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"NotUsed\",\"IfActive\",\"NoMsgSendType\",\"NotUsed\",\"vector_leerstring\"" - - Message: "\"GenMsgCycleTime\" INT 0 50000" + - Message: + - GenMsgSendType + - Enum: + - Cyclic + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - NotUsed + - IfActive + - NoMsgSendType + - NotUsed + - vector_leerstring + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 50000 attribute_defaults: - name: GenMsgSendType value: diff --git a/tests/snapshots/dbc-cantools/val_table.snap b/tests/snapshots/dbc-cantools/val_table.snap index dcdce1a..a39d596 100644 --- a/tests/snapshots/dbc-cantools/val_table.snap +++ b/tests/snapshots/dbc-cantools/val_table.snap @@ -1,6 +1,5 @@ --- source: tests/snapshots.rs -assertion_line: 143 --- version: "" new_symbols: @@ -72,8 +71,14 @@ messages: receivers: - Vector__XXX attribute_definitions: - - Plain: "\"BusType\" STRING" - - Message: "\"GenMsgCycleTime\" INT 0 65535" + - Plain: + - BusType + - String + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 65535 attribute_defaults: - name: BusType value: diff --git a/tests/snapshots/dbc-cantools/variable_dlc.snap b/tests/snapshots/dbc-cantools/variable_dlc.snap index 0c358b2..41d3082 100644 --- a/tests/snapshots/dbc-cantools/variable_dlc.snap +++ b/tests/snapshots/dbc-cantools/variable_dlc.snap @@ -1,6 +1,5 @@ --- source: tests/snapshots.rs -assertion_line: 143 --- version: "" bit_timing: [] @@ -126,7 +125,11 @@ messages: receivers: - Test attribute_definitions: - - Message: "\"VFrameFormat\" INT 0 3" + - Message: + - VFrameFormat + - Int: + - Uint: 0 + - Uint: 3 attribute_defaults: - name: VFrameFormat value: diff --git a/tests/snapshots/dbc-cantools/vehicle.snap b/tests/snapshots/dbc-cantools/vehicle.snap index 5583c72..5ce9e8b 100644 --- a/tests/snapshots/dbc-cantools/vehicle.snap +++ b/tests/snapshots/dbc-cantools/vehicle.snap @@ -8533,8 +8533,16 @@ comments: name: Validity_Gyro_Rate_Yaw comment: "Valid when bit is set, invalid when bit is clear." attribute_definitions: - - Signal: "\"GenSigStartValue\" INT -2147483648 2147483647" - - Message: "\"GenMsgCycleTime\" INT 0 65535" + - Signal: + - GenSigStartValue + - Int: + - Int: -2147483648 + - Uint: 2147483647 + - Message: + - GenMsgCycleTime + - Int: + - Uint: 0 + - Uint: 65535 attribute_defaults: - name: GenSigStartValue value: