コード例 #1
0
        /// <summary>
        /// Creates a new message queue.
        /// This is the only entry point such that the two applications
        /// are reading/writing to the same queue.
        /// </summary>
        /// <returns></returns>
        public static QueueContainer GetTridentMessageQueue()
        {
            QueueContainer queues = new QueueContainer();

            queues.PestToTridentQueue = MessageQueueHelper.GetMessageQueue(".\\private$\\PestToTridentQueue");
            queues.TridentToPestQueue = MessageQueueHelper.GetMessageQueue(".\\private$\\TridentToPestQueue");
            return(queues);
        }
コード例 #2
0
 // Need to detemine how the evolution engine and this class
 // are to interact
 // i.e. when does the evolution engine execute pest
 // is it before this class is created? What time frame do
 // I have before the messages are sent from the pest executable
 // to processing the message here
 public MessageQueueModelRunner(string outputFile, ModelRunner mr, string recordVar)
 {
     this.outputTimeSeriesName = recordVar;
     this.outputTimeSeriesFile = outputFile;
     // possibly build this up earlier (maybe pass a SimulationXml
     this.modelRunner = mr;
     // setup the message passing system
     queues = MessageQueueHelper.GetTridentMessageQueue();
 }