Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="buffer"></param>
        /// <param name="offset"></param>
        /// <param name="size"></param>
        public SpeedDescriptor(IntPtr buffer, int offset, int size)
            : base(buffer, size)
        {
            byte b = Get8(offset);

            if (((b & 0x03) >> 3 == 0))
            {
                WRC = Device.RotationalControl.CLVandNonPureCav;
            }
            else if (((b & 0x03) >> 3) == 1)
            {
                WRC = Device.RotationalControl.PureCav;
            }

            if ((b & 0x02) == 0)
            {
                Exact = false;
            }
            else
            {
                Exact = true;
            }

            if ((b & 0x01) == 0)
            {
                MRW = false;
            }
            else
            {
                MRW = true;
            }

            EndLBA     = Get32(offset + 4);
            ReadSpeed  = Get32Int(offset + 8);
            WriteSpeed = Get32Int(offset + 12);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="buffer"></param>
        /// <param name="offset"></param>
        /// <param name="size"></param>
        public SpeedDescriptor(IntPtr buffer, int offset, int size)
            : base(buffer, size)
        {
            byte b = Get8(offset);

            if (((b & 0x03) >> 3 == 0))
                WRC = Device.RotationalControl.CLVandNonPureCav ;
            else if (((b & 0x03) >> 3) == 1)
                WRC = Device.RotationalControl.PureCav ;

            if ((b & 0x02) == 0)
                Exact = false ;
            else
                Exact = true ;

            if ((b & 0x01) == 0)
                MRW = false ;
            else
                MRW = true ;

            EndLBA = Get32(offset + 4);
            ReadSpeed = Get32Int(offset + 8);
            WriteSpeed = Get32Int(offset + 12);
        }