IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 19, 2006, 4:38:28 PM (21 years ago)
Author:
Paul Price
Message:

Getting a working ppImage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_rel9_p0/psModules/src/astrom/pmConcepts.c

    r5975 r6062  
    9999
    100100// Set all registered concepts to blank value for the specified level
    101 static bool conceptsBlank(psMetadata *specs,  // One of the concepts specifications
     101static bool conceptsBlank(psMetadata **specs,  // One of the concepts specifications
    102102                          psMetadata *target // Place to install the concepts
    103103                         )
    104104{
    105105    pmConceptsInit();
    106     psMetadataIterator *specsIter = psMetadataIteratorAlloc(specs, PS_LIST_HEAD, NULL); // Iterator on specs
     106    psMetadataIterator *specsIter = psMetadataIteratorAlloc(*specs, PS_LIST_HEAD, NULL); // Iterator on specs
    107107    psMetadataItem *specItem = NULL;    // Item from the specs metadata
    108108    while ((specItem = psMetadataGetAndIncrement(specsIter))) {
     
    117117
    118118// Read all registered concepts for the specified level
    119 static bool conceptsRead(psMetadata *specs, // One of the concepts specifications
     119static bool conceptsRead(psMetadata **specs, // One of the concepts specifications
    120120                         pmFPA *fpa,    // The FPA
    121121                         pmChip *chip,  // The chip
     
    126126{
    127127    pmConceptsInit();
    128     psMetadataIterator *specsIter = psMetadataIteratorAlloc(specs, PS_LIST_HEAD, NULL); // Iterator on specs
     128    psMetadataIterator *specsIter = psMetadataIteratorAlloc(*specs, PS_LIST_HEAD, NULL); // Iterator on specs
    129129    psMetadataItem *specItem = NULL;    // Item from the specs metadata
    130130    while ((specItem = psMetadataGetAndIncrement(specsIter))) {
     
    147147
    148148// Write all registered concepts for the specified level
    149 static bool conceptsWrite(psMetadata *specs, // One of the concepts specifications
     149static bool conceptsWrite(psMetadata **specs, // One of the concepts specifications
    150150                          pmFPA *fpa,   // The FPA
    151151                          pmChip *chip, // The chip
     
    160160    while ((item = psMetadataGetAndIncrement(iter))) {
    161161        const char *name = item->name;  // Name of the concept
    162         psMetadataItem *specItem = psMetadataLookup(specs, name); // Specification for the concept
     162        psMetadataItem *specItem = psMetadataLookup(*specs, name); // Specification for the concept
    163163        if (specItem) {
    164164            pmConceptSpec *spec = specItem->data.V; // The specification
     
    182182                       )
    183183{
    184     return conceptsBlank(conceptsFPA, fpa->concepts);
     184    psTrace("psModule.concepts", 5, "Blanking FPA concepts: %x %x\n", conceptsFPA, fpa->concepts);
     185    return conceptsBlank(&conceptsFPA, fpa->concepts);
    185186}
    186187
     
    190191                      )
    191192{
    192     return conceptsRead(conceptsFPA, fpa, NULL, NULL, db, fpa->concepts);
     193    psTrace("psModule.concepts", 5, "Reading FPA concepts: %x %x\n", conceptsFPA, fpa->concepts);
     194    return conceptsRead(&conceptsFPA, fpa, NULL, NULL, db, fpa->concepts);
    193195}
    194196
     
    198200                       )
    199201{
    200     return conceptsWrite(conceptsFPA, fpa, NULL, NULL, db, fpa->concepts);
     202    psTrace("psModule.concepts", 5, "Writing FPA concepts: %x %x\n", conceptsFPA, fpa->concepts);
     203    return conceptsWrite(&conceptsFPA, fpa, NULL, NULL, db, fpa->concepts);
    201204}
    202205
     
    205208                        )
    206209{
    207     return conceptsBlank(conceptsChip, chip->concepts);
     210    psTrace("psModule.concepts", 5, "Blanking chip concepts: %x %x\n", conceptsChip, chip->concepts);
     211    return conceptsBlank(&conceptsChip, chip->concepts);
    208212}
    209213
     
    213217                       )
    214218{
     219    psTrace("psModule.concepts", 5, "Reading chip concepts: %x %x\n", conceptsChip, chip->concepts);
    215220    pmFPA *fpa = chip->parent;          // FPA to which the chip belongs
    216     return conceptsRead(conceptsChip, fpa, chip, NULL, db, chip->concepts);
     221    return conceptsRead(&conceptsChip, fpa, chip, NULL, db, chip->concepts);
    217222}
    218223
     
    222227                        )
    223228{
     229    psTrace("psModule.concepts", 5, "Writing chip concepts: %x %x\n", conceptsChip, chip->concepts);
    224230    pmFPA *fpa = chip->parent;          // FPA to which the chip belongs
    225     return conceptsWrite(conceptsChip, fpa, chip, NULL, db, chip->concepts);
     231    return conceptsWrite(&conceptsChip, fpa, chip, NULL, db, chip->concepts);
    226232}
    227233
     
    230236                        )
    231237{
    232     return conceptsBlank(conceptsCell, cell->concepts);
     238    psTrace("psModule.concepts", 5, "Blanking cell concepts: %x %x\n", conceptsCell, cell->concepts);
     239    return conceptsBlank(&conceptsCell, cell->concepts);
    233240}
    234241
     
    238245                       )
    239246{
     247    psTrace("psModule.concepts", 5, "Writing cell concepts: %x %x\n", conceptsCell, cell->concepts);
    240248    pmChip *chip = cell->parent;        // Chip to which the cell belongs
    241249    pmFPA *fpa = chip->parent;          // FPA to which the chip belongs
    242     return conceptsRead(conceptsCell, fpa, chip, cell, db, cell->concepts);
     250    return conceptsRead(&conceptsCell, fpa, chip, cell, db, cell->concepts);
    243251}
    244252
     
    248256                        )
    249257{
     258    psTrace("psModule.concepts", 5, "Writing cell concepts: %x %x\n", conceptsCell, cell->concepts);
    250259    pmChip *chip = cell->parent;        // Chip to which the cell belongs
    251260    pmFPA *fpa = chip->parent;          // FPA to which the chip belongs
    252     return conceptsWrite(conceptsCell, fpa, chip, cell, db, cell->concepts);
     261    return conceptsWrite(&conceptsCell, fpa, chip, cell, db, cell->concepts);
    253262}
    254263
     
    297306        conceptsChip = psMetadataAlloc();
    298307        init = true;
    299         // XXX Insert here the native Chip concepts
     308        // There are no standard concepts at the chip level to be installed
    300309    }
    301310    if (! conceptsCell) {
     
    397406        }
    398407
     408        // CELL.X0
     409        pmConceptRegister(psMetadataItemAllocS32("CELL.X0", "Position of (0,0) on the chip", 0),
     410                          (pmConceptReadFunc)pmConceptRead_CELL_X0,
     411                          (pmConceptWriteFunc)pmConceptWrite_CELL_X0, PM_CONCEPT_LEVEL_CELL);
     412
     413        // CELL.Y0
     414        pmConceptRegister(psMetadataItemAllocS32("CELL.Y0", "Position of (0,0) on the chip", 0),
     415                          (pmConceptReadFunc)pmConceptRead_CELL_Y0,
     416                          (pmConceptWriteFunc)pmConceptWrite_CELL_Y0, PM_CONCEPT_LEVEL_CELL);
     417
    399418    }
    400419
Note: See TracChangeset for help on using the changeset viewer.