-
Notifications
You must be signed in to change notification settings - Fork 94
Description
Hello FMI Designers,
I am wondering when calls to fmi3GetClock and fmi3GetTYPE (for clocked variables) are supposed to / allowed to happen. I am only considering CoSim FMUs here.
My confusion comes from the Event Mode code example (https://fmi-standard.org/docs/3.0.2/#_event_mode), which calls recordVariables right before entering Event Mode and does not call recordVariables while in Event Mode. From the standard I read:
setting and getting of clocked variables is only allowed during Event Mode when their respective Clocks are active
(...)
During Step Mode, clocked variables can not be set or get because Clocks are only active during Event Mode.
My questions are:
- Is the placement of recordVariables in the Event Mode example an oversight, or was it intentional because that example does not consider clocked variables?
- Is my assumption correct that the calls to
recordVariablesandapplyDiscreteInputsin the example implicitly include clocks?
The question came up when I wondered if/how I could do a simple "triggered clock echo", in the sense of triggering an input clock and getting a ticking output clock at the same timestamp.