Пример #1
0
 void HdmiIn_StreamChange(Crestron.SimplSharpPro.DeviceSupport.Stream stream, Crestron.SimplSharpPro.DeviceSupport.StreamEventArgs args)
 {
     if (args.EventId == DMInputEventIds.SourceSyncEventId)
     {
         HdmiVideoSyncDetectedFeedback.FireUpdate();
     }
 }
Пример #2
0
        public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
        {
            var joinMap = new AirMediaControllerJoinMap();

            var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);

            if (!string.IsNullOrEmpty(joinMapSerialized))
            {
                joinMap = JsonConvert.DeserializeObject <AirMediaControllerJoinMap>(joinMapSerialized);
            }

            joinMap.OffsetJoinNumbers(joinStart);

            Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
            Debug.Console(0, "Linking to Airmedia: {0}", Name);

            trilist.StringInput[joinMap.Name].StringValue = Name;

            var commMonitor = this as ICommunicationMonitor;

            commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);

            IsInSessionFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsInSession]);
            HdmiVideoSyncDetectedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.HdmiVideoSync]);

            trilist.SetSigTrueAction(joinMap.AutomaticInputRoutingEnabled, AirMedia.DisplayControl.EnableAutomaticRouting);
            trilist.SetSigFalseAction(joinMap.AutomaticInputRoutingEnabled, AirMedia.DisplayControl.DisableAutomaticRouting);
            AutomaticInputRoutingEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AutomaticInputRoutingEnabled]);

            trilist.SetUShortSigAction(joinMap.VideoOut, (u) => SelectVideoOut(u));

            VideoOutFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoOut]);
            ErrorFeedback.LinkInputSig(trilist.UShortInput[joinMap.ErrorFB]);
            NumberOfUsersConnectedFeedback.LinkInputSig(trilist.UShortInput[joinMap.NumberOfUsersConnectedFB]);

            trilist.SetUShortSigAction(joinMap.LoginCode, (u) => AirMedia.AirMedia.LoginCode.UShortValue = u);
            LoginCodeFeedback.LinkInputSig(trilist.UShortInput[joinMap.LoginCode]);

            ConnectionAddressFeedback.LinkInputSig(trilist.StringInput[joinMap.ConnectionAddressFB]);
            HostnameFeedback.LinkInputSig(trilist.StringInput[joinMap.HostnameFB]);
            SerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.SerialNumberFeedback]);
        }