5.5 Implementation of the remaining methods
Implementation of the remaining methods in the IEngine interface is not complicated. On the sequence diagram in Figure 4-27 you can see how each method is accessing the other engine wrapper classes.
Fig. 17. Calling sequence for Simple River
The calling sequence for methods not shown in Figure 17 is given in Figure 14, Figure 15 and Figure 15. Note that for some of the methods the full implementation is done in the SimpleRiverEngineWrapper class. The methods GetCurrentTime, GetInputTime and GetEarliestNeededTime are all invoking the GetCurrentTime method in the SimpleRiverDotNetAccess class. The returned time is the engine local time. This time is converted to the ModifiedJulianTime in the SimpleRiverEngineWrapper (see code below).
public ITime GetCurrentTime() //From Class: Oatc.OpenMI.Examples.ModelComponents.SimpleRiver.Wrapper.SimpleRiverEngineWrapper : Oatc.OpenMI.Sdk.Wrapper.IEngine { double time = _simulationStartTime + _simpleRiverEngine.GetCurrentTime() / ((double)(24*3600)); return new Oatc.OpenMI.Sdk.Backbone.TimeStamp(time); }