Create new Data Types for Software Interfaces - Channels

by Marco Wuelser

 

This Guide Article has been written for Version 2.1 of the DATAFLOW Software. For Previous Releases use the version selection in the navigation bar at the top of this page.

 

Create new Data Types

New Data Types can be created in multiple ways.

  1. Explorer - Create Element drop down menu

    mceclip1.png

  2. Create a new Data Type from the Explorer -> Type Group

    mceclip0.png

  3. Right click on a Output Port from an Active Part
    To create a new protocol or signal from an output port, right-click the output port and select "Create Protocol" from the context menu.

    mceclip2.png

 

Data Type Editors

There is a specific Data Type Editor for the different Data Types:

Data Type Editor
Protocol

A Protocol defines the interface between software components. When one component sends a message to another, both must know the Protocol.

 

Protocol Editor
mceclip12.png

Details section allows to define:

  • Name
  • Channel Color (this color is used in the diagram for any channel that uses this protocol)
  • Protocol ID (if AutoID is not selected)
  • Category (categories can be used to group data types)

In the documentation section it is possible to set the

  • Description
  • Documentation Reference
  • Documentation Path
    • The placeholder <REF> can be used to use the reference ID within a URL

Fields

Fields can be created by dragging a native type, enumeration or protocol from the Protocol Explorer to the list of fields. The fields are serialized in the given order without any padding bytes. Fields can be scalar types (integer, Boolean, floating point) or arrays of scalar types. Fields can also be Enumerations (see above) or other Protocols. In that way, complex data types can be created

 

Signal

A Signal is a Protocol that has no fields assigned. The runtime will then only send the protocol identifier without any additional data and there is no code generated except for the identifier constant.

Protocol Editor
mceclip11.png

Details section allows to define:

  • Name
  • Channel Color (this color is used in the diagram for any channel that uses this protocol)
  • Protocol ID (if AutoID is not selected)
  • Category (categories can be used to group data types)

In the documentation section it is possible to set the

  • Description
  • Documentation Reference
  • Documentation Path
    • The placeholder <REF> can be used to use the reference ID within a URL

Fields

A signal is a protocol without fields.

Custom Type

A custom type is a base type with a defined measurement unit and range. This allows the user to define strong types for temperature, pressure, etc. A custom type can also be used to define a fixed point decimal value.

 

Note: Custom Types can have any integer (signed and unsigned) and floating point type as base type. 
Bools and chars are not allowed.

Custom Type Editor
mceclip9.png

Details section allows to define:

  • Name
  • Base Type
  • Initial Value
  • Literal
  • Range
  • Magnitude
  • Precision
  • Category (categories can be used to group data types)

In the documentation section it is possible to set the

  • Description
  • Documentation Reference
  • Documentation Path
    • The placeholder <REF> can be used to use the reference ID within a URL

Enumeration

Enumeration Editor

mceclip10.png

Details section allows to define:

  • Name
  • Channel Color (this color is used in the diagram for any channel that uses this protocol)
  • Protocol ID (if AutoID is not selected)
  • Category (categories can be used to group data types)

In the documentation section it is possible to set the

  • Description
  • Documentation Reference
  • Documentation Path
    • The placeholder <REF> can be used to use the reference ID within a URL

In the items section it is possible to

  • add new Enumeration items
  • view the list of available enumeration items
  • re-order enumerations with multi select
    mceclip0.png
Struct

Struct Editor

mceclip8.png

Details section allows to define:

  • Name

In the documentation section it is possible to set the

  • Description
  • Documentation Reference
  • Documentation Path
    • The placeholder <REF> can be used to use the reference ID within a URL

Fields

Fields can be created by dragging a native type, enumeration or protocol from the Protocol Explorer to the list of fields. The fields are serialized in the given order without any padding bytes. Fields can be scalar types (integer, Boolean, floating point) or arrays of scalar types. Fields can also be Enumerations (see above) or other Protocols. In that way, complex data types can be created

Buffer

Buffer Editor

Details section allows to define:

  • Name
  • Category
  • Data Type
  • Number of Entries
  • Buffer Type (FIFO / LIFO)

In the documentation section it is possible to set the

  • Description
  • Documentation Reference
  • Documentation Path
    • The placeholder <REF> can be used to use the reference ID within a URL
All Editors

All Data Type Editors support the search and replace feature

mceclip2.png

 

Required Module: DATAFLOW Designer

This Article has been written based on V2.0.1 of the DATAFLOW Designer software. 
Latest update 2023-05-31 by WUM.

Go back