Exemple #1
0
        public IOutputDevice CreateDevice(Guid deviceId, Guid moduleId, Guid moduleInstanceId, string name)
        {
            IHasOutputs <CommandOutput> outputs       = new OutputCollection <CommandOutput>();
            IModuleDataRetriever        dataRetriever = new ModuleInstanceDataRetriever(VixenSystem.ModuleStore.InstanceData);
            IOutputModuleConsumer <IControllerModuleInstance> outputModuleConsumer = new OutputModuleConsumer <IControllerModuleInstance>(moduleId, moduleInstanceId, dataRetriever);
            IOutputMediator <CommandOutput> outputMediator = new OutputMediator <CommandOutput>(outputs, outputModuleConsumer.Module);
            IHardware executionControl = new BasicOutputModuleExecutionControl(outputModuleConsumer.Module);

            return(new OutputController(deviceId, name, outputMediator, executionControl, outputModuleConsumer));
        }
Exemple #2
0
        public IOutputDevice CreateDevice(Guid moduleId, Guid moduleInstanceId, string name)
        {
            IModuleDataRetriever dataRetriever = new ModuleInstanceDataRetriever(VixenSystem.ModuleStore.InstanceData);
            IOutputModuleConsumer <IPreviewModuleInstance> outputModuleConsumer = new OutputModuleConsumer <IPreviewModuleInstance>(moduleId, moduleInstanceId, dataRetriever);
            IHardware executionControl = new BasicOutputModuleExecutionControl(outputModuleConsumer.Module);

            // Yes, we are intentionally using the module instance id as the device id.
            // Previews are not referenced by id at runtime in the way that controllers are referenced for linking.
            // We foresee no conflicts in doing this.
            return(new OutputPreview(moduleInstanceId, name, executionControl, outputModuleConsumer));
        }