CommsDSL Specification
  • Introduction
  • Version
  • Schema Definition
  • Multiple Files
  • Namespaces
  • Platforms
  • References
  • Properties
  • Numeric Values
  • Boolean Values
  • Names
  • Protocol Versioning
  • Schema
  • Fields
    • Common Properties of Fields
    • enum Field
    • int Field
    • set Field
    • bitfield Field
    • bundle Field
    • string Field
    • data Field
    • list Field
    • float Field
    • ref Field
    • optional Field
    • variant Field
    • Referencing Values of Other Fields
  • Messages
  • Interfaces
  • Aliases
  • Frames
    • Common Properties of Layers
    • payload Layer
    • id Layer
    • size Layer
    • sync Layer
    • checksum Layer
    • value Layer
    • custom Layer
  • Protocol Versioning Summary
  • Appendix
    • Properties of schema
    • Common Properties of Fields
    • Properties of enum Field
    • Properties of int Field
    • Properties of set Field
    • Properties of bitfield Field
    • Properties of bundle Field
    • Properties of string Field
    • Properties of data Field
    • Properties of list Field
    • Properties of float Field
    • Properties of ref Field
    • Properties of optional Field
    • Properties of variant Field
    • Units
    • Properties of message
    • Properties of interface
    • Properties of alias
    • Properties of frame
    • Common Properties of Layers
    • Properties of checksum Layer
    • Properties of value Layer
    • Properties of custom Layer
Powered by GitBook
On this page

Was this helpful?

  1. Frames

custom Layer

Previousvalue LayerNextProtocol Versioning Summary

Last updated 5 years ago

Was this helpful?

The <custom> layer represent any other protocol specific layer, functionality of which cannot be impelemented using other provided layers. The code generator must allow injection of the externally implemented code of the layer functionality when generating code relevant to the transport .

<?xml version="1.0" encoding="UTF-8"?>
<schema endian="big" ...>
    <frame name="ProtocolFrame">
        <size name="Size">
            ...
        </size>
        <custom name="SomeCustomLayer">
            <int name="SomeField" type="uint8" />
        </custom>
        <id name="Id">
            ...  
        </id>
        <payload name="Data" />
    </frame>
</schema>

The <value> layer has all the properties as well as extra properties and elements described below.

ID Replacement

Most protocol frames are expected to use layer to process numeric ID of the message. However, there are protocols that may use the same field not only for numeric ID, but also for some extra flags. In this case layer cannot be used, because it expects the whole field to be dedicated to storage of the numeric ID. In such case <custom> layer needs to be used but marked as one replacing the with idReplacement .

<?xml version="1.0" encoding="UTF-8"?>
<schema endian="big" ...>
    <frame name="ProtocolFrame">
        <size name="Size">
            ...
        </size>
        <custom name="IdAndFlags" idReplacement="true">
            <bitfield name="IdAndFlagsField">
                <int name="Id" type="uint16" bitLength="12" />
                <set name="Flags" bitLength="4">
                    ...
                </set>
            </bitfield>
        </custom>
        <payload name="Data" />
    </frame>
</schema>

Use for future references.

framing
common
<id>
<id>
<id>
property
properties table