예제 #1
0
        /// <summary>Creates a simulator communications channel from a valid endpoint.</summary>
        /// <param name="endpoint">A valid simulator endpoint.</param>
        public SimulatorCommunicationsChannel(SimulatorEndpoint endpoint, ILog logger)
        {
            Contract.Requires(endpoint != null);
            this.logger = logger;
            ServiceLocator.LoggingService = logger;
            Endpoint = endpoint;
            var configuration = new SimulatorConfiguration {
                Realtime = endpoint.Realtime
            };

            simulator = new SimulatorStateMachine(new SystemDateTimeUtcClock(), configuration, logger);
        }
예제 #2
0
 internal StateStalled(SimulatorStateMachine machine) : base(machine)
 {
 }
예제 #3
0
 internal StateRotatingForShutterClose(SimulatorStateMachine machine) : base(machine)
 {
 }
 internal StateRotatingToHome(SimulatorStateMachine machine) : base(machine)
 {
 }
        public SimulatorStateMachine Build()
        {
            var machine = new SimulatorStateMachine(realTime: false, timeSource: new FakeClock(DateTime.UtcNow));

            return(machine);
        }
 public StateShutterOpening(SimulatorStateMachine machine) : base(machine, MotorConfiguration.Forward)
 {
 }
 public StateShutterClosing(SimulatorStateMachine machine) : base(machine, MotorConfiguration.Reverse)
 {
 }