Create a clear Software-Architecture with DATAFLOW Designer

by Marco Wuelser

 

The approach that was taken for the System-Architecture is also used for the Software-Architecture and the Software-Component design. Functional blocks are split up until they are small enough to be handled in one piece.


The following components are available to define the Software-Architecture.

 

Software Architecture Items

  • Active Container
    mceclip1.png
    Figure 1 - Software-Structure and – Architecture Element

  • Active Part
    mceclip2.png
    Figure 2 - Behavior and Message Handling Definition Element

  • Interrupt
    mceclip3.png
    Figure 3 - Interrupt Event to Forwarded to Active Parts



Active Container

An Active Container forms part of the software component family and is used to group multiple Active Parts. The usage of Active Containers makes it possible to define a Software Architecture and a better system overview. Active Containers can have multiple input ports and multiple output ports. Software Components, which are used in code generation, are decomposed. Active Containers build the structure and hierarchy in the generated code. Active Containers can be decomposed similar to System Components.

mceclip5.png

Figure 4 - Decompose Active Container

Decomposing an Active Container generates a new diagram with all its ports, timers and interfaces inherited to the new diagram. The decomposition is repeated until the blocks are small enough to be handled in one piece.

 

mceclip6.png

Figure 5 - Active Container Properties

 

Active Part

Active Parts are software components. They play a major role in code generation and cannot be decomposed any further. Active Parts are objects that encapsulate their private state and behavior. They contain ‘one-shot’ functions that run to completion (RTC) and return to the kernel. They communicate with each other solely by exchanging messages. Active Parts are only connected to each other via ‘Channels’, which are for their part only connected to ‘Ports’. An Active Part should have one input port named “PortIn”, and it can have multiple output ports. If more than one input port is used, those will be merged with a single input port during code generation.

 

mceclip4.png

Figure 6 - Active Part Properties

 

Active Interrupt

Active Interrupts also form part of the Software Component family. They may contain an event to interrupt an Active Part. After an interrupt, the scheduler determinates to either preempt the interrupt or continue the current Active Part based on the highest pending priority, which is ready to process a message. An Interrupt must not have an input port and can have multiple output ports. The Active Interrupt code is generated by the application code generator.

 

mceclip7.png

Figure 7 - Interrupt Properties

 

Elements

PortIn

Used to define the input protocols of an Active Part, Interrupt and Active Container.

 

PortOut

Used to define the output protocols of an Active Part, Interrupt and Active Container.

mceclip9.png

Figure 8 - Port Properties

Timer

The following Timer elements are available for Active Parts and Interrupts.

  • OneShot Timer
  • Periodic Timer
  • Variable Timer

 

Software Architecture Example

When creating the architecture for a Software Component, the following steps should be performed:

  1. Edit the system component that should contain software by pressing Ctrl + Click.

    mceclip0.png

  2. Create an active container (black box) to represent the to be designed software. This black boxes can be combined with Active Parts at this level.

    mceclip6.png

  3. Move the external interfaces inherited from the parent container to the container and/or create new interfaces.

    mceclip11.png

  4. CTRL + Click the component to open the child diagram.

    mceclip3.png

  5. Create all level one components (Active Parts, Interrupts or Active Containers) once the units are small enough to be handled in one piece.

    mceclip4.png

  6. Move all inherited external interfaces to the component that uses them.

    mceclip12.png

  7. Add all required ports to the components.

    mceclip5.png

  8. Add all required timers to the created Active Parts.

    mceclip7.png

  9. Connect the ports with channels.

    mceclip8.png

  10. Assign protocols to all output ports in Active Parts and Interrupts.

    mceclip9.png

  11. Repeat Steps 3 to 9 for every Active Container created until no more Containers are required.

 

Go back