Use I/O Buffers in Software Design
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.
To allow data exchange between 2 active parts without the use of DATAFLOW Runtime messages (either because there would be to many messages or the messages would be too large) an I/O buffer can be generated. This buffer has a configurable size and data type and provides events to manage the flow if data on both sides.
Typical Use Cases
Define I/O Buffer
To define an I/O buffer, the following steps need to be performed:
- Create the Buffer Element using the drop down menu in the Explorer Window
- Define the name, data type and size of the buffer
- Create an output port on the sender and an input port on the receiver active part.
- Connect both ports with a channel.
- Assign the buffer to the output port.
- Configure the buffer events on both ports using the property inspector window.
Note: A buffer can use any data type. This includes all native data types (integer, float, boolean, char, ...) as well as user defined types such as enumerations, structs, custom types and protocols.
Note: Normally, a buffer is used to prevent a very large protocol to require a large event pool. Therefore, it is not recommended to use a protocol as data type for the buffer, because the automatic configuration of the runtime will use the largest protocol size as event size. Use a struct instead to avoid this.
This Article has been written based on V2.1.1 of the DATAFLOW software.
Latest update 2023-06-21 by WUM.
Comments
0 comments
Please sign in to leave a comment.