/// <summary>
        /// Posts the full status of the room to the server
        /// </summary>
        /// <param name="room"></param>
        void SendFullStatus(EssentialsRoomBase room)
        {
            var sourceKey = room is IHasCurrentSourceInfoChange ? (room as IHasCurrentSourceInfoChange).CurrentSourceInfoKey : null;

            var rmVc    = room as IHasCurrentVolumeControls;
            var volumes = new Volumes();

            if (rmVc != null)
            {
                var vc = rmVc.CurrentVolumeControls as IBasicVolumeWithFeedback;
                if (vc != null)
                {
                    volumes.Master = new Volume("master", vc.VolumeLevelFeedback.UShortValue, vc.MuteFeedback.BoolValue, "Volume", true, "");
                }
            }

            PostStatusMessage(new
            {
                //calls = GetCallsMessageObject(),
                isOn = room.OnFeedback.BoolValue,
                selectedSourceKey = sourceKey,
                //vtc = GetVtcCallsMessageObject(),
                volumes = volumes
            });
        }
Example #2
0
 void room_CurrentSourceInfoChange(EssentialsRoomBase room, SourceListItem info, ChangeType type)
 {
     if (type == ChangeType.WillChange && info == SourceItem)
     {
         ClearFeedback();
     }
     else if (type == ChangeType.DidChange && info == SourceItem)
     {
         SetFeedback();
     }
 }
Example #3
0
        public EssentialsRoomEmergencyContactClosure(string key, EssentialsRoomEmergencyConfig config, EssentialsRoomBase room) :
            base(key)
        {
            Room = room;
            var cs = Global.ControlSystem;

            if (config.Trigger.Type.Equals("contact", StringComparison.OrdinalIgnoreCase))
            {
                var portNum = (uint)config.Trigger.Number;
                if (portNum <= cs.NumberOfDigitalInputPorts)
                {
                    cs.DigitalInputPorts[portNum].Register();
                    cs.DigitalInputPorts[portNum].StateChange += EsentialsRoomEmergencyContactClosure_StateChange;
                }
            }
            Behavior       = config.Behavior;
            TriggerOnClose = config.Trigger.TriggerOnClose;
        }
 void SetUpGear(IAVDriver avDriver, EssentialsRoomBase currentRoom)
 {
     // Gear
     TriList.SetString(UIStringJoin.HeaderButtonIcon5, "Gear");
     TriList.SetSigHeldAction(UIBoolJoin.HeaderIcon5Press, 2000,
                              avDriver.ShowTech,
                              null,
                              () =>
     {
         if (currentRoom.OnFeedback.BoolValue)
         {
             avDriver.PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.VolumesPageVisible);
             CaretInterlock.ShowInterlocked(UIBoolJoin.HeaderCaret5Visible);
         }
         else
         {
             avDriver.PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.VolumesPagePowerOffVisible);
             CaretInterlock.ShowInterlocked(UIBoolJoin.HeaderCaret5Visible);
         }
     });
     TriList.SetSigFalseAction(UIBoolJoin.TechExitButton, () =>
                               avDriver.PopupInterlock.HideAndClear());
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="parent"></param>
 /// <param name="room"></param>
 public MobileConrolEssentialsHuddleSpaceRoomBridge(EssentialsRoomBase room) :
     base("mobileControlBridge-essentialsHuddle", "Essentials Mobile Control Bridge-Huddle")
 {
     Room = room;
 }
Example #6
0
        /// <summary>
        /// Gets and operating, standalone emergegncy object that can be plugged into a room.
        /// Returns null if there is no emergency defined
        /// </summary>
        public static EssentialsRoomEmergencyBase GetEmergency(EssentialsRoomPropertiesConfig props, EssentialsRoomBase room)
        {
            // This emergency
            var emergency = props.Emergency;

            if (emergency != null)
            {
                //switch on emergency type here.  Right now only contact and shutdown
                var e = new EssentialsRoomEmergencyContactClosure(room.Key + "-emergency", props.Emergency, room);
                DeviceManager.AddDevice(e);
            }
            return(null);
        }