示例#1
0
 //Constructors
 public HDMISwitcher(uint ipId, string ipAddress, CrestronControlSystem device)
 {
     try
     {
         switcher = new HdMd4x14kE(ipId, ipAddress, device);
         //                 ^replace this line with the model of your switcher
         switcher.OnlineStatusChange += new OnlineStatusChangeEventHandler(switcher_OnlineStatusChange);
         switcher.DMSystemChange     += new DMSystemEventHandler(switcher_DMSystemChange);
         switcher.DMInputChange      += new DMInputEventHandler(switcher_DMInputChange);
         switcher.DMOutputChange     += new DMOutputEventHandler(switcher_DMOutputChange);
         switcher.AutoModeOff();
         //switcher.VideoEnter.BoolValue = true;
         switcher.FrontPanelLockOn();
         switcher.Register();
         for (uint i = 1; i <= 4; i++)
         {
             switcher.HdmiInputs[i].Name.StringValue = InputName[i - 1];
         }
         for (uint i = 1; i <= 4; i++)
         {
             CrestronConsole.PrintLine("Switcher Input:{0} and the name is {1}", i, switcher.HdmiInputs[i].Name.StringValue);
         }
         CrestronConsole.PrintLine("4x1 Constructor Switcher Registration status is: " + switcher.Registered);
     }
     catch (Exception e)
     {
         CrestronConsole.PrintLine("Error is the Switcher COnstructor is: " + e);
     }
 }
示例#2
0
        private void CreateSwitcher()
        {
            this.PrintFunctionName("CreateSwitcher");
            var config   = ControlSystem.Configs.Config.Switcher;
            var switcher = new HdMd4x14kE((uint)config.Connection.Port, config.Connection.Address, ProAvControlSystem.ControlSystem);

            ProAvControlSystem.CrestronNativeDevices.Add(config.Id, switcher);
        }
示例#3
0
        /////////////////////////////////////////////////////

        /// <summary>
        ///
        /// </summary>
        /// <param name="key"></param>
        /// <param name="name"></param>
        /// <param name="type"></param>
        /// <param name="properties"></param>
        /// <returns></returns>
        public static HdMdNxM4kEController GetController(string key, string name,
                                                         string type, HdMdNxM4kEPropertiesConfig properties)
        {
            try
            {
                var ipid    = properties.Control.IpIdInt;
                var address = properties.Control.TcpSshProperties.Address;

                type = type.ToLower();
                if (type == "hdmd4x14ke")
                {
                    var chassis = new HdMd4x14kE(ipid, address, Global.ControlSystem);
                    return(new HdMdNxM4kEController(key, name, chassis, properties));
                }
                return(null);
            }
            catch (Exception e)
            {
                Debug.Console(0, "ERROR Creating device key {0}: \r{1}", key, e);
                return(null);
            }
        }