Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance.
        /// </summary>
        /// <param name="zone"></param>
        /// <param name="keypadId"></param>
        internal RnetZoneRemoteDevice(RnetZone zone, RnetKeypadId keypadId)
            : base(zone.Controller.Bus)
        {
            Contract.Requires<ArgumentNullException>(zone != null);
            Contract.Requires<ArgumentNullException>(zone.Controller != null);
            Contract.Requires<ArgumentNullException>(zone.Controller.Bus != null);

            Zone = zone;
            Id = keypadId;
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance.
        /// </summary>
        internal RnetLocalDevice(RnetZone zone, RnetKeypadId keypadId)
            : base(zone.Bus)
        {
            Contract.Requires<ArgumentNullException>(zone != null);

            if (keypadId >= 0x7c && keypadId <= 0x7f)
                throw new ArgumentOutOfRangeException("id", "RnetKeypadId cannot be in a reserved range.");
            
            Zone = zone;
            Id = keypadId;
        }