/// <summary> /// The constructor for the mode table object. It builds the mode table from /// the raw reply buffer from the SCSI device. /// </summary> /// <param name="buffer"></param> /// <param name="size"></param> public ModeTable(IntPtr buffer, int size): base(buffer, size) { ushort len = Get16(0); ushort index = ModeTableHeaderSize; Pages = new List<ModePage>(); while (index < len && index < size) { int b0 = Get8(index) & 0x3f; ModePage page ; if (b0 == 0x05) page = new WriteParameterModePage(buffer, size, ref index) ; else page = new ModePage(buffer, size, ref index); Pages.Add(page); } }