Changeset 6062 for branches/eam_rel9_p0/psModules/src/astrom/pmConcepts.c
- Timestamp:
- Jan 19, 2006, 4:38:28 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_rel9_p0/psModules/src/astrom/pmConcepts.c
r5975 r6062 99 99 100 100 // Set all registered concepts to blank value for the specified level 101 static bool conceptsBlank(psMetadata * specs, // One of the concepts specifications101 static bool conceptsBlank(psMetadata **specs, // One of the concepts specifications 102 102 psMetadata *target // Place to install the concepts 103 103 ) 104 104 { 105 105 pmConceptsInit(); 106 psMetadataIterator *specsIter = psMetadataIteratorAlloc( specs, PS_LIST_HEAD, NULL); // Iterator on specs106 psMetadataIterator *specsIter = psMetadataIteratorAlloc(*specs, PS_LIST_HEAD, NULL); // Iterator on specs 107 107 psMetadataItem *specItem = NULL; // Item from the specs metadata 108 108 while ((specItem = psMetadataGetAndIncrement(specsIter))) { … … 117 117 118 118 // Read all registered concepts for the specified level 119 static bool conceptsRead(psMetadata * specs, // One of the concepts specifications119 static bool conceptsRead(psMetadata **specs, // One of the concepts specifications 120 120 pmFPA *fpa, // The FPA 121 121 pmChip *chip, // The chip … … 126 126 { 127 127 pmConceptsInit(); 128 psMetadataIterator *specsIter = psMetadataIteratorAlloc( specs, PS_LIST_HEAD, NULL); // Iterator on specs128 psMetadataIterator *specsIter = psMetadataIteratorAlloc(*specs, PS_LIST_HEAD, NULL); // Iterator on specs 129 129 psMetadataItem *specItem = NULL; // Item from the specs metadata 130 130 while ((specItem = psMetadataGetAndIncrement(specsIter))) { … … 147 147 148 148 // Write all registered concepts for the specified level 149 static bool conceptsWrite(psMetadata * specs, // One of the concepts specifications149 static bool conceptsWrite(psMetadata **specs, // One of the concepts specifications 150 150 pmFPA *fpa, // The FPA 151 151 pmChip *chip, // The chip … … 160 160 while ((item = psMetadataGetAndIncrement(iter))) { 161 161 const char *name = item->name; // Name of the concept 162 psMetadataItem *specItem = psMetadataLookup( specs, name); // Specification for the concept162 psMetadataItem *specItem = psMetadataLookup(*specs, name); // Specification for the concept 163 163 if (specItem) { 164 164 pmConceptSpec *spec = specItem->data.V; // The specification … … 182 182 ) 183 183 { 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); 185 186 } 186 187 … … 190 191 ) 191 192 { 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); 193 195 } 194 196 … … 198 200 ) 199 201 { 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); 201 204 } 202 205 … … 205 208 ) 206 209 { 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); 208 212 } 209 213 … … 213 217 ) 214 218 { 219 psTrace("psModule.concepts", 5, "Reading chip concepts: %x %x\n", conceptsChip, chip->concepts); 215 220 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); 217 222 } 218 223 … … 222 227 ) 223 228 { 229 psTrace("psModule.concepts", 5, "Writing chip concepts: %x %x\n", conceptsChip, chip->concepts); 224 230 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); 226 232 } 227 233 … … 230 236 ) 231 237 { 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); 233 240 } 234 241 … … 238 245 ) 239 246 { 247 psTrace("psModule.concepts", 5, "Writing cell concepts: %x %x\n", conceptsCell, cell->concepts); 240 248 pmChip *chip = cell->parent; // Chip to which the cell belongs 241 249 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); 243 251 } 244 252 … … 248 256 ) 249 257 { 258 psTrace("psModule.concepts", 5, "Writing cell concepts: %x %x\n", conceptsCell, cell->concepts); 250 259 pmChip *chip = cell->parent; // Chip to which the cell belongs 251 260 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); 253 262 } 254 263 … … 297 306 conceptsChip = psMetadataAlloc(); 298 307 init = true; 299 // XXX Insert here the native Chip concepts308 // There are no standard concepts at the chip level to be installed 300 309 } 301 310 if (! conceptsCell) { … … 397 406 } 398 407 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 399 418 } 400 419
Note:
See TracChangeset
for help on using the changeset viewer.
