Data Handling¶
This page gives a more detailed description of initialisation and doStep of RMQFMU. The description is mainly carried out via diagrams, where some functions are referred to by name. Such functions are described in the section Functions.
Initialization¶
The initialization process of RabbitMQ FMU is peculiar in the sense that it needs to have an output for all messages. For this reason, the initialization has to occur when fmi2EnterInitializationMode
is invoked on RabbitMQ FMU.
Functions¶
Some functions are described in this section that are used in the diagram in the subsequent section.
- RabbitMQFMU.configure()
- Configure the RMQFMU based on the configuration within the model description file.
- RabbitMQFMUCore.ProcessIncoming
- Move lookahead amount of messages per message type from IncomingUnprocessed to IncomingLookahead
- Sort lookahead according to time
- RabbitMQFMUCore.ProcessLookahead
- Move message from incomingLookahead to currentData if newer.
- RabbitMQFMUCore.check
Returns false if any of the following cases occur for a message: msg in currentData:
- Missing in currentData
- CurrentData holds a future value: msg.time > simulationTime
- CurrentData holds an expired value: (msg.time + maxAge) < simulationTime
Flow of EnterInitializationMode¶
Flow of thread consuming from the RabbitMQ server¶
Flow of the DoStep¶
This section describes the doStep operation of RabbitMQ FMU.
Functions¶
Some functions are described in this section that are used in the diagram in the subsequent section.
- RabbitMQFMUCore.check
- Described in functions section of the initialization section.
- RabbitMQFMUCore.ProcessIncoming
- Move lookahead amount of messages per message type from IncomingUnprocessed to IncomingLookahead
- Sort lookahead according to time
- RabbitMQFMUCore.ProcessLookahead
- Move value from incomingLookahead to currentData if <= simulationTime and newer than the value in currentData. Otherwise keep in IncomingLookahead
Flow of DoStep Operation¶