...
Instead of using the 1.4 IEngine, its dependant standard, wrapper and backbone, then you can use the UpwardsCompatible IEngine with its version of the standard, wrapper and backbone. The upwards compatible version implements all required functionality of the 2.0 ILinkableEngine.
Quantities
The biggest difference in the source code stems from the difference in the quantity, which in 1.4 itself contains as well the unit as the dimension
...
Code Block |
---|
Dimension flowDimension = new Dimension(); Unit literPrSecUnit = new Unit("LiterPrSecond", 0.001, 0, "Liters pr Second"); literPrSecUnit.Dimension = flowDimension; Quantity flowQuantity = new Quantity(literPrSecUnit, "Flow", "Flow"); flowQuantity.ValueType = typeof(double); |
References
The tricky part of using the upwards compatible wrapper is to get the references correct. All references to 1.4 should be removed and replaces with upwards compatible version, and also some of the 2.0 references.
...
Code Block |
---|
using OpenMI.Standard; using Oatc.OpenMI.Sdk.Backbone; using Oatc.UpwardsComp.Backbone; using Oatc.UpwardsComp.Standard; using ITime = Oatc.UpwardsComp.Standard.ITime; |
Other minor changes
Time helper functions has been improved, 1.4 source code:
...