/// <see cref="DssEventHandler.PackageArrivedDuringSetupStage_i"/> protected override void PackageArrivedDuringSetupStage_i(Common.RCPackage package, int senderID) { if (senderID <= 0 && senderID >= this.root.OpCount) { throw new ArgumentOutOfRangeException("senderID"); } this.root.Manager.SetupStageError(senderID - 1); }
/// <see cref="DssEventHandler.ControlPackageFromClientHdl"/> public override void ControlPackageFromClientHdl(int timestamp, Common.RCPackage package, int senderID) { if (!IsSimulationRunning_i()) { /// Setup stage handling if (this.root.Manager.CurrentState == this.root.Manager.WaitingSetupStepAWs || this.root.Manager.CurrentState == this.root.Manager.LobbyCreated) { /// Will be handled by the manager. this.root.Manager.SetupStageCtrlPackage(package, senderID - 1); } else { /// Control packages are only allowed in WaitingSetupStepAWs or LobbyCreated state during setup stage. this.root.Manager.SetupStageError(senderID - 1); /// line n is represented by channel n-1. } } else { /// Control package during simulation stage is not allowed this.root.SimulationMgr.SimulationStageError("Illegal call to HostEventHandler.ControlPackageFromClientHdl during setup stage!", new byte[] { }); } }