/// <summary>
        /// Initializes a new instance of the CpuPciConfigReadRequest class.
        /// </summary>
        internal CpuPciConfigReadRequest(byte cpuNumber, bool localspace,
                                         byte busNumber, byte deviceNumber, byte function, byte[] register, byte readLenght)
        {
            this.cpuNumber = (byte)(cpuNumber & 0x03);

            if (localspace)
            {
                this.cpuNumber = (byte)(cpuNumber | 0x40);
            }

            BitArray address = new BitArray(pciAddress);

            // register address byte 1 [0-7].
            IpmiSharedFunc.UpdateBitArray(ref address, 0, 7, register[0]);

            // register address byte 2 [8-11]
            IpmiSharedFunc.UpdateBitArray(ref address, 8, 11, register[1]);

            // function [12-14]
            IpmiSharedFunc.UpdateBitArray(ref address, 12, 14, function);

            // Device Number [15-19]
            IpmiSharedFunc.UpdateBitArray(ref address, 15, 19, deviceNumber);

            // Bus Number [20-27]
            IpmiSharedFunc.UpdateBitArray(ref address, 20, 27, busNumber);

            // copy all bits to byte array
            address.CopyTo(pciAddress, 0);

            this.readLenght = (byte)(readLenght & 0x03);
        }
        /// <summary>
        /// Initializes a new instance of the CpuIaMsrReadRequest class.
        /// </summary>
        internal CpuIaMsrReadRequest(byte cpuNumber, byte threadId, byte[] msrAddress, byte readLenght)
        {
            this.cpuNumber = (byte)(cpuNumber & 0x03);

            this.threadId = threadId;

            BitArray address = new BitArray(pciAddress);

            // register address byte 1 [0-7].
            IpmiSharedFunc.UpdateBitArray(ref address, 0, 7, msrAddress[0]);

            // register address byte 2 [8-11]
            IpmiSharedFunc.UpdateBitArray(ref address, 8, 15, msrAddress[1]);

            // copy all bits to byte array
            address.CopyTo(pciAddress, 0);

            this.readLenght = (byte)(readLenght & 0x03);
        }