/// <summary> /// Constructs a DssHostSessionSM object. /// </summary> public DssHostSessionSM(IStateMachine sm, DssManagerSM manager)//, SetupStep step) { this.sm = sm; this.channel = null; /// will be set later this.manager = manager; this.externalTriggersCreated = false; this.internalTriggersCreated = false; /// Creating the states this.Inactive = this.sm.AddState("Inactive", null); this.WaitingConnectionRQ = this.sm.AddState("WaitingConnectionRQ", null); this.SendingSetupStepRQ = this.sm.AddState("SendingSetupStepRQ", null); this.WaitingSetupStepAW = this.sm.AddState("WaitingSetupStepAW", null); this.Simulating = this.sm.AddState("Simulating", null); /// Setting the initial state this.sm.SetInitialState(this.Inactive); }
/// <summary> /// Constructs a DssChannelSM object. /// </summary> /// <param name="smc">The SM-controller that is used to construct the underlying state machine.</param> public DssChannelSM(IStateMachine sm, DssManagerSM manager, DssHostSessionSM session, int idx) { this.session = session; this.channelIndex = idx; this.sm = sm; this.manager = manager; this.externalTriggersCreated = false; this.internalTriggersCreated = false; /// Creating the states this.Start = this.sm.AddState("Start", null); this.Opened = this.sm.AddState("Opened", null); this.Engaging = this.sm.AddState("Engaging", null); this.Engaged = this.sm.AddState("Engaged", this.GuestConnected); this.Closing = this.sm.AddState("Closing", null); this.Closed = this.sm.AddState("Closed", null); this.Opening = this.sm.AddState("Opening", null); this.Terminating = this.sm.AddState("Terminating", null); this.Simulating = this.sm.AddState("Simulating", null); this.PermanentlyClosed = this.sm.AddState("PermanentlyClosed", null); /// Setting the initial state this.sm.SetInitialState(this.Start); }