IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 10, 2006, 5:20:10 PM (20 years ago)
Author:
Paul Price
Message:

Changing concepts to only get stuff as the source becomes available; nearly done

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/rel10_ifa/psModules/src/astrom/pmConcepts.h

    r6552 r6570  
    66#include "pmFPA.h"
    77
    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
     10typedef psMetadataItem* (*pmConceptParseFunc)(psMetadataItem *concept, pmConceptSpec *spec, psMetadata *cameraFormat, pmFPA *fpa, pmChip *chip, pmCell *cell);
     11// Function to call to format a concept for writing
     12typedef psMetadataItem* (*pmConceptFormatFunc)(psMetadataItem *concept, psMetadata *cameraFormat, pmFPA *fpa, pmChip *chip, pmCell *cell);
    1213
    1314// A "concept" specification
     
    1516{
    1617    psMetadataItem *blank;              // Blank value of concept; also contains the name
    17     pmConceptReadFunc read;         // Function to call to read the concept
    18     pmConceptWriteFunc write;       // Function to call to write the concept
     18    pmConceptParseFunc parse;           // Function to call to read the concept
     19    pmConceptFormatFunc format;         // Function to call to write the concept
    1920}
    2021pmConceptSpec;
     
    2223// Allocator
    2324pmConceptSpec *pmConceptSpecAlloc(psMetadataItem *blank, // Blank value; contains the name
    24                                   pmConceptReadFunc read, // Function to call to read the concept
    25                                   pmConceptWriteFunc write // Function to call to write the concept
     25                                  pmConceptParseFunc parse, // Function to call to parse the concept
     26                                  pmConceptFormatFunc format // Function to call to format the concept
    2627                                 );
    2728
     
    3536// Register a new concept
    3637bool pmConceptRegister(psMetadataItem *blank, // Blank value; contains the name
    37                        pmConceptReadFunc read, // Function to call to read the concept
    38                        pmConceptWriteFunc write, // Function to call to write the concept
     38                       pmConceptParseFunc parse, // Function to call to parse the concept
     39                       pmConceptFormatFunc format, // Function to call to format the concept
    3940                       pmConceptLevel level // Level at which to store concept in the FPA hierarchy
    4041                      );
    4142
    42 #if 0
    4343// Some specificity to reading and writing concepts
    4444typedef enum {
    45     PM_CONCEPT_SOURCE_ALL      = 0x00,  // Do all sources
    46     PM_CONCEPT_SOURCE_CAMERA   = 0x01,  // Do concepts that come from the camera information
    47     PM_CONCEPT_SOURCE_DEFAULTS = 0x02,  // Do concepts that come from defaults
    48     PM_CONCEPT_SOURCE_HEADER   = 0x04,  // Do concepts that come from FITS header
    49     PM_CONCEPT_SOURCE_DATABASE = 0x08   // Do concepts that come from database
     45    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
    5050} pmConceptSource;
    51 #endif
    5251
    5352// Set blanks, read or write concepts at the appropriate level
     
    5554                       );
    5655bool pmConceptsReadFPA(pmFPA *fpa,      // FPA for which to read concepts
     56                       pmConceptSource source, // Source for concepts
    5757                       psDB *db         // Database handle
    5858                      );
    5959bool pmConceptsWriteFPA(pmFPA *fpa,     // FPA for which to write concepts
     60                        pmConceptSource source, // Source for concepts
    6061                        psDB *db        // Database handle
    6162                       );
     
    6364                        );
    6465bool pmConceptsReadChip(pmChip *chip,   // Chip for which to read concepts
     66                        pmConceptSource source, // Source for concepts
    6567                        psDB *db        // Database handle
    6668                       );
    6769bool pmConceptsWriteChip(pmChip *chip,  // Chip for which to write concepts
     70                         pmConceptSource source, // Source for concepts
    6871                         psDB *db       // Database handle
    6972                        );
     
    7174                        );
    7275bool pmConceptsReadCell(pmCell *cell,   // Cell for which to read concepts
     76                        pmConceptSource source, // Source for concepts
    7377                        psDB *db        // Database handle
    7478                       );
    7579bool pmConceptsWriteCell(pmCell *cell,  // FPA for which to write concepts
     80                         pmConceptSource source, // Source for concepts
    7681                         psDB *db       // Database handle
    7782                        );
Note: See TracChangeset for help on using the changeset viewer.