コード例 #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)
 {
 }
コード例 #4
0
 internal StateRotatingToHome(SimulatorStateMachine machine) : base(machine)
 {
 }
コード例 #5
0
        public SimulatorStateMachine Build()
        {
            var machine = new SimulatorStateMachine(realTime: false, timeSource: new FakeClock(DateTime.UtcNow));

            return(machine);
        }
コード例 #6
0
 public StateShutterOpening(SimulatorStateMachine machine) : base(machine, MotorConfiguration.Forward)
 {
 }
コード例 #7
0
 public StateShutterClosing(SimulatorStateMachine machine) : base(machine, MotorConfiguration.Reverse)
 {
 }