public OperationalService(ICommandTransport transport, bool forwardPackets, bool listenPackets) { if (transport == null) { throw new ArgumentNullException("transport"); } if (forwardPackets || listenPackets) { InitializePacketForwarding(listenPackets, forwardPackets); } // don't really need to initialize anything if (Settings.TestMode) { helper = new TestHelper(); CommBuilder.BindObject(OperationalTestComponentFacade.ServiceName, helper); } else { CommBuilder.BindObject(OperationalFacade.ServiceName, this); } // set up the car mode channel carModeChannel = CommBuilder.GetChannel(CarModeChannelName); // register to receive run mode events transport.CarModeChanged += new EventHandler <CarModeChangedEventArgs>(transport_CarModeChanged); // mark that we haven't started yet started = false; }
public DebuggingService(bool registerWithSim) { SetupSequencerEvents(); if (registerWithSim) { SimulatorClientFacade simClient = (SimulatorClientFacade)CommBuilder.GetObject("SimulationClient"); simClient.RegisterSteppableClient(this, ClientRunControlFacade.OperationalStepOrder); } }
public SceneEstimatorListener() { // get the local road estimate channel this.localRoadChannel = CommBuilder.GetChannel(UrbanChallenge.Common.Sensors.LocalRoadEstimate.LocalRoadEstimate.ChannelName); this.localRoadChannel2 = CommBuilder.GetChannel(UrbanChallenge.Common.Sensors.LocalRoadModelChannelNames.LocalRoadModelChannelName); this.posteriorPoseChannel = CommBuilder.GetChannel(VehicleState.ChannelName); this.clusterChannel = CommBuilder.GetChannel(SceneEstimatorObstacleChannelNames.AnyClusterChannelName); this.sideObstacleChannel = CommBuilder.GetChannel("SideObstacleChannel"); this.sideRoadEdgeChannel = CommBuilder.GetChannel("SideRoadEdgeChannel"); this.roadBearingChannel = CommBuilder.GetChannel("RoadBearingChannel"); // add ourselves as a listener this.localRoadChannel.Subscribe(this); this.localRoadChannel2.Subscribe(this); this.posteriorPoseChannel.Subscribe(this); this.clusterChannel.Subscribe(this); this.sideObstacleChannel.Subscribe(this); this.sideRoadEdgeChannel.Subscribe(this); this.roadBearingChannel.Subscribe(this); }
public UIService() { if (Services.Dataset == null) { throw new InvalidOperationException("Dataset must be initialized before creating UIService"); } if (Services.Params == null) { throw new InvalidOperationException("TunableParameterTable must be intialized before creating UIService"); } datasetFacade = new DatasetSourceFacade(Services.Dataset); paramFacade = new TunableParameterFacade(Services.Params); // list in the object directory if (!Settings.TestMode) { CommBuilder.BindObject(OperationalUIFacade.ServiceName, this); } }