CANalyze.Messages

CANalyze.Messages.MessageType
Message

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 bytes
  • name::String: the name of the message
  • signals::Dict{String, Signals.NamedSignal}: a mapping of string
source
Base.getMethod
Base.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 message
  • key::String: the index, i.e., the name of the signal we want to retrieve
  • default: a default value
source
Base.getindexMethod
Base.getindex(message::Message, index::String) -> Signals.NamedSignal

Returns the signal with the name index inside message.

Arguments

  • message::Message: the message
  • index::String: the index, i.e., the name of the signal we want to retrieve

Throws

  • KeyError: the signal with the name index does not exist inside message
source
Base.iterateMethod
Base.iterate(iter::Message, state)

Enables the iteration over the inside dictionary signals.

Arguments

  • iter::Message: the message
  • state: the state of the iterator
source
Base.iterateMethod
Base.iterate(iter::Message)

Enables the iteration over the inside dictionary signals.

Arguments

  • iter::Message: the message
source
CANalyze.Messages.dlcMethod
dlc(message::Message) -> UInt8

Returns the number of bytes that the message requires and operates on.

Arguments

  • message::Message: the message
source