IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 9, 2006, 3:55:20 PM (20 years ago)
Author:
Paul Price
Message:

Was having trouble reading and writing concepts at different levels. Added 'propagateUp' and 'propagateDown' flags to the pmConceptsRead and pmConceptsWrite functions so we can read up and down the hierarchy. For example, when you read a header at the chip level, it may be a PHU so that you want the FPA to also read concepts from it if it doesn't have its own HDU, and you want the cell to read concepts from it if it doesn't have its own HDU. But if I add a PHU, I only want to propagate upwards, because the downwards propagation will occur when I read the header lower down.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPARead.c

    r7407 r7469  
    183183
    184184    // Make sure we have the information we need
    185     pmConceptsReadCell(cell, PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_CAMERA | PM_CONCEPT_SOURCE_DEFAULTS,
    186                        false, NULL);
     185    if (!pmConceptsReadCell(cell, PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_CAMERA |
     186                            PM_CONCEPT_SOURCE_DEFAULTS, true, NULL)) {
     187        psError(PS_ERR_IO, false, "Failed to read concepts for cell.\n");
     188        return false;
     189    }
    187190
    188191    // Get the trim and bias sections
     
    322325    }
    323326
    324     if (!pmConceptsReadCell(cell, PM_CONCEPT_SOURCE_HEADER, false, NULL)) {
     327    if (!pmConceptsReadCell(cell, PM_CONCEPT_SOURCE_HEADER, true, NULL)) {
    325328        psError(PS_ERR_UNKNOWN, false, "Failed to read concepts for cell");
    326329        return false;
     
    354357    }
    355358
    356     pmCellSetDataStatus (cell, true);
     359    pmCellSetDataStatus(cell, true);
    357360    return true;
    358361}
     
    374377    }
    375378    if (success) {
    376         pmConceptsReadChip(chip, PM_CONCEPT_SOURCE_HEADER, false, NULL);
     379        if (!pmConceptsReadChip(chip, PM_CONCEPT_SOURCE_HEADER, true, true, NULL)) {
     380            psError(PS_ERR_IO, false, "Failed to read concepts for FPA.\n");
     381            return false;
     382        }
    377383        // XXX probably could just use chip->data_exists
    378         pmChipSetDataStatus (chip, true);
     384        pmChipSetDataStatus(chip, true);
    379385    }
    380386
     
    398404    }
    399405    if (success) {
    400         pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_HEADER, NULL);
     406        if (!pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_HEADER, true, NULL)) {
     407            psError(PS_ERR_IO, false, "Failed to read concepts for FPA.\n");
     408            return false;
     409        }
    401410    } else {
    402411        psError(PS_ERR_UNKNOWN, false, "Unable to read any chips in FPA");
Note: See TracChangeset for help on using the changeset viewer.