//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); } }
public Mpc3TouchpanelController(string key, string name, CrestronControlSystem processor, Dictionary <string, KeypadButton> buttons) : base(key, name) { _Touchpanel = processor.ControllerTouchScreenSlotDevice as MPC3Basic; _Buttons = buttons; _Touchpanel.ButtonStateChange += new Crestron.SimplSharpPro.DeviceSupport.ButtonEventHandler(_Touchpanel_ButtonStateChange); AddPostActivationAction(() => { // Link up the button feedbacks to the specified BoolFeedbacks foreach (var button in _Buttons) { var feedbackConfig = button.Value.Feedback; var device = DeviceManager.GetDeviceForKey(feedbackConfig.DeviceKey) as Device; if (device != null) { var bKey = button.Key.ToLower(); var feedback = device.GetFeedbackProperty(feedbackConfig.FeedbackName); var bFeedback = feedback as BoolFeedback; var iFeedback = feedback as IntFeedback; if (bFeedback != null) { if (bKey == "power") { bFeedback.LinkCrestronFeedback(_Touchpanel.FeedbackPower); continue; } else if (bKey == "mute") { bFeedback.LinkCrestronFeedback(_Touchpanel.FeedbackMute); continue; } // Link to the Crestron Feedback corresponding to the button number bFeedback.LinkCrestronFeedback(_Touchpanel.Feedbacks[UInt16.Parse(button.Key)]); } else if (iFeedback != null) { if (bKey == "volumefeedback") { var volFeedback = feedback as IntFeedback; // TODO: Figure out how to subsribe to a volume IntFeedback and link it to the voluem volFeedback.LinkInputSig(_Touchpanel.VolumeBargraph); } } else { Debug.Console(1, this, "Unable to get BoolFeedback with name: {0} from device: {1}", feedbackConfig.FeedbackName, device.Key); } } else { Debug.Console(1, this, "Unable to get device with key: {0}", feedbackConfig.DeviceKey); } } }); }
public ILiveSmartAPI(CrestronControlSystem system) { this.cp3 = new CP3Smart(system); this.cp3.RegisterDevices(); this.light = new ILiveLight(system); this.light.RegisterDevices(); this.Curtains = new ILiveCurtains(); this.Curtains.RegisterDevices(); this.Muisc = new ILiveMusic(system); this.Muisc.RegisterDevices(); //IRACC接CP3 com1 ILiveComPort com = new ILiveComPort(system.ComPorts[1]); com.Register(); this.iracc = new ILiveIRACC(com); //this.iracc = new ILiveIRACC(system.ComPorts[1]); //this.cp3.CongPu.Push16IEvent += new ILiveCongPu.Push16IHandler(CongPu_Push16IEvent); }
public UXSystem(CrestronControlSystem controlSystem) { ControlSystem = controlSystem; this.Rooms = new RoomCollection(); this.Sources = new SourceCollection(); this.UserInterfaces = new UIControllerCollection(); }
public FireAlarmMonitorSystem(CrestronControlSystem controlSystem) : base(controlSystem) { try { if (controlSystem.NumberOfVersiPorts > 0) { controlSystem.VersiPorts[1].Register(); _fireAlarmMonitor = new FireAlarmMonitor(9002, 20, controlSystem.VersiPorts[1]); return; } if (controlSystem.NumberOfDigitalInputPorts > 0) { controlSystem.DigitalInputPorts[1].Register(); _fireAlarmMonitor = new FireAlarmMonitor(9002, 20, controlSystem.DigitalInputPorts[1]); return; } CloudLog.Error("Could not setup fire alarm interface! No io ports available"); } catch (Exception e) { CloudLog.Exception(e); } }
public ILiveLight(CrestronControlSystem system) { port = new UDPClient("192.168.188.21", 6004, 8004); port.NetDataReceived += new NetDataReceivedEventHandler(port_NetDataReceived); port.Connect(); isin6 = new ILiveIsinRelay(3, port); }
public AuditoriumSystem(CrestronControlSystem controlSystem) : base(controlSystem) { _codecs = new Dictionary <uint, CiscoTelePresenceCodec>(); var addresses = ConfigManager.Config.CodecAddresses; if (addresses == null) { return; } foreach (var address in addresses) { _codecs[address.Key] = new CiscoTelePresenceCodec(address.Value, ConfigManager.Config.CodecUsername, ConfigManager.Config.CodecPassword); _codecs[address.Key].Calls.CallIncoming += CallsOnCallIncoming; } _recorders.Add(1, new ExtronSmp("30.92.1.167", "admin")); _recorders.Add(2, new ExtronSmp("30.92.1.166", "admin")); var camConf = ConfigManager.Config.OneBeyondConfig.Cameras; if (camConf != null) { foreach (var cameraConfig in camConf) { _cameras[cameraConfig.Id] = new ViscaCamera(1, cameraConfig.IpAddress, 5500); } } }
public static List <Switch> GetAvSwitch(SystemConfiguration configObject, CrestronControlSystem master) { List <Switch> switchers = new List <Switch>(); try { Assembly switchAssembly = Assembly.LoadFrom(configObject.AvSwitchers.LibraryPath); foreach (AvSwitch sw in configObject.AvSwitchers.AvSwitch) { CType swt = switchAssembly.GetType(sw.ClassName); ConstructorInfo ci = swt.GetConstructor(new CType[] { typeof(UInt32), typeof(CrestronControlSystem) }); object swObject = ci.Invoke(new object[] { Convert.ToUInt32(sw.IpId), master }); Switch swCasted = (Switch)swObject; switchers.Add(swCasted); } //TODO Instantiate the AV Switch //TODO Get all Input cards //TODO Get all Output cards //TODO Get frame object //TODO add input cards to frame //TODO add output cards to frame } catch (Exception e) { ErrorLog.Error("Failed to retreive switcher data:\n{0} -- {1}\n", e.Message, e.StackTrace); } return(switchers); }
public ILiveMovie(CrestronControlSystem system) { this.controlSystem = system; this.comLight = new ILiveComPort(this.controlSystem.ComPorts[1]); this.comLight.Register(); this.comProjector = new ILiveComPort(this.controlSystem.ComPorts[2]); this.comProjector.Register(); this.relayPower = this.controlSystem.RelayPorts[1]; this.relayGolf = this.controlSystem.RelayPorts[2]; this.irTV = this.controlSystem.IROutputPorts[1]; this.irAV = this.controlSystem.IROutputPorts[2]; this.irBlueray = this.controlSystem.IROutputPorts[3]; this.irTV.LoadIRDriver(""); isin6 = new ILiveIsinRelay(comLight); this.tpc5 = new ILiveTPC5(comLight); // port = new UDPClient("192.168.188.22", 6004, 8004); // port.NetDataReceived += new NetDataReceivedEventHandler(port_NetDataReceived); // port.Connect(); // bigvivitek = new ILiveVivitek(port); }
//internal TsxCcsUcCodec100AudioReservedSigs tsxCcsUcCodec100AudioReservedSigs_0; //internal TsxCcsUcCodec100EthernetReservedSigs tsxCcsUcCodec100EthernetReservedSigs_0; //internal TswFtSystemReservedSigs tswFtSystemReservedSigs_0; //internal Tswx52System3ReservedSigs tswx52System3ReservedSigs_0; //internal Tswx52VoipReservedSigs tswx52VoipReservedSigs_0; //internal Tswx52VoiceControlReservedSigs tswx52VoiceControlReservedSigs_0; //internal TsxScreenSaverReservedSigs tsxScreenSaverReservedSigs_0; //internal Tstx02ApplicationControlReservedSigs tstx02ApplicationControlReservedSigs_0; internal Class63(uint uint_0, CrestronControlSystem crestronControlSystem_0) : base(uint_0, "127.0.0.1", crestronControlSystem_0) { this.DeviceRegistrationFlags = 9u; base.InitializeParamBitFieldOne(1400594u); base.InitializeParamBitFieldTwo(131328u); base.InitializeParamBitFieldThree(66u); base.InitializeParamBitFieldFour(0u); base.LockDeviceTypes(); base.InitializeDeviceSymbolType(-12); base.InitializeParametersOfDeviceRegistrationForEthernetDevices(); base.DeviceRegistrationMethod = 6u; Class63.Class64 deviceToAdd = new Class63.Class64(crestronControlSystem_0, this); CrestronDevice.AddToDeviceCollection(this.Slots, 1u, deviceToAdd); base.InitializeDigitalInputJoins(16000); base.InitializeDigitalOutputJoins(16000); base.InitializeAnalogInputJoins(16000); base.InitializeAnalogOutputJoins(16000); base.InitializeSerialInputJoins(16000); base.InitializeSerialOutputJoins(16000); // this.tsxCcsUcCodec100AudioReservedSigs_0 = new TsxCcsUcCodec100AudioReservedSigs(this); //this.tsxCcsUcCodec100EthernetReservedSigs_0 = new TsxCcsUcCodec100EthernetReservedSigs(this); //this.tswFtSystemReservedSigs_0 = new TswFtSystemReservedSigs(this); //this.tswx52System3ReservedSigs_0 = new Tswx52System3ReservedSigs(this); //this.tswx52VoipReservedSigs_0 = new Tswx52VoipReservedSigs(this); //this.tswx52VoiceControlReservedSigs_0 = new Tswx52VoiceControlReservedSigs(this); //this.tsxScreenSaverReservedSigs_0 = new TsxScreenSaverReservedSigs(this); //this.tstx02ApplicationControlReservedSigs_0 = new Tstx02ApplicationControlReservedSigs(this); }
public FusionAssetBase Add(CrestronControlSystem controlSystem) { uint newId = 0; for (uint id = 1; id <= 249; id++) { if (!this.Fusion.Room.Fusion.FusionRoom.UserConfigurableAssetDetails.Contains(id)) { newId = id; break; } } if (newId > 0) { this.Fusion.Room.Fusion.FusionRoom.AddAsset(eAssetType.StaticAsset, newId, controlSystem.ControllerPrompt, "Control Processor", Guid.NewGuid().ToString()); Assets[newId] = this.Fusion.Room.Fusion.FusionRoom.UserConfigurableAssetDetails[newId].Asset; ((FusionStaticAsset)Assets[newId]).AddSig(eSigType.String, 1, "IP Address", eSigIoMask.InputSigOnly); ((FusionStaticAsset)Assets[newId]).FusionGenericAssetSerialsAsset3.StringInput[1].StringValue = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, CrestronEthernetHelper.GetAdapterdIdForSpecifiedAdapterType(EthernetAdapterType.EthernetLANAdapter)); return(Assets[newId]); } return(null); }
public static void Initialize(CrestronControlSystem cs) { CrestronConsole.AddNewConsoleCommand(ListDeviceCommStatuses, "devcommstatus", "Lists the communication status of all devices", ConsoleAccessLevelEnum.AccessOperator); CrestronConsole.AddNewConsoleCommand(ListDeviceFeedbacks, "devfb", "Lists current feedbacks", ConsoleAccessLevelEnum.AccessOperator); CrestronConsole.AddNewConsoleCommand(ListDevices, "devlist", "Lists current managed devices", ConsoleAccessLevelEnum.AccessOperator); CrestronConsole.AddNewConsoleCommand(DeviceJsonApi.DoDeviceActionWithJson, "devjson", "", ConsoleAccessLevelEnum.AccessOperator); CrestronConsole.AddNewConsoleCommand(s => { CrestronConsole.ConsoleCommandResponse(DeviceJsonApi.GetProperties(s)); }, "devprops", "", ConsoleAccessLevelEnum.AccessOperator); CrestronConsole.AddNewConsoleCommand(s => { CrestronConsole.ConsoleCommandResponse(DeviceJsonApi.GetMethods(s)); }, "devmethods", "", ConsoleAccessLevelEnum.AccessOperator); CrestronConsole.AddNewConsoleCommand(s => { CrestronConsole.ConsoleCommandResponse(DeviceJsonApi.GetApiMethods(s)); }, "apimethods", "", ConsoleAccessLevelEnum.AccessOperator); CrestronConsole.AddNewConsoleCommand(SimulateComReceiveOnDevice, "devsimreceive", "Simulates incoming data on a com device", ConsoleAccessLevelEnum.AccessOperator); }
/// <summary> /// Initializes a new instance of the SystemManager class /// </summary> /// <param name="config">full config data</param> /// <param name="cs">CrestronControlSystem</param> public SystemManager(Configuration.ConfigData.Configuration config, CrestronControlSystem cs) { if (config.Touchpanels != null) { this.touchpanels = new Dictionary <string, BasicTriListWithSmartObject>(); // TODO: Level1. Implement touchPanel + sources + destinations foreach (var touchPanel in config.Touchpanels) { // TODO: Level1. Create new instance of TouchpanelUI // ! Don't forget to use Register() from TouchpanelUI class ! string type = touchPanel.Type; uint id = touchPanel.Id; string label = touchPanel.Label; this.tp = new TouchpanelUI(type, id, label, cs); if (this.tp.Register()) { ErrorLog.Info($"{LogHeader} created and registered tp {label}"); // TODO: Level1. Dynamically set up sources using the config file ErrorLog.Info($"{LogHeader} Nbr of Smart Object Sources: {config.Sources.Length}"); ErrorLog.Info($"{LogHeader} Nbr of Smart Object Destinations: {config.Destinations.Length}"); tp.UserInterface.SmartObjects[1].UShortInput["Set Number of Items"].UShortValue = (ushort)config.Sources.Length; for (var i = 0; i < config.Sources.Length; i++) { tp.UserInterface.SmartObjects[1].UShortInput[$"Set Item {i+1} Icon Analog"].UShortValue = config.Sources[i].Icon; tp.UserInterface.SmartObjects[1].StringInput[$"Set Item {i + 1} Text"].StringValue = config.Sources[i].Label; ErrorLog.Info($"{LogHeader} SOURCE: Set [Item {i+1} Icon Analog/Text] {config.Sources[i].Icon} {config.Sources[i].Label}"); } // TODO: Level1. Dynamically set up destinations using the config file tp.UserInterface.SmartObjects[2].UShortInput["Set Number of Items"].UShortValue = (ushort)config.Destinations.Length; ErrorLog.Info($"{LogHeader} Nbr of Smart Object Destinations: {config.Destinations.Length}"); for (var i = 0; i < config.Destinations.Length; i++) { tp.UserInterface.SmartObjects[2].UShortInput[$"Set Item {i+1} Icon Analog"].UShortValue = config.Destinations[i].Icon; tp.UserInterface.SmartObjects[2].StringInput[$"Set Item {i + 1} Text"].StringValue = config.Destinations[i].Label; ErrorLog.Info($"{LogHeader} DESTINATION: Set [Item {i+1} Icon Analog] {config.Destinations[i].Icon}"); } } else { ErrorLog.Error($"{LogHeader} Error created and registering tp {label}"); } // TODO: Level2. Implement the additional subsystem dynamically. // Please see Student Guide for more explanation. } } }
private AvSwitcher configData; // JSON object created from the configuration file. /// <summary> /// Prepare controller for creating the AV Switcher hardware representation. /// </summary> /// <param name="avData">The switch information gathered by parsing the JSON config file</param> /// <param name="control">The control processor that will manage all devices</param> /// <exception cref="ArgumentException">if any parameter is given a null argument.</exception> public AvSwitchController(AvSwitcher avData, CrestronControlSystem control) { if (avData == null || control == null) { throw new ArgumentException("Constructor arguments cannot be null."); } master = control; configData = avData; RoomBoxes = new List <EndpointReceiverBase>(); }
/// <summary> /// Initializes a new instance of the TouchpanelUI class /// </summary> /// <param name="type">Touchpanel type (ie. Tsw760)</param> /// <param name="id">IPID</param> /// <param name="label">Label you want to show up in the IPTable</param> /// <param name="cs">CrestronControlSystem</param> public TouchpanelUI(string type, uint id, string label, CrestronControlSystem cs) { this.Type = type; this.Id = id; this.Label = label; this.Cs = cs; }
public RoomMonitoringSystem(CrestronControlSystem controlSystem) : base(controlSystem) { var addresses = ConfigManager.Config.CodecAddresses; if (addresses == null) { return; } _codecAddresses = new ReadOnlyDictionary <uint, string>(addresses); }
internal Class64(CrestronControlSystem crestronControlSystem_0, CrestronDevice crestronDevice_0) : base(crestronDevice_0) { this.NotRegisterable = true; this.ID = 1u; base.InitializeParamBitFieldOne(1335040u); base.InitializeParamBitFieldTwo(196864u); base.InitializeParamBitFieldThree(81u); base.InitializeParamBitFieldFour(0u); base.InitializeDigitalOutputJoins(5); }
public CrestronConnectedDisplay(string name, uint ipId, CrestronControlSystem controlSystem) { Display = new RoomViewConnectedDisplay(ipId, controlSystem); Display.BaseEvent += new BaseEventHandler(Display_BaseEvent); if (Display.Register() != eDeviceRegistrationUnRegistrationResponse.Success) { ErrorLog.Error("Could not register CrestronConnectedDisplay with IP ID {0}", ipId.ToString("X2")); } this.Name = name; }
// Constructors public dmps3200General(CrestronControlSystem device) { try { device.DMSystemChange += new DMSystemEventHandler(device_DMSystemChange); dmControl = (Dmps3SystemControl)device.SystemControl; CrestronConsole.PrintLine("Dmps General Constructor and the lock status of the front panel is: " + dmControl.FrontPanelLockOnFeedback); } catch (Exception e) { CrestronConsole.PrintLine("DMPSRelay Constructor error is: " + e); } }
/// <summary> /// Initializes a new instance of the DmNvx class /// </summary> /// <param name="type">Touchpanel type (ie. Tsw760)</param> /// <param name="id">IPID</param> /// <param name="name">Label you want to show up in the IPTable + Name of endpoint</param> /// <param name="multicast">Multicast address of this NVX unit</param> /// <param name="nvxExchange">Needs to match an existing exchange</param> /// <param name="cs">CrestronControlSystem</param> public DmNvx(string type, uint id, string name, string multicast, string nvxExchange, CrestronControlSystem cs) { this.Type = type; this.Id = id; this.Name = name; this.Multicast = multicast; this.NvxExchange = nvxExchange; this.Cs = cs; CrestronEnvironment.ProgramStatusEventHandler += this.CrestronEnvironment_ProgramStatusEventHandler; }
/// <summary> /// Create an instance of a system for use on a CrestronControlSystem /// </summary> protected SystemBase(CrestronControlSystem controlSystem, Assembly appAssembly) { BootStatus = "Waiting for System.ctor()"; _controlSystem = controlSystem; _appAssembly = appAssembly; CrestronEnvironment.ProgramStatusEventHandler += type => { _programStopping = type == eProgramStatusEventType.Stopping; try { _systemWait.Set(); } catch (Exception e) { CloudLog.Error("Error calling _systemWait.Set() on program stop", e.Message); } try { _startupWait.Set(); } catch (Exception e) { CloudLog.Error("Error calling _startupWait.Set() on program stop", e.Message); } }; Displays = new DisplayCollection(); Sources = new SourceCollection(); Rooms = new RoomCollection(); UIControllers = new UIControllerCollection(this); Debug.WriteInfo("Checking for new app version"); AppIsNewVersion = CheckIfNewVersion(appAssembly); if (AppIsNewVersion) { Debug.WriteWarn("New Version", "version = {0}, running upgrade scripts...", appAssembly.GetName().Version.ToString()); // ReSharper disable once DoNotCallOverridableMethodsInConstructor AppShouldRunUpgradeScripts(); } CrestronConsole.AddNewConsoleCommand(parameters => FusionRVI.GenerateFileForAllFusionDevices(), "RviGenerate", "Create RVI file for Fusion", ConsoleAccessLevelEnum.AccessOperator); }
// try List or Array prop For Getting info? //public bool[] getRelays { get; set; } //Constructors public DMPSRelays(CrestronControlSystem device) { try { for (uint i = 1; i <= device.RelayPorts.Count; i++) { relays.Add(device.RelayPorts[i]); relays[(int)i - 1] = device.RelayPorts[i]; relays[(int)i - 1].Register(); relays[(int)i - 1].StateChange += new RelayEventHandler(DMPSRelays_StateChange); CrestronConsole.PrintLine("\nDMPs Relay, Constructor Registering, regitsering Relay #{0} and registration status is: {1}", i, relays[(int)i - 1].Registered); } } catch (Exception e) { CrestronConsole.PrintLine("DMPSRelay Constructor error is: " + e); } }
public CrestronConnectedDisplay(uint ipId, CrestronControlSystem controlSystem, string name) : base(name) { _display = new RoomViewConnectedDisplay(ipId, controlSystem) { Description = name }; _display.OnlineStatusChange += DisplayOnOnlineStatusChange; IpIdFactory.Block(ipId, IpIdFactory.DeviceType.Other); _display.BaseEvent += DisplayOnBaseEvent; var result = _display.Register(); if (result != eDeviceRegistrationUnRegistrationResponse.Success) { CloudLog.Error("Error trying to register device {0} with Id {1}, {2}", _display.GetType().Name, ipId, result); } }
public FusionManager(CrestronControlSystem cs, uint ipid, string roomName) { try { this.cs = cs; Trace("Constructor running."); // create new FusionRoom object string roomID = new Guid().ToString(); room = new FusionRoom(ipid, cs, roomName, roomID); // add assets AddAssets(); // add event handlers room.OnlineStatusChange += new OnlineStatusChangeEventHandler(OnlineStatusChange); room.FusionStateChange += new FusionStateEventHandler(FusionStateChange); room.FusionAssetStateChange += new FusionAssetStateEventHandler(AssetStateChange); // generate rvi file FusionRVI.GenerateFileForAllFusionDevices(); // attempt to register eDeviceRegistrationUnRegistrationResponse response = room.Register(); if (response == eDeviceRegistrationUnRegistrationResponse.Success) { Trace("Room registered successfully."); } else { Trace("Room failed to register: " + response); } } catch (Exception e) { string traceMessage = "Exception caught in constructor: " + e.Message + e.StackTrace; Trace(traceMessage); ErrorLog.Error(traceMessage); } }
public AirMediaDevice(uint ipId, CrestronControlSystem controlSystem, string deviceType, string description) { try { var type = typeof(Am101); if (!string.IsNullOrEmpty(deviceType)) { try { var assembly = Assembly.Load(typeof(Am200).AssemblyName()); type = assembly.GetType(deviceType).GetCType(); } catch { var assembly = Assembly.Load(typeof(Am101).AssemblyName()); type = assembly.GetType(deviceType).GetCType(); } } var ctor = type.GetConstructor(new CType[] { typeof(uint), typeof(CrestronControlSystem) }); _device = (GenericDevice)ctor.Invoke(new object[] { ipId, controlSystem }); _device.Description = description; _device.IpInformationChange += AmOnIpInformationChange; _device.OnlineStatusChange += AmOnOnlineStatusChange; if (_device is AmX00) { ((AmX00)_device).AirMedia.AirMediaChange += AirMediaOnAirMediaChange; } var regResult = _device.Register(); if (regResult != eDeviceRegistrationUnRegistrationResponse.Success) { CloudLog.Error("Error registering {0} with ID 0x{1}, {2}", _device.GetType().Name, _device.ID.ToString("X2"), regResult); } } catch (Exception e) { CloudLog.Exception(e, "Error loading Air Media Device"); } }
public ClassroomSystem(CrestronControlSystem controlSystem) : base(controlSystem) { _codecs = new Dictionary <uint, CiscoTelePresenceCodec>(); var addresses = ConfigManager.Config.CodecAddresses; if (addresses == null) { return; } foreach (var address in addresses) { _codecs[address.Key] = new CiscoTelePresenceCodec(address.Value, ConfigManager.Config.CodecUsername, ConfigManager.Config.CodecPassword); _codecs[address.Key].Calls.CallIncoming += CallsOnCallIncoming; } _recorders.Add(1, new ExtronSmp("30.93.1.142", "admin")); _recorders.Add(2, new ExtronSmp("30.93.1.141", "admin")); }
/// <summary> /// Create an instance of a Cisco VC Codec /// </summary> /// <param name="controlSystem"></param> /// <param name="hostNameOrIPAddress">The IP Address or hostname of the codec</param> /// <param name="username">Username to login to the system</param> /// <param name="password">Password to login to the system</param> /// <param name="ethernetAdapter">Ther EthernetAdapterType of the control system used to connect and receive data</param> /// <param name="feedbackListenerPort">The port to be used for the feedback server on the control system</param> /// <param name="feedbackSlot">The slot on the codec to use for registering feedback. Should be 1-4 (3 is reserved for TMS so avoid that value)</param> public CiscoCodec(CrestronControlSystem controlSystem, string hostNameOrIPAddress, string username, string password, EthernetAdapterType ethernetAdapter, int feedbackListenerPort, int feedbackSlot) { ControlSystem = controlSystem; HttpClient = new CodecHTTPClient(hostNameOrIPAddress, username, password); FeedbackServer = new CodecFeedbackServer(this, ethernetAdapter, feedbackListenerPort); FeedbackServer.ReceivedData += new CodecFeedbackServerReceiveEventHandler(FeedbackServer_ReceivedData); FeedbackServer.IncomingCallEvent += new CodecIncomingCallEventHandler(FeedbackServer_IncomingCallEvent); FeedbackServer.WidgetActionEvent += new CodecUserInterfaceWidgetActionEventHandler(FeedbackServer_WidgetActionEvent); FeedbackSlot = feedbackSlot; CrestronEnvironment.ProgramStatusEventHandler += new ProgramStatusEventHandler(CrestronEnvironment_ProgramStatusEventHandler); SystemUnit = new SystemUnit(this); SystemUnit.State.SystemStateChange += new SystemUnitStateSystemChangeEventHandler(State_SystemStateChange); Audio = new Audio(this); Calls = new Calls(this); Conference = new Conference(this); Network = new Network(this); Phonebook = new Phonebook(this); Cameras = new Cameras(this); Video = new Video(this); Capabilities = new Capabilities(this); Standby = new Standby(this); UserInterface = new UserInterface(this); }
public ArrayList GetIO = new ArrayList(); // Just Because I felt like using an Array List in case I ever need to Get or Poll Status //Constructors public DMPSIOS(CrestronControlSystem device) { try { for (uint i = 1; i <= device.DigitalInputPorts.Count; i++) { ioPorts.Add(device.DigitalInputPorts[i]); ioPorts[(int)i - 1] = device.DigitalInputPorts[i]; ioPorts[(int)i - 1].Register(); ioPorts[(int)i - 1].StateChange += new DigitalInputEventHandler(DMPSIOS_StateChange); CrestronConsole.PrintLine("\nDMPSIO, Constructor Registering, regitsering IO #{0} and registration status is: {1}", i, ioPorts[(int)i - 1].Registered); } GetIO.Add(getIO1); GetIO.Add(getIO2); GetIO.Add(getIO3); GetIO.Add(getIO4); } catch (Exception e) { CrestronConsole.PrintLine("In DMPSIO COnstructor Error is: " + e); } }
public DmMd8x8 DMFrame(uint paramIpId, CrestronControlSystem paramControlSystem) { _frame = new DmMd8x8(paramIpId, paramControlSystem); ErrorLog.Notice("TDS: this is inside the frame"); input1 = new DmcC(1, _frame); input2 = new DmcDvi(2, _frame); input3 = new DmcHd(3, _frame); input4 = new DmcS(4, _frame); input5 = new DmcC(5, _frame); input6 = new Dmc4kHd(6, _frame); input7 = new DmcVga(7, _frame); input8 = new DmcStr(8, _frame); output1_2 = new Dmc4kCoHdSingle(1, _frame); output3_4 = new Dmc4kHdoSingle(2, _frame); output5_6 = new DmcStroSingle(3, _frame); output7_8 = new DmcCoHdSingle(4, _frame); _frame.VideoEnter.BoolValue = true; return(_frame); }
public MC3Smart(CrestronControlSystem system) { this.controlSystem = system; }