|
cbmimage
|
Classes | |
| struct | cbmimage_i_bam_selector_s |
| BAM Selector . More... | |
| struct | cbmimage_fileimage_functions_s |
| BAM counter selector . More... | |
Typedefs | |
| typedef enum cbmimage_BAM_state_e | cbmimage_BAM_state |
| state of the BAM | |
| typedef struct cbmimage_i_bam_selector_s | cbmimage_i_bam_selector |
| BAM Selector . | |
| typedef cbmimage_i_bam_selector | cbmimage_i_bam_counter_selector |
| BAM counter selector . | |
| typedef struct cbmimage_fileimage_functions_s | cbmimage_fileimage_functions |
| BAM counter selector . | |
Enumerations | |
| enum | cbmimage_BAM_state_e { BAM_UNKNOWN , BAM_REALLY_FREE , BAM_FREE , BAM_USED , BAM_DOES_NOT_EXIST } |
| state of the BAM More... | |
| typedef struct cbmimage_fileimage_functions_s cbmimage_fileimage_functions |
BAM counter selector .
this type contains helper functions that perform image format specific operations on an image type
BAM counter selector .
A bam_counter selector is almost the same as a BAM selector. Instead of pointing to the bit map of the BAM, though, it points to the location where the number of free blocks on the track is located.
In most cases, these are located directly before the bitmap, so the BAM selector could be used. However, in the case of the 2nd side of a D71 image, this is not true; that's why this own type of selector is needed here.
| typedef struct cbmimage_i_bam_selector_s cbmimage_i_bam_selector |
BAM Selector .
This type describes where the BAM entries (that is, the bitmap part of the BAM) are located on disk. This way, the code that handles BAM entries is generic, and only the initialization of the BAM selector has to be image specific.
In case the BAM is stored in multiple blocks (or in the same block, but at different locations), an array of BAM selectors has to be used, with every selector describing one location of the BAM entries
| enum cbmimage_BAM_state_e |
state of the BAM
| int cbmimage_bam_check_consistency | ( | cbmimage_fileimage * | image | ) |
check the consistency of a BAM
| [in] | image | pointer to the image data |
| cbmimage_BAM_state cbmimage_bam_get | ( | cbmimage_fileimage * | image, |
| cbmimage_blockaddress | block ) |
get the unused/used state of a block in the BAM
| [in] | image | pointer to the image data |
| [in] | block | the address of the block to check |
| int cbmimage_bam_get_free_on_track | ( | cbmimage_fileimage * | image, |
| uint8_t | track ) |
get the blocks free on a specific track
| [in] | image | pointer to the image data |
| [in] | track | the track number for which the number of tracks is requested |
| int cbmimage_get_blocks_free | ( | cbmimage_fileimage * | image | ) |
get the count of blocks free
| [in] | image | pointer to the image data |
| int cbmimage_i_bam_check_really_unused | ( | cbmimage_image_settings * | settings, |
| cbmimage_blockaddress | block ) |
check if a block is really unused, that is, it's value is the same as after formatting
| [in] | settings | pointer to the image data internal settings |
| [in] | block | the address of the block to check |
|
static |
output a BAM bitmap
| [in] | mask | the BAM map to output |
|
static |
check the BAM bitmap of a specific track
| [in] | settings | pointer to the image data internal settings |
| [in] | track | the track for which to find the BAM bitmap |
| [in] | mask | the BAM map to check |
|
static |
count the number of "1" bits
| [in] | value | values of which to count the number of "1" bits |
|
static |
get the BAM counter of a specific track
| [in] | settings | pointer to the image data internal settings |
| [in] | track | the track for which to find the BAM map |
|
static |
get the BAM bitmap of a specific track
| [in] | settings | pointer to the image data internal settings |
| [in] | track | the track for which to find the BAM bitmap |
| [in,out] | mask | pointer to a bam_mask_t that will contain the BAM map on exit |
|
static |
get the BAM selector that matches a specific track
| [in] | settings | pointer to the image data internal settings |
| [in] | selector | array of the selectors |
| [in] | selector_count | number of elements in the selector array |
| [in] | track | the track for which to find the BAM selector |
| void cbmimage_i_init_bam_selector | ( | cbmimage_image_settings * | settings, |
| cbmimage_i_bam_selector * | selector, | ||
| size_t | selector_count ) |
init a BAM selector
| [in] | settings | pointer to the image data internal settings |
| [in,out] | selector | array of the selectors to initialize |
| [in] | selector_count | number of elements in the selector array |
|
static |
reverse the bit order in the byte
| [in] | input | byte value of which the bit order should be reversed |