Changeset 6570 for branches/rel10_ifa/psModules/src/astrom/pmConcepts.h
- Timestamp:
- Mar 10, 2006, 5:20:10 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/rel10_ifa/psModules/src/astrom/pmConcepts.h
r6552 r6570 6 6 #include "pmFPA.h" 7 7 8 // Function to call to read a concept 9 typedef psMetadataItem* (*pmConceptReadFunc)(pmFPA *fpa, pmChip *chip, pmCell *cell, psDB *db); 10 // Function to call to write a concept 11 typedef bool (*pmConceptWriteFunc)(pmFPA *fpa, pmChip *chip, pmCell *cell, psDB *db); 8 9 // Function to call to parse a concept once it has been read 10 typedef psMetadataItem* (*pmConceptParseFunc)(psMetadataItem *concept, pmConceptSpec *spec, psMetadata *cameraFormat, pmFPA *fpa, pmChip *chip, pmCell *cell); 11 // Function to call to format a concept for writing 12 typedef psMetadataItem* (*pmConceptFormatFunc)(psMetadataItem *concept, psMetadata *cameraFormat, pmFPA *fpa, pmChip *chip, pmCell *cell); 12 13 13 14 // A "concept" specification … … 15 16 { 16 17 psMetadataItem *blank; // Blank value of concept; also contains the name 17 pmConcept ReadFunc read;// Function to call to read the concept18 pmConcept WriteFunc write;// Function to call to write the concept18 pmConceptParseFunc parse; // Function to call to read the concept 19 pmConceptFormatFunc format; // Function to call to write the concept 19 20 } 20 21 pmConceptSpec; … … 22 23 // Allocator 23 24 pmConceptSpec *pmConceptSpecAlloc(psMetadataItem *blank, // Blank value; contains the name 24 pmConcept ReadFunc read, // Function to call to readthe concept25 pmConcept WriteFunc write // Function to call to writethe concept25 pmConceptParseFunc parse, // Function to call to parse the concept 26 pmConceptFormatFunc format // Function to call to format the concept 26 27 ); 27 28 … … 35 36 // Register a new concept 36 37 bool pmConceptRegister(psMetadataItem *blank, // Blank value; contains the name 37 pmConcept ReadFunc read, // Function to call to readthe concept38 pmConcept WriteFunc write, // Function to call to writethe concept38 pmConceptParseFunc parse, // Function to call to parse the concept 39 pmConceptFormatFunc format, // Function to call to format the concept 39 40 pmConceptLevel level // Level at which to store concept in the FPA hierarchy 40 41 ); 41 42 42 #if 043 43 // Some specificity to reading and writing concepts 44 44 typedef enum { 45 PM_CONCEPT_SOURCE_ALL = 0x00, // Do all sources46 PM_CONCEPT_SOURCE_CAMERA = 0x01, // Do concepts that comefrom the camera information47 PM_CONCEPT_SOURCE_DEFAULTS = 0x02, // Do concepts that comefrom defaults48 PM_CONCEPT_SOURCE_HEADER = 0x04, // Do concepts that comefrom FITS header49 PM_CONCEPT_SOURCE_DATABASE = 0x08 // Do concepts that comefrom database45 PM_CONCEPT_SOURCE_ALL = 0x00, // All concepts 46 PM_CONCEPT_SOURCE_CAMERA = 0x01, // Concept comes from the camera information 47 PM_CONCEPT_SOURCE_DEFAULTS = 0x02, // Concept comes from defaults 48 PM_CONCEPT_SOURCE_HEADER = 0x04, // Concept comes from FITS header 49 PM_CONCEPT_SOURCE_DATABASE = 0x08 // Concept comes from database 50 50 } pmConceptSource; 51 #endif52 51 53 52 // Set blanks, read or write concepts at the appropriate level … … 55 54 ); 56 55 bool pmConceptsReadFPA(pmFPA *fpa, // FPA for which to read concepts 56 pmConceptSource source, // Source for concepts 57 57 psDB *db // Database handle 58 58 ); 59 59 bool pmConceptsWriteFPA(pmFPA *fpa, // FPA for which to write concepts 60 pmConceptSource source, // Source for concepts 60 61 psDB *db // Database handle 61 62 ); … … 63 64 ); 64 65 bool pmConceptsReadChip(pmChip *chip, // Chip for which to read concepts 66 pmConceptSource source, // Source for concepts 65 67 psDB *db // Database handle 66 68 ); 67 69 bool pmConceptsWriteChip(pmChip *chip, // Chip for which to write concepts 70 pmConceptSource source, // Source for concepts 68 71 psDB *db // Database handle 69 72 ); … … 71 74 ); 72 75 bool pmConceptsReadCell(pmCell *cell, // Cell for which to read concepts 76 pmConceptSource source, // Source for concepts 73 77 psDB *db // Database handle 74 78 ); 75 79 bool pmConceptsWriteCell(pmCell *cell, // FPA for which to write concepts 80 pmConceptSource source, // Source for concepts 76 81 psDB *db // Database handle 77 82 );
Note:
See TracChangeset
for help on using the changeset viewer.
