CANalyze.Messages
CANalyze.Messages
— ModuleThe module provides the Message type that bundles signals.
CANalyze.Messages.Message
— TypeMessage
Messages model bundles of signals and enable the decoding of multiple signals. Additionally, messages are defined using the number of bytes (dlc
), a message name (name
), and the internal signals (signals
).
Fields
dlc::UInt8
: the number of required bytesname::String
: the name of the messagesignals::Dict{String, Signals.NamedSignal}
: a mapping of string
Base.get
— MethodBase.get(message::Message, key::String, default)
Returns the signal with the name key
inside message
if a signal with such a name exists, otherwise we return default
.
Arguments
message::Message
: the messagekey::String
: the index, i.e., the name of the signal we want to retrievedefault
: a default value
Base.getindex
— MethodBase.getindex(message::Message, index::String) -> Signals.NamedSignal
Returns the signal with the name index
inside message
.
Arguments
message::Message
: the messageindex::String
: the index, i.e., the name of the signal we want to retrieve
Throws
KeyError
: the signal with the nameindex
does not exist insidemessage
Base.iterate
— MethodBase.iterate(iter::Message, state)
Enables the iteration over the inside dictionary signals
.
Arguments
iter::Message
: the messagestate
: the state of the iterator
Base.iterate
— MethodBase.iterate(iter::Message)
Enables the iteration over the inside dictionary signals
.
Arguments
iter::Message
: the message
CANalyze.Messages.dlc
— Methoddlc(message::Message) -> UInt8
Returns the number of bytes that the message requires and operates on.
Arguments
message::Message
: the message
CANalyze.Messages.frame_id
— MethodCANalyze.Messages.name
— Methodname(message::Message) -> String
Returns the message name.
Arguments
message::Message
: the message