Example #1
0
        public void IntrinsicBehaviors()
        {
            if (RestrictionDevice != null)
            {
                RegisterBehavior(new Behaviors.Filter(CommandType.On,
                                                      RestrictionDevice,
                                                      RestrictionState));
            }

            var defaultMap = new Behaviors.MapCommand(primaryInput: CommandType.Motion,
                                                      primaryOutput: CommandType.On);

            defaultMap.Add(primaryInput: CommandType.Still, primaryOutput: CommandType.Off);
            defaultMap.Add(primaryInput: CommandType.Dark, primaryOutput: CommandType.On);
            defaultMap.Add(primaryInput: CommandType.Light, primaryOutput: CommandType.Off);

            if (IdleCommandPrimary != null)
            {
                defaultMap.Add(primaryInput: CommandType.On,
                               primaryOutput: IdleCommandPrimary,
                               secondaryOutput: IdleCommandSecondary,
                               delaySecs: IdleTimeSecs);
            }

            RegisterBehavior(defaultMap);
        }
Example #2
0
        public void IntrinsicBehaviors()
        {
            var defaultMap = new Behaviors.MapCommand();

            defaultMap.Add(primaryInput: CommandType.On, primaryOutput: CommandType.Notify);

            RegisterBehavior(defaultMap);
        }
Example #3
0
        public void IntrinsicBehaviors()
        {
            var defaultMap = new Behaviors.MapCommand();

            if (!IsInverted)
            {
                defaultMap.Add(primaryInput: CommandType.On, primaryOutput: CommandType.Open);
                defaultMap.Add(primaryInput: CommandType.Off, primaryOutput: CommandType.Close);
            }
            else
            {
                defaultMap.Add(primaryInput: CommandType.On, primaryOutput: CommandType.Close);
                defaultMap.Add(primaryInput: CommandType.Off, primaryOutput: CommandType.Open);
            }
            RegisterBehavior(defaultMap);
        }
Example #4
0
 public void SetUp()
 {
     _m = new MapCommand(primaryInput: CommandType.On,
                         primaryOutput: CommandType.Off);
 }