Beispiel #1
0
        internal override void UpdateProperties(Dictionary <string, Dictionary <string, string> > properties)
        {
            base.UpdateProperties(properties);

            try
            {
                if (properties.ContainsKey("hdmiInput"))
                {
                    HdmiInput.UpdateFromProperties(properties["hdmiInput"]);
                }
            }
            catch (Exception e)
            {
                CloudLog.Error("Error processing property values in {0}, {1}", GetType().Name, e.Message);
            }

#if DEBUG
            CrestronConsole.PrintLine("Updated {0}, \"{1}\": State: {2}", GetType().Name, Name, State);
            if (State != DeviceState.Up)
            {
                return;
            }
            CrestronConsole.PrintLine("   Uptime: {0}", UpTime.ToPrettyFormat());
            CrestronConsole.PrintLine("   HdmiInput: {0}{1}{2}",
                                      HdmiInput.Connected ? "Connected" : "Disconnected",
                                      HdmiInput.Connected ? " " + HdmiInput.Format : "",
                                      HdmiInput.Connected ? " HDCP: " + HdmiInput.Hdcp : "",
                                      HdmiInput.Connected ? " HDMI 2.0: " + HdmiInput.Hdmi2Point0 : "");
#endif
        }
Beispiel #2
0
        internal override void UpdateProperties(Dictionary <string, Dictionary <string, string> > properties)
        {
            base.UpdateProperties(properties);

            try
            {
                if (properties.ContainsKey("connectedEncoder"))
                {
                    var values = properties["connectedEncoder"];

                    if (Server.Devices.Any(d => d.MacAddress == values["mac"]))
                    {
                        _connectedEncoder = Server.Devices[values["mac"]] as ZeeVeeEncoder;
                    }
                    else
                    {
                        _connectedEncoder = null;
                    }
                    ReceivingVideoFromEncoder = (values["receivingVideoFromEncoder"] == "yes");
                }

                if (properties.ContainsKey("hdmiOutput"))
                {
                    HdmiOutput.UpdateFromProperties(properties["hdmiOutput"]);
                }
            }
            catch (Exception e)
            {
                CloudLog.Exception("Error processing property values", e);
            }

#if DEBUG
            CrestronConsole.PrintLine("Updated {0}, \"{1}\": State: {2}", GetType().Name, Name, State);
            if (State != DeviceState.Up)
            {
                return;
            }
            CrestronConsole.PrintLine("   Uptime: {0}", UpTime.ToPrettyFormat());
            if (ConnectedEncoder != null)
            {
                CrestronConsole.PrintLine("   Connected Encoder: {0}, Receiving Video: {1}", ConnectedEncoder.Name,
                                          ReceivingVideoFromEncoder);
            }
            CrestronConsole.PrintLine("   HdmiOutput: {0}{1}{2}",
                                      HdmiOutput.Connected ? "Connected" : "Disconnected",
                                      HdmiOutput.Connected ? " " + HdmiOutput.Format : "",
                                      HdmiOutput.Connected ? " HDCP: " + HdmiOutput.Hdcp : "",
                                      HdmiOutput.Connected ? " HDMI 2.0: " + HdmiOutput.Hdmi2Point0 : "");
            if (HdmiOutput.Connected)
            {
                CrestronConsole.PrintLine("   Edid Status: {0}", HdmiOutput.EdidStatus);
            }
#endif
        }