- Timestamp:
- 05/26/10 15:18:42 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Interfaces
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Interfaces/IExternalEvaluationDriver.cs
r3852 r3859 20 20 #endregion 21 21 22 using System; 22 23 using HeuristicLab.Core; 24 using Google.ProtocolBuffers; 25 using Google.ProtocolBuffers.Descriptors; 23 26 24 27 namespace HeuristicLab.Problems.ExternalEvaluation { … … 33 36 /// <remarks> 34 37 /// Must be called before calling <seealso cref="Send"/> or <seealso cref="Receive"/>. 35 /// The concrete implementation of the driver may require additional information on how to start a connection. 38 /// The concrete implementation of the driver may require additional information on how to start a connection, 39 /// which should be passed into the concrete driver's constructor. 36 40 /// </remarks> 37 41 void Start(); 38 42 /// <summary> 39 /// Tells the driver to send a particular message.43 /// Evaluates a given solution in a blocking manner. 40 44 /// </summary> 41 /// <param name="msg">The message that should be transmitted.</param> 42 /// <remarks> 43 /// This call is non-blocking, the message need not be received synchronously. 44 /// </remarks> 45 void Send(MainMessage msg); 45 /// <param name="solution">The solution message that should be evaluated.</param> 46 /// <returns>The resulting quality message from the external process.</returns> 47 QualityMessage Evaluate(SolutionMessage solution); 46 48 /// <summary> 47 /// Tells the driver to receive the next message.49 /// Evaluates a given solution in a non-blocking manner. 48 50 /// </summary> 49 /// <exception cref="ConnectionTerminatedException">Thrown when the other client sent a message saying it will end the connection. In this case <see cref="Stop"/> is called automatically.</exception> 50 /// <exception cref="NotSupportedException">Thrown when there is no notion of a "next" message for a given driver.</exception> 51 /// <returns>The message that was received or null if no message is present.</returns> 52 /// <remarks> 53 /// This call is non-blocking and returns null if no message is present. 54 /// </remarks> 55 MainMessage Receive(); 56 /// <summary> 57 /// Tells the driver to receive the next message of the type given in the parameter. 58 /// </summary> 59 /// <exception cref="NotSupportedException">Some implementations may not support receiving a specific message.</exception> 60 /// <returns>The message that was received.</returns> 61 /// <remarks> 62 /// This call is non-blocking and returns null if no message is present. 63 /// </remarks> 64 /// <param name="messageDescriptor">The fullname of the descriptor for the message type to receive.</param> 65 MainMessage Receive(MainMessage message); 51 /// <param name="solution">The solution message that should be evaluated.</param> 52 /// <param name="callback">The callback method that is invoked when evaluation is finished.</param> 53 void EvaluateAsync(SolutionMessage solution, Action<QualityMessage> callback); 66 54 /// <summary> 67 55 /// Tells the driver to stop and terminate open connections.
Note: See TracChangeset
for help on using the changeset viewer.