Schema: Network

(v1.0.0)

Network

kind: Network
metadata:
  name: CAN1
  annotations:
    message_lib: examples/stub/data/message.so
    function_lib: examples/stub/data/function.so
spec:
  messages:
    - message: systemStatus
      annotations:
        struct_name: CAN1_systemStatus_t
        struct_size: 4
        frame_id: 496
        frame_length: 8
        cycle_time_ms: 10
      signals:
        - signal: Crc
          annotations:
            struct_member_name: crc
            struct_member_offset: 0
            struct_member_primitive_type: uint8_t
        - signal: Alive
          annotations:
            struct_member_name: alive
            struct_member_offset: 1
            struct_member_primitive_type: uint8
        - signal: Temperature
          annotations:
            struct_member_name: temperature
            struct_member_offset: 2
            struct_member_primitive_type: int16_t
      functions:
        encode:
          - function: counter_inc_uint8
            annotations:
              position: 1
          - function: crc_generate
            annotations:
              position: 0
        decode:
          - function: crc_validate
            annotations:
              position: 0

A Network definition.

Supported annotations:

AnnotationDescription
message_libRelative path of the shared library containing the Network Message symbols.
function_libRelative path of the shared library containing Network Function symbols.
node_idThe identifier of the Node used to indicate the sender of a network message. Typically specified in a mimeTYPE for the Network Signal, however a value may also be specified here.
interface_idThe identifier of the Interface of the Node used to send a network message. Typically specified in a mimeTYPE for the Network Signal, however a value may also be specified here.
bus_idThe identifier of the Bus connected to the Interface of the Node. Typically specified in a mimeTYPE for the Network Signal, however a value may also be specified here.

Properties

NameTypeRequiredDescription
kindstringtruenone
metadataobjectfalseInformation relating to an object.
» namestringfalseThe name of the object.
» labelsobjectfalseIdentifying information used to identify objects within the system (e.g. giving a specific ’label’ to an object).
»» additionalPropertiesstringfalsenone
» annotationsobjectfalseNon identifying information (i.e. information specific to the object itself).
»» additionalPropertiesanyfalsenone
specNetworkSpectrueSpecification for a Network.

Enumerated Values

PropertyValue
kindNetwork

NetworkSpec

{}

Specification for a Network.

Properties

NameTypeRequiredDescription
messages[NetworkMessage]falseA list of messages belonging to this Network.
pdus[object]falseA list of PDUs belonging to this Network..
» pdustringfalseThe name of the PDU.
» idintegertrueIdentifier for the PDU.
» lengthintegertrueLength of the PDU in bytes.
» annotationsobjectfalseNon identifying information (i.e. information specific to the object itself).
»» additionalPropertiesanyfalsenone
» containerintegerfalseOptional container identifier indicating this PDU is emitted within a multiplexor PDU (M-PDU).
» functionsobjectfalseLua-based script/functions to be applied in order. Each entry contains a Lua script block which is loaded into the Lua runtime.
»» encode[object]falseLua script/functions applied during the encode path.
»»» luastringtrueInline Lua script. Multi-line strings supported.
»» decode[NetworkSpec/properties/pdus/items/properties/functions/properties/encode/items]falseLua script/functions applied during the decode path.
» metadataanyfalseTransport metadata for a PDU.

oneOf

NameTypeRequiredDescription
»» anonymousobjectfalsenone
»»» canobjecttruenone
»»»» message_formatintegerfalsenone
»»»» frame_typeintegerfalsenone
»»»» interface_idintegerfalseCAN interface ID of the interface sending this PDU.
»»»» network_idintegerfalseCAN network ID carrying this PDU.

xor

NameTypeRequiredDescription
»» anonymousobjectfalsenone
»»» flexrayobjecttruenone
»»»» slot_idintegerfalsenone
»»»» payload_lengthintegerfalsenone
»»»» cycle_repetitionintegerfalsenone
»»»» base_cycleintegerfalsenone
»»»» directionintegerfalsenone
»»»» channelintegerfalsenone
»»»» transmit_modeintegerfalsenone
»»»» inhibit_nullbooleanfalsenone

xor

NameTypeRequiredDescription
»» anonymousobjectfalsenone
»»» ipobjecttruenone
»»»» eth_dst_macintegerfalseDestination MAC (lower 48-bits used).
»»»» eth_src_macintegerfalseSource MAC (lower 48-bits used).
»»»» eth_ethertypeintegerfalsenone
»»»» eth_tci_pcpintegerfalsenone
»»»» eth_tci_deiintegerfalsenone
»»»» eth_tci_vidintegerfalsenone
»»»» ip_addranyfalseIP address (IPv4 or IPv6).

oneOf

NameTypeRequiredDescription
»»»»» anonymousobjectfalsenone
»»»»»» src_addrintegertruenone
»»»»»» dst_addrintegertruenone

xor

NameTypeRequiredDescription
»»»»» anonymousobjectfalsenone
»»»»»» src_addrobjecttruenone
»»»»»»» v0integerfalsenone
»»»»»»» v1integerfalsenone
»»»»»»» v2integerfalsenone
»»»»»»» v3integerfalsenone
»»»»»»» v4integerfalsenone
»»»»»»» v5integerfalsenone
»»»»»»» v6integerfalsenone
»»»»»»» v7integerfalsenone
»»»»»» dst_addrNetworkSpec/properties/pdus/items/properties/metadata/oneOf/2/properties/ip/properties/ip_addr/oneOf/1/properties/src_addrtruenone

continued

NameTypeRequiredDescription
»»»» ip_protocolintegerfalse0=None, 6=TCP, 17=UDP
»»»» ip_src_portintegerfalsenone
»»»» ip_dst_portintegerfalsenone
»»»» adapteranyfalseSocket adapter metadata (DoIP or SOME/IP).

oneOf

NameTypeRequiredDescription
»»»»» anonymousobjectfalsenone
»»»»»» protocol_versionintegertruenone
»»»»»» payload_typeintegertruenone

xor

NameTypeRequiredDescription
»»»»» anonymousobjectfalsenone
»»»»»» message_idintegertruenone
»»»»»» lengthintegertruenone
»»»»»» request_idintegertruenone
»»»»»» protocol_versionintegertruenone
»»»»»» interface_versionintegertruenone
»»»»»» message_typeintegertruenone
»»»»»» return_codeintegertruenone

xor

NameTypeRequiredDescription
»» anonymousobjectfalsenone
»»» structobjecttruenone
»»»» type_namestringfalsenone
»»»» var_namestringfalsenone
»»»» encodingstringfalsenone
»»»» attribute_alignedintegerfalsenone
»»»» attribute_packedbooleanfalsenone
»»»» platform_archstringfalsenone
»»»» platform_osstringfalsenone
»»»» platform_abistringfalsenone

continued

NameTypeRequiredDescription
» signals[oneOf]trueDefines the layout and content of the PDU. Each entry is one of:
- a multiplexor definition (multiplexor:) using byte-based encoding
- a nested PDU container area (pdu:) using byte-based encoding
- a scalar signal (signal:) using bit-based encoding

oneOf

NameTypeRequiredDescription
»» anonymousobjectfalseDefines a multiplexor field using byte-based encoding. The id of the contained PDU is written into this field.
»»» multiplexorobjecttrueByte-based encoding, used for multiplexor and nested PDU container entries.
»»»» startintegertrueStart offset in bytes.
»»»» lengthintegertrueLength in bytes.

xor

NameTypeRequiredDescription
»» anonymousobjectfalseDefines a nested PDU container area using byte-based encoding. The contained PDU is copied into this field.
»»» pduNetworkSpec/properties/pdus/items/properties/signals/items/oneOf/0/properties/multiplexortrueByte-based encoding, used for multiplexor and nested PDU container entries.

xor

NameTypeRequiredDescription
»» anonymousobjectfalseDefines a scalar signal and its associated encoding.
»»» signalstringtrueThe name of the scalar signal.
»»» encodingobjectfalseBit-based encoding for scalar signals, with optional scaling and Lua hooks.
»»»» factornumberfalseScaling factor applied during encode/decode.
»»»» offsetnumberfalseOffset applied during encode/decode.
»»»» minnumberfalseOptional minimum value constraint (of the physical signal value). Causes truncation of the value.
»»»» maxnumberfalseOptional maximum value constraint. (of the physical signal value). Causes truncation of the value.
»»»» startintegertrueBit start position for the encoded signal value in the PDU.
»»»» lengthintegertrueBit length for the encoded signal value in the PDU.
»»» functionsNetworkSpec/properties/pdus/items/properties/functionsfalseLua-based script/functions to be applied in order. Each entry contains a Lua script block which is loaded into the Lua runtime.
»»» annotationsNetworkSpec/properties/pdus/items/properties/annotationsfalseNon identifying information (i.e. information specific to the object itself).

continued

NameTypeRequiredDescription
metadataNetworkMetadatafalseNetwork-level metadata and configuration objects.

anyOf

NameTypeRequiredDescription
anonymousobjectfalsenone

or

NameTypeRequiredDescription
anonymousobjectfalsenone

Enumerated Values

PropertyValue
message_formatBase
message_formatExtended
message_formatFdBase
message_formatFdExtended
frame_typeData
frame_typeRemote
frame_typeError
frame_typeOverload
directionRx
directionTx
channelA
channelB
channelAB
transmit_modeContinuous
transmit_modeSingleShot
ip_protocol0
ip_protocol6
ip_protocol17

NetworkMetadata

flexray:
  vcn:
    - ecu_id: 0
      cc_id: 0
      swc_id: 0
  initial_poc_state_cha: 0
  initial_poc_state_chb: 0
  inhibit_null_frames: true
  macrotick_per_cycle: 0
  microtick_per_cycle: 0
  network_idle_start: 0
  static_slot_length: 0
  static_slot_count: 0
  minislot_length: 0
  minislot_count: 0
  static_slot_payload_length: 0
  bit_rate: BR10Mbps
  channel_enable: A
  wakeup_channel_select: 0
  single_slot_enabled: true
  bus_model_mode: Pop
  node_name: string

Network-level metadata and configuration objects.

Properties

NameTypeRequiredDescription
flexrayobjecttruenone
» vcn[object]falsenone
»» ecu_idintegerfalsenone
»» cc_idintegerfalsenone
»» swc_idintegerfalsenone
» initial_poc_state_chaintegerfalsenone
» initial_poc_state_chbNetworkMetadata/oneOf/0/properties/flexray/properties/initial_poc_state_chafalsenone
» inhibit_null_framesbooleanfalsenone
» macrotick_per_cycleintegerfalsenone
» microtick_per_cycleintegerfalsenone
» network_idle_startintegerfalsenone
» static_slot_lengthintegerfalsenone
» static_slot_countintegerfalsenone
» minislot_lengthintegerfalsenone
» minislot_countintegerfalsenone
» static_slot_payload_lengthintegerfalsenone
» bit_rateintegerfalsenone
» channel_enableintegerfalsenone
» wakeup_channel_selectintegerfalsenone
» single_slot_enabledbooleanfalsenone
» bus_model_modeintegerfalsenone
» node_namestringfalsenone

Enumerated Values

PropertyValue
initial_poc_state_cha0
initial_poc_state_cha1
initial_poc_state_cha2
initial_poc_state_cha3
initial_poc_state_cha4
initial_poc_state_cha5
initial_poc_state_cha6
initial_poc_state_cha7
initial_poc_state_cha8
initial_poc_state_cha9
bit_rateBR10Mbps
bit_rateBR5Mbps
bit_rateBR2_5Mbps
channel_enableA
channel_enableB
channel_enableAB
bus_model_modePop

NetworkMessage

message: systemStatus
annotations:
  struct_name: CAN1_systemStatus_t
  struct_size: 4
  frame_id: 496
  frame_length: 8
  cycle_time_ms: 10
signals:
  - signal: Crc
    annotations:
      struct_member_name: crc
      struct_member_offset: 0
      struct_member_primitive_type: uint8_t
functions:
  encode:
    - function: crc_generate
      annotations:
        position: 0
  decode:
    - function: crc_validate
      annotations:
        position: 0

A Network message definition.

Supported annotations:

AnnotationDescription
struct_nameName of the typedef/struct representing the message.
struct_sizeSize of the message struct (in bytes).
frame_idThe frame id of the message when encoded to a bus transport (e.g. CAN Frame ID).
frame_lengthThe length of the message when encoded (in bytes).
cycle_time_msMessage will be sent according to the specified schedule (milliseconds).

Properties

NameTypeRequiredDescription
messagestringtrueThe name of the message.
annotationsobjectfalseNon identifying information (i.e. information specific to the object itself).
» additionalPropertiesanyfalsenone
signals[NetworkSignal]falseA list of signals represented in this message.
functionsNetworkFunctionsfalseMessage functions to be applied to this message.

NetworkSignal

signal: Temperature
annotations:
  struct_member_name: temperature
  struct_member_offset: 2
  struct_member_primitive_type: int16_t

A Network signal definition.

Supported annotations:

AnnotationDescription
init_valueThe signal is initialised to this value. The value will be interpreted according to the struct_member_primitive_type annotation.
struct_member_nameName of the struct member which represents this signal.
struct_member_offsetOffset of the member in the struct (in bytes).
struct_member_primitive_typeThe primitive type of the member (select from int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, uint32_t, uint64_t, float or double).

Properties

NameTypeRequiredDescription
signalstringtrueThe name of the signal.
annotationsNetworkMessage/properties/annotationsfalseNon identifying information (i.e. information specific to the object itself).

NetworkFunctions

encode:
  - &a1
    function: crc_generate
    annotations:
      position: 0
decode:
  - *a1

Message functions to be applied to this message.

Properties

NameTypeRequiredDescription
encode[NetworkFunction]falseMessage functions applied to the encode processing path (i.e. from Signal to Network interface). Functions are implicitly applied in the order of definition.
decode[NetworkFunction]falseMessage functions applied to the decode processing path (i.e. from Network to Signal interface). Functions are implicitly applied in the order of definition.

NetworkFunction

function: crc_generate
annotations:
  position: 0

A Network Function definition.

Properties

NameTypeRequiredDescription
functionstringtrueThe name of the function (i.e. the name of the symbol in the Network Function shared library).
annotationsNetworkMessage/properties/annotationsfalseNon identifying information (i.e. information specific to the object itself).

undefined