Struct can_dbc::DBC

source ·
pub struct DBC { /* private fields */ }

Implementations§

source§

impl DBC

Auto-generated by derive_getters::Getters.

source

pub fn version(&self) -> &Version

Version generated by DB editor

source

pub fn new_symbols(&self) -> &Vec<Symbol>

Get field new_symbols from instance of DBC.

source

pub fn bit_timing(&self) -> &Option<Vec<Baudrate>>

Baud rate of network

source

pub fn nodes(&self) -> &Vec<Node>

CAN network nodes

source

pub fn value_tables(&self) -> &Vec<ValueTable>

Global value table

source

pub fn messages(&self) -> &Vec<Message>

CAN message (frame) details including signal details

source

pub fn message_transmitters(&self) -> &Vec<MessageTransmitter>

Get field message_transmitters from instance of DBC.

source

pub fn environment_variables(&self) -> &Vec<EnvironmentVariable>

Get field environment_variables from instance of DBC.

source

pub fn environment_variable_data(&self) -> &Vec<EnvironmentVariableData>

Get field environment_variable_data from instance of DBC.

source

pub fn signal_types(&self) -> &Vec<SignalType>

Get field signal_types from instance of DBC.

source

pub fn comments(&self) -> &Vec<Comment>

Object comments

source

pub fn attribute_definitions(&self) -> &Vec<AttributeDefinition>

Get field attribute_definitions from instance of DBC.

source

pub fn attribute_defaults(&self) -> &Vec<AttributeDefault>

Get field attribute_defaults from instance of DBC.

source

pub fn attribute_values(&self) -> &Vec<AttributeValueForObject>

Get field attribute_values from instance of DBC.

source

pub fn value_descriptions(&self) -> &Vec<ValueDescription>

Encoding for signal raw values

source

pub fn signal_type_refs(&self) -> &Vec<SignalTypeRef>

Get field signal_type_refs from instance of DBC.

source

pub fn signal_groups(&self) -> &Vec<SignalGroups>

Signal groups define a group of signals within a message

source

pub fn signal_extended_value_type_list( &self ) -> &Vec<SignalExtendedValueTypeList>

Get field signal_extended_value_type_list from instance of DBC.

source

pub fn extended_multiplex(&self) -> &Vec<ExtendedMultiplex>

Extended multiplex attributes

source§

impl DBC

source

pub fn from_slice(buffer: &[u8]) -> Result<DBC, Error<'_>>

Read a DBC from a buffer

source

pub fn from_str(dbc_in: &str) -> Result<DBC, Error<'_>>

👎Deprecated since 4.0.0: please use DBC::try_from instead
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 ) -> Result<Option<&Signal>, Error<'_>>

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

Trait Implementations§

source§

impl Clone for DBC

source§

fn clone(&self) -> DBC

Returns a copy 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 PartialEq for DBC

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

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

§

type Error = Error<'a>

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 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> 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,

§

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>,

§

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>,

§

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.