User Tools

Site Tools


ch10_handbook:data_retrieval

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ch10_handbook:data_retrieval [2014/04/11 21:46]
bob
ch10_handbook:data_retrieval [2014/05/29 14:34]
bob
Line 1: Line 1:
 +~~ODT~~
 ===== DATA RETRIEVAL ===== ===== DATA RETRIEVAL =====
  
Line 35: Line 36:
    
 The SCSI INQUIRY command is used to query the SCSI device about its capabilities. ​ The SCSI INQUIRY command is used to query the SCSI device about its capabilities. ​
-The structure ​for the INQUIRY CDB is shown in Figure 4-1. The structure for the Control field  +The structures ​for the INQUIRY CDB and the Control field are shown below
-is shown in Figure 4-2. The data download interface is required to support the standard  +
-INQUIRY response shown in Figure 4-3. Also required are the Supported Vital Product page,  +
-Unit Serial Number page, and Device Identification page.+
  
 <​code>​ <​code>​
Line 53: Line 51:
     };      }; 
 </​code>​ </​code>​
-Figure 4-1. SCSI INQUIRY CDB structure+ 
 +<​html><​center><​b>​ 
 +SCSI INQUIRY CDB structure 
 +</​b></​center></​html> ​
  
 <​code>​ <​code>​
Line 65: Line 66:
     };      }; 
 </​code>​ </​code>​
-Figure 4-2. SCSI CDB Control field structure.+ 
 +<​html><​center><​b>​ 
 +SCSI CDB Control field structure 
 +</​b></​center></​html>​  
 + 
 +The data download interface is required to support the standard INQUIRY response shown in the structure below. Also required are the Supported Vital Product page, Unit Serial Number page, and Device Identification page.
  
 <​code>​ <​code>​
Line 103: Line 109:
     };      }; 
 </​code>​ </​code>​
-Figure 4-3. SCSI INQUIRY data structure+ 
 +<​html><​center><​b>​ 
 +SCSI INQUIRY data structure 
 +</​b></​center></​html> ​
  
 The SCSI READ CAPACITY command is used to query the disk device about its size.  The SCSI READ CAPACITY command is used to query the disk device about its size. 
-The structure for the READ CAPACITY CDB is shown in Figure 4-4. This command returns  +The structure for the READ CAPACITY CDB is shown below
-the number of available logical blocks and the logical block size in bytes, shown in Figure 4-5.  +
-Note that returned values are big endian and must be byte swapped before they can be used on a  +
-little endian processor.+
  
 <​code>​ <​code>​
Line 127: Line 133:
     };      }; 
 </​code>​ </​code>​
-Figure 4-4. SCSI READ CAPACITY CDB structure. ​+ 
 +<​html><​center><​b>​ 
 +SCSI READ CAPACITY CDB structure. ​ 
 +</​b></​center></​html> ​
    
 +This command returns the number of available logical blocks and the logical block size in bytes, shown in the structure below. ​ Note that returned values are big endian and must be byte swapped before they can be used on a little endian processor.
 +
 <​code>​ <​code>​
 struct SuCdbReadCapacityData ​ struct SuCdbReadCapacityData ​
Line 136: Line 147:
     };      }; 
 </​code>​ </​code>​
-Figure 4-5. SCSI READ CAPACITY data structure+ 
 +<​html><​center><​b>​ 
 +SCSI READ CAPACITY data structure 
 +</​b></​center></​html> ​
  
 The SCSI READ command is used to read logical blocks of data from the disk device. ​ The SCSI READ command is used to read logical blocks of data from the disk device. ​
 The SCSI protocol provides five different READ commands with various capabilities and sizes  The SCSI protocol provides five different READ commands with various capabilities and sizes 
 of the CDB. The Chapter 10 standard only requires the 10 byte variant of the READ command. ​ of the CDB. The Chapter 10 standard only requires the 10 byte variant of the READ command. ​
-The structure for the READ CDB is shown in Figure 4-6. This command returns the data from +The structure for the READ CDB is shown below. This command returns the data from 
 the requested logical blocks. the requested logical blocks.
  
Line 165: Line 179:
     };      }; 
 </​code>​ </​code>​
-Figure 4-6. SCSI READ(10) CDB structure.+ 
 +<​html><​center><​b>​ 
 +SCSI READ(10) CDB structure 
 +</​b></​center></​html> ​
  
 === IEEE 1394 === === IEEE 1394 ===
Line 296: Line 313:
 structure. ​ structure. ​
    
-The SCSI_PASS_THROUGH structure is shown in Figure 4-7.+The SCSI_PASS_THROUGH structure is shown below.
  
 <​code>​ <​code>​
Line 315: Line 332:
     }      } 
 </​code>​ </​code>​
-Figure 4-7. SCSI_PASS_THROUGH structure+ 
 +<​html><​center><​b>​ 
 +SCSI_PASS_THROUGH structure 
 +</​b></​center></​html> ​
  
 The structures SCSI_PASS_THROUGH and SCSI_PASS_THROUGH_DIRECT are  The structures SCSI_PASS_THROUGH and SCSI_PASS_THROUGH_DIRECT are 
Line 376: Line 396:
 be any arbitrary block number. ​ be any arbitrary block number. ​
    
-A STANAG 4575 directory block has the structure shown in Figure 4-8. IRIG 106-03 ​+A STANAG 4575 directory block has the structure shown below. IRIG 106-03 ​
 and IRIG 106-04 defined the STANAG 4575 directory data as “little-endian.” Subsequent IRIG  and IRIG 106-04 defined the STANAG 4575 directory data as “little-endian.” Subsequent IRIG 
 106 versions have defined directory data as “big-endian.” Applications can test the  106 versions have defined directory data as “big-endian.” Applications can test the 
Line 382: Line 402:
 being used. If big-endian is being used, multi-byte values will need to be byte swapped before ​ being used. If big-endian is being used, multi-byte values will need to be byte swapped before ​
 they can be used on a little endian processor such as an Intel x86 found in desktop computers. ​ they can be used on a little endian processor such as an Intel x86 found in desktop computers. ​
-The various fields in the directory block are covered in detail in the Chapter 10 standard. The  +The various fields in the directory block are covered in detail in the Chapter 10 standard. ​
-asuFileEntry[] array holds information about individual files. Its structure is shown in  +
-Figure 4-9. The size of the asuFileEntry[] array will vary depending on the disk block  +
-size. For a size of 512 bytes per disk block, the asuFileEntry[] array will have four  +
-elements.+
  
 <​code>​ <​code>​
Line 402: Line 418:
     };      }; 
 </​code> ​ </​code> ​
-Figure 4-8. STANAG 4575 Directory Block structure. ​+ 
 +<​html><​center><​b>​ 
 +STANAG 4575 Directory Block structure 
 +</​b></​center></​html>​  
 + 
 +The asuFileEntry[] array holds information about individual files. Its structure is shown below. The size of the asuFileEntry[] array will vary depending on the disk block size. For a size of 512 bytes per disk block, the asuFileEntry[] array will have four  
 +elements.
  
 <​code>​ <​code>​
Line 418: Line 440:
     };      }; 
 </​code>​ </​code>​
-Figure 4-9. STANAG 4575 File Entry structure+ 
 +<​html><​center><​b>​ 
 +STANAG 4575 File Entry structure 
 +</​b></​center></​html> ​
  
 A complete disk file directory is read starting at LBA 1. The first directory block is read  A complete disk file directory is read starting at LBA 1. The first directory block is read 
 and all file entries in that block are read and decoded. Then the next directory block, LBA equal  and all file entries in that block are read and decoded. Then the next directory block, LBA equal 
 to the value in uFwdLink, is read and decoded. Directory reading is finished when the  to the value in uFwdLink, is read and decoded. Directory reading is finished when the 
-uFwdLink equals the current LBA. This algorithm is shown in Figure 4-10+uFwdLink equals the current LBA. This algorithm is shown in below
  
-FIXME+{{ :​ch10_handbook:​stanag_directory_algorithm.png |}}
  
-Figure 4-10. STANAG 4575 directory reading and decoding algorithm+<​html><​center><​b>​ 
 +STANAG 4575 directory reading and decoding algorithm 
 +</​b></​center></​html> ​
  
ch10_handbook/data_retrieval.txt · Last modified: 2014/05/29 14:34 by bob