Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of class <see cref="XBeeAPIPacket"/> with the
        /// specified <paramref name="frameType"/>.
        /// </summary>
        /// <param name="frameType">XBee packet frame type.</param>
        protected XBeeAPIPacket(APIFrameType frameType)
            : base()
        {
            FrameType      = frameType;
            FrameTypeValue = frameType.GetValue();

            logger = LogManager.GetLogger <XBeeAPIPacket>();
        }
        /// <summary>
        /// Initializes a new instance of class <see cref="XBeeAPIPacket"/> with the specified <paramref name="frameType"/>.
        /// </summary>
        /// <param name="frameType">XBee packet frame type.</param>
        /// <exception cref="ArgumentNullException">if <paramref name="frameType"/> is null.</exception>
        protected XBeeAPIPacket(APIFrameType frameType)
            : base()
        {
            Contract.Requires<ArgumentNullException>(frameType != APIFrameType.UNKNOWN, "Frame type cannot be unknown.");

            this.FrameType = frameType;
            FrameTypeValue = frameType.GetValue();

            this.logger = LogManager.GetLogger<XBeeAPIPacket>();
        }
Exemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of class <see cref="XBeeAPIPacket"/> with the specified <paramref name="frameType"/>.
        /// </summary>
        /// <param name="frameType">XBee packet frame type.</param>
        /// <exception cref="ArgumentNullException">if <paramref name="frameType"/> is null.</exception>
        protected XBeeAPIPacket(APIFrameType frameType)
            : base()
        {
            Contract.Requires <ArgumentNullException>(frameType != APIFrameType.UNKNOWN, "Frame type cannot be unknown.");

            this.FrameType = frameType;
            FrameTypeValue = frameType.GetValue();

            this.logger = LogManager.GetLogger <XBeeAPIPacket>();
        }