/// <summary> /// Initializes communications with the outside world by means of remoting /// </summary> private void InitializeRemotingCommunications() { // Read the configuration file. RemotingConfiguration.Configure("..\\..\\App.config", false); WellKnownServiceTypeEntry[] wkst = RemotingConfiguration.GetRegisteredWellKnownServiceTypes(); // "Activate" the NameService singleton. objectDirectory = (ObjectDirectory)Activator.GetObject(typeof(ObjectDirectory), wkst[0].ObjectUri); // Bind the operational test faceade objectDirectory.Rebind(this, "OperationalTestFacade"); // Retreive the directory of messaging channels IChannelFactory channelFactory = (IChannelFactory)objectDirectory.Resolve("ChannelFactory"); // Retreive the Messaging Service channels we want to listen to rndfChannel = channelFactory.GetChannel("RndfNetworkChannel", ChannelMode.Bytestream); mdfChannel = channelFactory.GetChannel("MdfChannel", ChannelMode.Bytestream); positionChannel = channelFactory.GetChannel("PositionChannel", ChannelMode.Bytestream); testStringChannel = channelFactory.GetChannel("TestStringChannel", ChannelMode.Vanilla); // Create a channel listeners and listen on wanted channels channelListener = new MessagingListener(); rndfToken = rndfChannel.Subscribe(channelListener); mdfToken = mdfChannel.Subscribe(channelListener); //positionToken = positionChannel.Subscribe(channelListener); testStringToken = testStringChannel.Subscribe(new StringListener()); // Show that the navigation system is ready and waiting for input Console.WriteLine(" > Remoting Communication Initialized"); }