ch10_handbook:data_retrieval
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ch10_handbook:data_retrieval [2014/04/11 21:46] – bob | ch10_handbook:data_retrieval [2014/05/29 14:34] (current) – 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 | + | The structures |
- | 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. | + | |
< | < | ||
Line 53: | Line 51: | ||
}; | }; | ||
</ | </ | ||
- | Figure 4-1. SCSI INQUIRY CDB structure. | + | |
+ | < | ||
+ | SCSI INQUIRY CDB structure | ||
+ | </ | ||
< | < | ||
Line 65: | Line 66: | ||
}; | }; | ||
</ | </ | ||
- | Figure 4-2. SCSI CDB Control field structure. | + | |
+ | < | ||
+ | SCSI CDB Control field structure | ||
+ | </ | ||
+ | |||
+ | 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. | ||
< | < | ||
Line 103: | Line 109: | ||
}; | }; | ||
</ | </ | ||
- | Figure 4-3. SCSI INQUIRY data structure | + | |
+ | < | ||
+ | SCSI INQUIRY data structure | ||
+ | </ | ||
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. | + | |
< | < | ||
Line 127: | Line 133: | ||
}; | }; | ||
</ | </ | ||
- | Figure 4-4. SCSI READ CAPACITY CDB structure. | + | |
+ | < | ||
+ | SCSI READ CAPACITY CDB structure. | ||
+ | </ | ||
+ | This command returns the number of available logical blocks and the logical block size in bytes, shown in the structure below. | ||
+ | |||
< | < | ||
struct SuCdbReadCapacityData | struct SuCdbReadCapacityData | ||
Line 136: | Line 147: | ||
}; | }; | ||
</ | </ | ||
- | Figure 4-5. SCSI READ CAPACITY data structure | + | |
+ | < | ||
+ | SCSI READ CAPACITY data structure | ||
+ | </ | ||
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: | ||
}; | }; | ||
</ | </ | ||
- | Figure 4-6. SCSI READ(10) CDB structure. | + | |
+ | < | ||
+ | SCSI READ(10) CDB structure | ||
+ | </ | ||
=== 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. |
< | < | ||
Line 315: | Line 332: | ||
} | } | ||
</ | </ | ||
- | Figure 4-7. SCSI_PASS_THROUGH structure. | + | |
+ | < | ||
+ | SCSI_PASS_THROUGH structure | ||
+ | </ | ||
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. | + | |
< | < | ||
Line 402: | Line 418: | ||
}; | }; | ||
</ | </ | ||
- | Figure 4-8. STANAG 4575 Directory Block structure. | + | |
+ | < | ||
+ | STANAG 4575 Directory Block structure | ||
+ | </ | ||
+ | |||
+ | 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. | ||
< | < | ||
Line 418: | Line 440: | ||
}; | }; | ||
</ | </ | ||
- | Figure 4-9. STANAG 4575 File Entry structure | + | |
+ | < | ||
+ | STANAG 4575 File Entry structure | ||
+ | </ | ||
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 | + | {{ : |
- | Figure 4-10. STANAG 4575 directory reading and decoding algorithm. | + | < |
+ | STANAG 4575 directory reading and decoding algorithm | ||
+ | </ | ||
ch10_handbook/data_retrieval.txt · Last modified: 2014/05/29 14:34 by bob