Beispiel #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="featuresOrError"></param>
 /// <param name="count"></param>
 /// <param name="sector"></param>
 /// <param name="cylinder"></param>
 /// <param name="deviceOrHead"></param>
 /// <param name="command"></param>
 /// <param name="reserved"></param>
 public ATA_TASK_FILE(byte featuresOrError, byte count, byte sector, ushort cylinder, byte deviceOrHead, AtaCommand command, byte reserved)
 {
     Error        = (AtaError)(Features = featuresOrError);
     Count        = count;
     Sector       = sector;
     Cylinder     = cylinder;
     DeviceOrHead = deviceOrHead;
     Status       = (AtaStatus)(Command = command);
     Reserved     = reserved;
 }
Beispiel #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="featuresOrError"></param>
 /// <param name="count"></param>
 /// <param name="logicalBlockAddress"></param>
 /// <param name="deviceOrHead"></param>
 /// <param name="command"></param>
 /// <param name="reserved"></param>
 /// <exception cref="ArgumentOutOfRangeException"></exception>
 public ATA_TASK_FILE(byte featuresOrError, byte count, uint logicalBlockAddress, byte deviceOrHead, AtaCommand command, byte reserved) : this(featuresOrError, count, (byte)(logicalBlockAddress & 0xFF), (ushort)((logicalBlockAddress >> 8) & 0xFFFF), deviceOrHead, command, reserved)
 {
     if ((logicalBlockAddress & unchecked (0xFF000000)) != 0)
     {
         throw new ArgumentOutOfRangeException(nameof(logicalBlockAddress), logicalBlockAddress, @"Logical block address must only use the lower 3 bytes.");
     }
 }
Beispiel #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="command"></param>
 public ATA_TASK_FILE(AtaCommand command) : this(0, 0, 0, 0, 0, command, 0)
 {
 }