Dbc

Struct Dbc 

Source
pub struct Dbc {
Show 26 fields pub version: Version, pub new_symbols: Vec<Symbol>, pub bit_timing: Option<Vec<Baudrate>>, pub nodes: Vec<Node>, pub value_tables: Vec<ValueTable>, pub messages: Vec<Message>, pub message_transmitters: Vec<MessageTransmitter>, pub environment_variables: Vec<EnvironmentVariable>, pub environment_variable_data: Vec<EnvironmentVariableData>, pub signal_types: Vec<SignalType>, pub comments: Vec<Comment>, pub attribute_definitions: Vec<AttributeDefinition>, pub relation_attribute_definitions: Vec<AttributeDefinition>, pub attribute_defaults: Vec<AttributeDefault>, pub relation_attribute_defaults: Vec<AttributeDefault>, pub relation_attribute_values: Vec<AttributeValueForRelation>, pub attribute_values_database: Vec<AttributeValueForDatabase>, pub attribute_values_node: Vec<AttributeValueForNode>, pub attribute_values_message: Vec<AttributeValueForMessage>, pub attribute_values_signal: Vec<AttributeValueForSignal>, pub attribute_values_env: Vec<AttributeValueForEnvVariable>, pub value_descriptions: Vec<ValueDescription>, pub signal_type_refs: Vec<SignalTypeRef>, pub signal_groups: Vec<SignalGroups>, pub signal_extended_value_type_list: Vec<SignalExtendedValueTypeList>, pub extended_multiplex: Vec<ExtendedMultiplex>,
}

Fields§

§version: Version

Version generated by DB editor

§new_symbols: Vec<Symbol>§bit_timing: Option<Vec<Baudrate>>

Baud rate of network

§nodes: Vec<Node>

CAN network nodes

§value_tables: Vec<ValueTable>

Global value table

§messages: Vec<Message>

CAN message (frame) details including signal details

§message_transmitters: Vec<MessageTransmitter>§environment_variables: Vec<EnvironmentVariable>§environment_variable_data: Vec<EnvironmentVariableData>§signal_types: Vec<SignalType>§comments: Vec<Comment>

Object comments

§attribute_definitions: Vec<AttributeDefinition>§relation_attribute_definitions: Vec<AttributeDefinition>§attribute_defaults: Vec<AttributeDefault>§relation_attribute_defaults: Vec<AttributeDefault>§relation_attribute_values: Vec<AttributeValueForRelation>§attribute_values_database: Vec<AttributeValueForDatabase>§attribute_values_node: Vec<AttributeValueForNode>§attribute_values_message: Vec<AttributeValueForMessage>§attribute_values_signal: Vec<AttributeValueForSignal>§attribute_values_env: Vec<AttributeValueForEnvVariable>§value_descriptions: Vec<ValueDescription>

Encoding for signal raw values

§signal_type_refs: Vec<SignalTypeRef>§signal_groups: Vec<SignalGroups>

Signal groups define a group of signals within a message

§signal_extended_value_type_list: Vec<SignalExtendedValueTypeList>§extended_multiplex: Vec<ExtendedMultiplex>

Extended multiplex attributes

Implementations§

Source§

impl Dbc

Source

pub fn signal_by_name( &self, message_id: MessageId, signal_name: &str, ) -> Option<&Signal>

Source

pub fn message_comment(&self, message_id: MessageId) -> Option<&str>

Lookup a message comment

Source

pub fn signal_comment( &self, message_id: MessageId, signal_name: &str, ) -> Option<&str>

Lookup a signal comment

Source

pub fn value_descriptions_for_signal( &self, message_id: MessageId, signal_name: &str, ) -> Option<&[ValDescription]>

Lookup value descriptions for signal

Source

pub fn extended_value_type_for_signal( &self, message_id: MessageId, signal_name: &str, ) -> Option<&SignalExtendedValueType>

Lookup the extended value for a given signal

Source

pub fn message_multiplexor_switch( &self, message_id: MessageId, ) -> DbcResult<Option<&Signal>>

Lookup the message multiplexer switch signal for a given message This does not work for extended multiplexed messages, if multiple multiplexors are defined for a message an Error is returned.

Trait Implementations§

Source§

impl Clone for Dbc

Source§

fn clone(&self) -> Dbc

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Dbc

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Dbc

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Dbc

Source§

fn eq(&self, other: &Dbc) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Dbc

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<'a> TryFrom<&'a str> for Dbc

Source§

type Error = DbcError

The type returned in the event of a conversion error.
Source§

fn try_from(dbc_in: &'a str) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl StructuralPartialEq for Dbc

Auto Trait Implementations§

§

impl Freeze for Dbc

§

impl RefUnwindSafe for Dbc

§

impl Send for Dbc

§

impl Sync for Dbc

§

impl Unpin for Dbc

§

impl UnwindSafe for Dbc

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,