Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Include Page
OPENMI:4.7 Step 7 - Implementation of the remaining IEngine methods
OPENMI:4.7 Step 7 - Implementation of the remaining IEngine methods

4.7 Step 7: Implementation of the remaining IEngine methods

The basic structure of your engine and wrapper code is now in place. The task is now to go through the MyEngineWrapper class and complete the implementation of the methods that are currently auto-generated stub code. Some of these methods can be completed only by changing the code in the MyEngineWrapper; for others, changes also need to be made to the other classes and the engine core (MyEngineDLL). After completion of each method you should update the test classes and run the unit test.

...

Code Block

//== The org.OpenMI.Utilities.Wrapper.IEngine interface == // \-\\- Execution control methods (Inherited from IRunEngine) \-\\- void Initialize(Hashtable properties); bool PerformTimeStep(); void Finish(); //-\\- Time methods (Inherited from IRunEngine) \-\\- ITime GetCurrentTime(); ITime GetInputTime(string QuantityID, string ElementSetID); ITimeStamp GetEarliestNeededTime(); //-\\- Data access methods (Inherited from IRunEngine) \-\\- void SetValues(string QuantityID, string ElementSetID, IValueSet values); IValueSet GetValues(string QuantityID, string ElementSetID); //-\\- Component description methods (Inherited from IRunEngine) \-\\- double GetMissingValueDefinition(); string GetComponentID(); string GetComponentDescription(); // \-\\- Model description methods \-\\- string GetModelID(); string GetModelDescription(); double GetTimeHorizon(); // \-\\- Exchange items \-\\- int GetInputExchangeItemCount(); int GetOutputExchangeItemCount(); org.OpenMI.Backbone GetInputExchangeItem(int exchangeItemIndex); org.OpenMI.Backbone GetOutputExchangeItem(int exchangeItemIndex);

5. Migration of the Simple River

...