Changeset 7278 for trunk/psModules/src/concepts/pmConcepts.c
- Timestamp:
- Jun 1, 2006, 2:55:23 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/concepts/pmConcepts.c (modified) (24 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/concepts/pmConcepts.c
r7017 r7278 44 44 ) 45 45 { 46 assert(blank); 46 PS_ASSERT_PTR_NON_NULL(blank, false); 47 47 48 if (!conceptsInitialised) { 48 49 pmConceptsInit(); … … 80 81 ) 81 82 { 83 assert(specs); 84 assert(target); 85 82 86 if (!conceptsInitialised) { 83 87 pmConceptsInit(); … … 119 123 ) 120 124 { 125 assert(specs); 126 assert(read); 127 assert(target); 128 121 129 if (!conceptsInitialised) { 122 130 pmConceptsInit(); … … 156 164 ) 157 165 { 166 assert(specs); 167 assert(concepts); 168 158 169 if (!conceptsInitialised) { 159 170 pmConceptsInit(); … … 180 191 ) 181 192 { 193 PS_ASSERT_PTR_NON_NULL(fpa, false); 182 194 psTrace("psModule.concepts", 5, "Blanking FPA concepts: %x %x\n", conceptsFPA, fpa->concepts); 183 195 return conceptsBlank(&conceptsFPA, fpa->concepts); … … 191 203 ) 192 204 { 205 PS_ASSERT_PTR_NON_NULL(fpa, false); 193 206 psTrace("psModule.concepts", 5, "Reading FPA concepts: %x %x\n", conceptsFPA, fpa->concepts); 194 207 return conceptsRead(&conceptsFPA, fpa, NULL, NULL, &fpa->conceptsRead, source, db, fpa->concepts); … … 201 214 ) 202 215 { 216 PS_ASSERT_PTR_NON_NULL(fpa, false); 203 217 psTrace("psModule.concepts", 5, "Writing FPA concepts: %x %x\n", conceptsFPA, fpa->concepts); 204 218 return conceptsWrite(&conceptsFPA, fpa, NULL, NULL, source, db, fpa->concepts); … … 209 223 ) 210 224 { 225 PS_ASSERT_PTR_NON_NULL(chip, false); 211 226 psTrace("psModule.concepts", 5, "Blanking chip concepts: %x %x\n", conceptsChip, chip->concepts); 212 227 return conceptsBlank(&conceptsChip, chip->concepts); … … 220 235 ) 221 236 { 237 PS_ASSERT_PTR_NON_NULL(chip, false); 222 238 psTrace("psModule.concepts", 5, "Reading chip concepts: %x %x\n", conceptsChip, chip->concepts); 223 239 pmFPA *fpa = chip->parent; // FPA to which the chip belongs … … 235 251 ) 236 252 { 253 PS_ASSERT_PTR_NON_NULL(chip, false); 237 254 psTrace("psModule.concepts", 5, "Writing chip concepts: %x %x\n", conceptsChip, chip->concepts); 238 255 pmFPA *fpa = chip->parent; // FPA to which the chip belongs … … 246 263 ) 247 264 { 265 PS_ASSERT_PTR_NON_NULL(cell, false); 248 266 psTrace("psModule.concepts", 5, "Blanking cell concepts: %x %x\n", conceptsCell, cell->concepts); 249 267 return conceptsBlank(&conceptsCell, cell->concepts); … … 257 275 ) 258 276 { 277 PS_ASSERT_PTR_NON_NULL(cell, false); 259 278 psTrace("psModule.concepts", 5, "Reading cell concepts: %x %x\n", conceptsCell, cell->concepts); 260 279 pmChip *chip = cell->parent; // Chip to which the cell belongs … … 274 293 ) 275 294 { 295 PS_ASSERT_PTR_NON_NULL(cell, false); 276 296 psTrace("psModule.concepts", 5, "Writing cell concepts: %x %x\n", conceptsCell, cell->concepts); 277 297 pmChip *chip = cell->parent; // Chip to which the cell belongs … … 336 356 { 337 357 psMetadataItem *fpaRa = psMetadataItemAllocF64("FPA.RA", "Right Ascension of boresight", NAN); 338 pmConceptRegister(fpaRa, (pmConceptParseFunc)p mConceptParse_FPA_Coords,339 (pmConceptFormatFunc)p mConceptFormat_FPA_Coords, PM_FPA_LEVEL_FPA);358 pmConceptRegister(fpaRa, (pmConceptParseFunc)p_pmConceptParse_FPA_Coords, 359 (pmConceptFormatFunc)p_pmConceptFormat_FPA_Coords, PM_FPA_LEVEL_FPA); 340 360 psFree(fpaRa); 341 361 } … … 344 364 { 345 365 psMetadataItem *fpaDec = psMetadataItemAllocF64("FPA.DEC", "Declination of boresight", NAN); 346 pmConceptRegister(fpaDec, (pmConceptParseFunc)p mConceptParse_FPA_Coords,347 (pmConceptFormatFunc)p mConceptFormat_FPA_Coords, PM_FPA_LEVEL_FPA);366 pmConceptRegister(fpaDec, (pmConceptParseFunc)p_pmConceptParse_FPA_Coords, 367 (pmConceptFormatFunc)p_pmConceptFormat_FPA_Coords, PM_FPA_LEVEL_FPA); 348 368 psFree(fpaDec); 349 369 } … … 446 466 "Trim section", trimsec); 447 467 psFree(trimsec); 448 pmConceptRegister(cellTrimsec, (pmConceptParseFunc)p mConceptParse_CELL_TRIMSEC,449 (pmConceptFormatFunc)p mConceptFormat_CELL_TRIMSEC, PM_FPA_LEVEL_CELL);468 pmConceptRegister(cellTrimsec, (pmConceptParseFunc)p_pmConceptParse_CELL_TRIMSEC, 469 (pmConceptFormatFunc)p_pmConceptFormat_CELL_TRIMSEC, PM_FPA_LEVEL_CELL); 450 470 psFree(cellTrimsec); 451 471 } … … 457 477 "Bias sections", biassecs); 458 478 psFree(biassecs); 459 pmConceptRegister(cellBiassec, (pmConceptParseFunc)p mConceptParse_CELL_BIASSEC,460 (pmConceptFormatFunc)p mConceptFormat_CELL_BIASSEC, PM_FPA_LEVEL_CELL);479 pmConceptRegister(cellBiassec, (pmConceptParseFunc)p_pmConceptParse_CELL_BIASSEC, 480 (pmConceptFormatFunc)p_pmConceptFormat_CELL_BIASSEC, PM_FPA_LEVEL_CELL); 461 481 psFree(cellBiassec); 462 482 } … … 465 485 { 466 486 psMetadataItem *cellXbin = psMetadataItemAllocS32("CELL.XBIN", "Binning in x", 0); 467 pmConceptRegister(cellXbin, (pmConceptParseFunc)p mConceptParse_CELL_Binning,468 (pmConceptFormatFunc)p mConceptFormat_CELL_XBIN, PM_FPA_LEVEL_CELL);487 pmConceptRegister(cellXbin, (pmConceptParseFunc)p_pmConceptParse_CELL_Binning, 488 (pmConceptFormatFunc)p_pmConceptFormat_CELL_XBIN, PM_FPA_LEVEL_CELL); 469 489 psFree(cellXbin); 470 490 } … … 473 493 { 474 494 psMetadataItem *cellYbin = psMetadataItemAllocS32("CELL.YBIN", "Binning in y", 0); 475 pmConceptRegister(cellYbin, (pmConceptParseFunc)p mConceptParse_CELL_Binning,476 (pmConceptFormatFunc)p mConceptFormat_CELL_YBIN, PM_FPA_LEVEL_CELL);495 pmConceptRegister(cellYbin, (pmConceptParseFunc)p_pmConceptParse_CELL_Binning, 496 (pmConceptFormatFunc)p_pmConceptFormat_CELL_YBIN, PM_FPA_LEVEL_CELL); 477 497 psFree(cellYbin); 478 498 } … … 481 501 { 482 502 psMetadataItem *cellTimesys = psMetadataItemAllocS32("CELL.TIMESYS", "Time system", -1); 483 pmConceptRegister(cellTimesys, (pmConceptParseFunc)p mConceptParse_CELL_TIMESYS,484 (pmConceptFormatFunc)p mConceptFormat_CELL_TIMESYS, PM_FPA_LEVEL_CELL);503 pmConceptRegister(cellTimesys, (pmConceptParseFunc)p_pmConceptParse_CELL_TIMESYS, 504 (pmConceptFormatFunc)p_pmConceptFormat_CELL_TIMESYS, PM_FPA_LEVEL_CELL); 485 505 psFree(cellTimesys); 486 506 } … … 495 515 "Time of exposure", time); 496 516 psFree(time); 497 pmConceptRegister(cellTime, (pmConceptParseFunc)p mConceptParse_CELL_TIME,498 (pmConceptFormatFunc)p mConceptFormat_CELL_TIME, PM_FPA_LEVEL_CELL);517 pmConceptRegister(cellTime, (pmConceptParseFunc)p_pmConceptParse_CELL_TIME, 518 (pmConceptFormatFunc)p_pmConceptFormat_CELL_TIME, PM_FPA_LEVEL_CELL); 499 519 psFree(cellTime); 500 520 } … … 503 523 { 504 524 psMetadataItem *cellX0 = psMetadataItemAllocS32("CELL.X0", "Position of (0,0) on the chip", 0); 505 pmConceptRegister(cellX0, (pmConceptParseFunc)p mConceptParse_CELL_Positions,506 (pmConceptFormatFunc)p mConceptFormat_CELL_Positions, PM_FPA_LEVEL_CELL);525 pmConceptRegister(cellX0, (pmConceptParseFunc)p_pmConceptParse_CELL_Positions, 526 (pmConceptFormatFunc)p_pmConceptFormat_CELL_Positions, PM_FPA_LEVEL_CELL); 507 527 psFree(cellX0); 508 528 } … … 511 531 { 512 532 psMetadataItem *cellY0 = psMetadataItemAllocS32("CELL.Y0", "Position of (0,0) on the chip", 0); 513 pmConceptRegister(cellY0, (pmConceptParseFunc)p mConceptParse_CELL_Positions,514 (pmConceptFormatFunc)p mConceptFormat_CELL_Positions, PM_FPA_LEVEL_CELL);533 pmConceptRegister(cellY0, (pmConceptParseFunc)p_pmConceptParse_CELL_Positions, 534 (pmConceptFormatFunc)p_pmConceptFormat_CELL_Positions, PM_FPA_LEVEL_CELL); 515 535 psFree(cellY0); 516 536 } … … 534 554 ) 535 555 { 556 PS_ASSERT_PTR_NON_NULL(target, false); 557 PS_ASSERT_PTR_NON_NULL(source, false); 558 536 559 // Copy FPA concepts 537 560 target->concepts = psMetadataCopy(target->concepts, source->concepts);
Note:
See TracChangeset
for help on using the changeset viewer.
