public TestControlsModuleFactory(
     IGpioConnectionDriverFactory gpioConnectionDriverFactory,
     IAmplifierReporter amplifierReporter,
     IDisposableReporter disposableReporter)
     : base(gpioConnectionDriverFactory, amplifierReporter, disposableReporter)
 {
 }
Exemple #2
0
        /// <summary>Initializes a new instance of the <see cref="ControlsModuleFactory"/> class.</summary>
        /// <param name="gpioConnectionDriverFactory">The gpio connection driver.</param>
        /// <param name="amplifierReporter">The amplifier reporter.</param>
        /// <param name="disposableReporter">The disposable reporter.</param>
        public ControlsModuleFactory(
            IGpioConnectionDriverFactory gpioConnectionDriverFactory,
            IAmplifierReporter amplifierReporter,
            IDisposableReporter disposableReporter)
        {
            this.gpioConnectionDriverFactory = gpioConnectionDriverFactory;
            this.amplifierReporter           = amplifierReporter;
            this.controlsModule = new AsyncLazy <IControlsModule, PrivateControlModule>(() =>
            {
                // Create Hardware
                var systemControlFactory = this.CreateSystemControlFactory();
                var inputControls        = this.CreateInputControls(this.gpioConnectionDriverFactory);
                var systemControl        = systemControlFactory.Create(this.gpioConnectionDriverFactory);

                var amplifierFactory = this.CreateAmplifierFactory();
                var amplifier        = amplifierFactory.Create(this.amplifierReporter);

                var disposer = new Disposer(
                    disposableReporter,
                    systemControlFactory,
                    amplifierFactory,
                    inputControls.RemoteControl,
                    inputControls.RfidTransceiver,
                    inputControls.RotaryEncoder,
                    inputControls.ButtonsGpioConnection);
                return(new PrivateControlModule(inputControls, systemControl, amplifier, disposer));
            });
        }
Exemple #3
0
 /// <summary>Initializes a new instance of the <see cref="Reporters"/> class.</summary>
 /// <param name="interactionControllerReporter">The interaction controller reporter.</param>
 /// <param name="systemActivityAggregatorReporter">The system activity aggregator reporter.</param>
 /// <param name="idleMonitorReporter">The idle controller reporter.</param>
 /// <param name="playerControllerReporter">The player controller reporter.</param>
 /// <param name="volumeControllerReporter">The volume controller reporter.</param>
 /// <param name="shutdownControllerReporter">The shutdown controller reporter.</param>
 /// <param name="viewNavigatorReporter">The view navigator reporter.</param>
 /// <param name="displayStateControllerReporter">The display backlight controller reporter.</param>
 /// <param name="disposableReporter">The disposable reporter.</param>
 public Reporters(
     IInteractionControllerReporter interactionControllerReporter,
     ISystemActivityAggregatorReporter systemActivityAggregatorReporter,
     IIdleMonitorReporter idleMonitorReporter,
     IPlayerControllerReporter playerControllerReporter,
     IVolumeControllerReporter volumeControllerReporter,
     IShutdownControllerReporter shutdownControllerReporter,
     IViewNavigatorReporter viewNavigatorReporter,
     IDisplayStateControllerReporter displayStateControllerReporter,
     IDisposableReporter disposableReporter)
 {
     this.InteractionControllerReporter    = interactionControllerReporter;
     this.SystemActivityAggregatorReporter = systemActivityAggregatorReporter;
     this.IdleMonitorReporter            = idleMonitorReporter;
     this.PlayerControllerReporter       = playerControllerReporter;
     this.VolumeControllerReporter       = volumeControllerReporter;
     this.ShutdownControllerReporter     = shutdownControllerReporter;
     this.ViewNavigatorReporter          = viewNavigatorReporter;
     this.DisplayStateControllerReporter = displayStateControllerReporter;
     this.DisposableReporter             = disposableReporter;
 }