Exemplo n.º 1
0
        public List <Device> GetDevices()
        {
            List <Device> deviceList = new List <Device>();

            Device device = new Device("Crestron control panel", "digitalsignal", "", DateTime.Now, "HomeOS.Hub.Drivers.DigitalMedia", true);
            //intialize the parameters for this device
            DigitalMediaPanelDescription parameters = this.dmConfig.GetPanelDescriptions.FirstOrDefault <DigitalMediaPanelDescription>();

            device.DeviceIpAddress      = parameters.IPAddress;
            device.NeedsCredentials     = true;
            device.Details.DriverParams = new List <string>()
            {
                device.UniqueName, parameters.IPAddress,
                parameters.IPID.ToString(), parameters.IPPort.ToString(), parameters.UserName, parameters.Password, parameters.UseSSL.ToString()
            };
            device.Details.Configured = false;
            deviceList.Add(device);

            return(deviceList);

            /*
             * DigitalMediaPanelDescription parameters = this.dmConfig.GetPanelDescriptions.FirstOrDefault<DigitalMediaPanelDescription>();
             * Device device = new Device("crestron_panel", "crestron_panel_" + parameters.IPID,
             *    "", DateTime.Now, "HomeOS.Hub.Drivers.DigitalMedia"); //parameters.IPAddress,true
             * //intialize the parameters for this device
             *
             * device.Details.DriverParams = new List<string>() { device.UniqueName, device.DeviceIpAddress,
             *    parameters.IPID.ToString(), parameters.IPPort.ToString(),
             *    parameters.UserName, parameters.Password, parameters.UseSSL.ToString()};
             * device.Details.Configured = false;
             * return new List<Device>() { device };
             * */
        }
Exemplo n.º 2
0
        public DigitalMediaConfiguration(string baseDir, ScoutViewOfPlatform platform, VLogger logger)
        {
            //TODO: Read XML configuratoin file

            DigitalMediaPanelDescription myDummyPannel = new DigitalMediaPanelDescription(IPID: "77", IPAddress: "10.101.50.61",
                                                                                          IPPort: 41794, UserName: "", Password: "", UseSSL: false);

            /*  DigitalMediaSignalDescription myDummySignal = new DigitalMediaSignalDescription(Name:"Mydigitalsignal1",
             *
             *    Driver: "HomeOS.Hub.Drivers.DigitalMedia", Join: "0", Slot: "1");
             * myDummyPannel.AddSignalDescription(myDummySignal);*/


            dmConnections.Add(myDummyPannel);
        }
Exemplo n.º 3
0
        internal ActiveCNXConnection(DigitalMediaPanelDescription connectionDescription, VLogger logger)
        {
            this.logger         = logger;
            this.acnxConnection = new ActiveCNX();

            // Define event handlers for the various events that are generated by ActiveCNX.NET
            this.acnxConnection.onConnect    += new Crestron.ActiveCNX.ActiveCNXConnectionEventHandler(acnxConnection_onConnect);
            this.acnxConnection.onDisconnect += new Crestron.ActiveCNX.ActiveCNXConnectionEventHandler(acnxConnection_onDisconnect);
            this.acnxConnection.onError      += new Crestron.ActiveCNX.ActiveCNXErrorEventHandler(acnxConnection_onError);

            /*	  this.acnxConnection.onAnalog +=new Crestron.ActiveCNX.ActiveCNXEventHandler(acnxConnection_onAnalog);
             * this.acnxConnection.onDigital += new Crestron.ActiveCNX.ActiveCNXEventHandler(acnxConnection_onDigital);
             * this.acnxConnection.onSerial += new Crestron.ActiveCNX.ActiveCNXEventHandler(acnxConnection_onSerial);
             * this.acnxConnection.onCertVerification += new Crestron.ActiveCNX.ActiveCNXCertificateEventHandler(acnxConnection_onCertVerification);
             * */
            if ((connectionDescription.IPAddress != null) && (connectionDescription.IPPort > 0))
            {
                /*  this.acnxConnection.Connect(connectionDescription.IPAddress,
                 *    connectionDescription.IPID, connectionDescription.UserName, connectionDescription.Password,
                 *    connectionDescription.IPPort, connectionDescription.UseSSL, 0, 0);*/
            }
        }