using System; using System.ServiceModel; namespace Deltares.RtcTools.Net { /// /// Specification of the methods that are and must be available in the native DLL of RtcTools /// [ServiceContract] public interface IRtcToolsDll { /// /// Initialize the RtcTools computational core /// /// The directory path where the RtcTools files can be found /// The relative path where the xsd can be found [OperationContract] void Initialize(string directoryPathForXmlFiles, string schemaLocation); /// /// Get the start date and time of the RtcTools computation as a string /// /// Return the start date and time as a string, formatted as "YY-MM-DD hh:mm:ss" [OperationContract] string GetStartTimeString(); /// /// Get the start time of the RtcTools computation as Modified Julian Day /// /// The start time of the RtcTools computation as Modified Julian Day [OperationContract] double GetStartTimeAsMJD(); /// /// Get the end date and time of the RtcTools computation as a string /// /// Return the start date and time as a string, formatted as "YY-MM-DD hh:mm:ss" [OperationContract] string GetEndTimeString(); /// /// Get the end time of the RtcTools computation as Modified Julian Day /// /// The end time of the RtcTools computation as Modified Julian Day [OperationContract] double GetEndTimeAsMJD(); /// /// Get the number of input exchange items. /// /// The number of input exchange items [OperationContract] int GetInputExchangeItemCount(); /// /// Get the quantity identification string for the input exchange item with index "index". /// /// The quantity identifier [OperationContract] string InputExchangeItemGetQuantityId(int index); /// /// Get the element set identification string for the input exchange item with index "index". /// /// The element set identifier [OperationContract] string InputExchangeItemGetElementId(int index); /// /// Get the unit identification string for the input exchange item with index "index". /// [OperationContract] string InputExchangeItemGetUnit(int index); /// /// Get the number of input exchange items. /// /// The number of input exchange items [OperationContract] int GetOutputExchangeItemCount(); /// /// Get the quantity identification string for the output exchange item with index "index". /// /// The quantity identifier [OperationContract] string OutputExchangeItemGetQuantityId(int index); /// /// Get the element set identification string for the output exchange item with index "index". /// [OperationContract] string OutputExchangeItemGetElementId(int index); /// /// Get the unit identification string for the output exchange item with index "index". /// [OperationContract] string OutputExchangeItemGetUnit(int index); /// /// Set the input value for an input exchange item /// /// The index of the input exchange item /// The value to be set [OperationContract(Name = "SetValue_1")] void SetValue(int index, double value); [OperationContract(Name = "SetValue_2")] void SetValue(int index, double value, int timeStepCount); // TODO: merge functions to one with optional parameter when moving to C# (vs2010 or higher) /// /// Let the RtcTools computational core perform a time step /// [OperationContract(Name = "PerformTimeStep_1")] void PerformTimeStep(); [OperationContract(Name = "PerformTimeStep_2")] void PerformTimeStep(int timeStepCount); // TODO: merge functions to one with optional parameter when moving to C# (vs2010 or higher) /// /// Get the current date and time of the RtcTools computation as a string /// /// Return the current date and time as a string, formatted as "YY-MM-DD hh:mm:ss" [OperationContract] string GetCurrentTimeString(); /// /// Get the current time of the RtcTools computation as Modified Julian Day /// /// The current time of the RtcTools computation as Modified Julian Day [OperationContract] double GetCurrentTimeAsMJD(); /// /// Get the value of an output exchange item /// /// The index of the output exchange item /// The current value of the output exchange item [OperationContract] double GetValue(int index); /// /// Write statefile /// /// path to write the statefile to /// filename to use for the statefile [OperationContract] void WriteState(string path, string filename); /// /// Let the RtcTools computational core perform its finalization actions /// [OperationContract] void Finish(); /// /// Release the memory allocated by the RtcTools computational core /// [OperationContract] void Dispose(); } }