IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 5, 2009, 11:13:29 AM (17 years ago)
Author:
beaumont
Message:

Finished ppStack visualization. Unified the way in which visualizations are invoked, plotting windows are closed, etc

Location:
branches/cnb_branches/cnb_branch_20090215
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/cnb_branches/cnb_branch_20090215

  • branches/cnb_branches/cnb_branch_20090215/psModules/src/concepts/pmConcepts.h

    r18364 r23197  
    1212#define PM_CONCEPTS_H
    1313
     14#include <pslib.h>
     15#include <pmFPALevel.h>
     16#include <pmFPA.h>
    1417#include <pmConfig.h>
    1518
     
    3437
    3538/// Function to call to parse a concept once it has been read
    36 typedef psMetadataItem* (*pmConceptParseFunc)(const psMetadataItem *concept, ///< Concept to parse
    37         const psMetadataItem *pattern, ///< Pattern for parsing
    38                                               pmConceptSource source, ///< Source of concept
    39         const psMetadata *cameraFormat, ///< Camera format definition
    40         const pmFPA *fpa, ///< FPA for concept, or NULL
    41         const pmChip *chip, ///< Chip for concept, or NULL
    42         const pmCell *cell ///< Cell for concept, or NULL
    43                                              );
     39typedef psMetadataItem* (*pmConceptParseFunc)(
     40    const psMetadataItem *concept, ///< Concept to parse
     41    const psMetadataItem *pattern, ///< Pattern for parsing
     42    pmConceptSource source, ///< Source of concept
     43    const psMetadata *cameraFormat, ///< Camera format definition
     44    const pmFPA *fpa, ///< FPA for concept, or NULL
     45    const pmChip *chip, ///< Chip for concept, or NULL
     46    const pmCell *cell ///< Cell for concept, or NULL
     47    );
    4448
    4549/// Function to call to format a concept for writing
    46 typedef psMetadataItem* (*pmConceptFormatFunc)(const psMetadataItem *concept, ///< Concept to format
    47                                                pmConceptSource source, ///< Source of concept
    48         const psMetadata *cameraFormat, ///< Camera format definition
    49         const pmFPA *fpa, ///< FPA for concept, or NULL
    50         const pmChip *chip, ///< Chip for concept, or NULL
    51         const pmCell *cell ///< Cell for concept, or NULL
    52                                               );
     50typedef psMetadataItem* (*pmConceptFormatFunc)(
     51    const psMetadataItem *concept, ///< Concept to format
     52    pmConceptSource source, ///< Source of concept
     53    const psMetadata *cameraFormat, ///< Camera format definition
     54    const pmFPA *fpa, ///< FPA for concept, or NULL
     55    const pmChip *chip, ///< Chip for concept, or NULL
     56    const pmCell *cell ///< Cell for concept, or NULL
     57    );
     58
     59/// Function to call to copy a concept
     60typedef psMetadataItem* (*pmConceptCopyFunc)(
     61    const psMetadataItem *target,       ///< Target concept
     62    const psMetadataItem *source,       ///< Source concept
     63    const psMetadata *cameraFormat,     ///< Camera format definition
     64    const pmFPA *fpa,                   ///< Source FPA for concept, or NULL
     65    const pmChip *chip,                 ///< Source chip for concept, or NULL
     66    const pmCell *cell                  ///< Source cell for concept, or NULL
     67    );
     68
    5369
    5470/// A "concept" specification
     
    5672/// Defines the name, default comment, blank value, and functions to parse (after reading) and format (before
    5773/// writing) the concept.
    58 typedef struct
    59 {
     74typedef struct {
    6075    psMetadataItem *blank;              ///< Blank value of concept; also contains the name and comment
    61     pmConceptParseFunc parse;           ///< Function to call to read the concept
    62     pmConceptFormatFunc format;         ///< Function to call to write the concept
     76    pmConceptParseFunc parse;           ///< Function to call to read the concept, or NULL
     77    pmConceptFormatFunc format;         ///< Function to call to write the concept, or NULL
     78    pmConceptCopyFunc copy;             ///< Function to call to copy the concept, or NULL
    6379    bool required;                      ///< Is concept required (throw an error on problems)?
    6480}
     
    6783/// Allocator for pmConceptSpec
    6884pmConceptSpec *pmConceptSpecAlloc(psMetadataItem *blank, ///< Blank value; contains the name
    69                                   pmConceptParseFunc parse, ///< Function to call to parse the concept
    70                                   pmConceptFormatFunc format, ///< Function to call to format the concept
     85                                  pmConceptParseFunc parse, ///< Function to call to parse the concept/NULL
     86                                  pmConceptFormatFunc format, ///< Function to call to format the concept/NULL
     87                                  pmConceptCopyFunc copy, ///< Function to call to copy the concept, or NULL
    7188                                  bool required ///< Is concept required?
    7289                                 );
     
    92109                       pmConceptParseFunc parse, ///< Function to call to parse the concept, or NULL
    93110                       pmConceptFormatFunc format, ///< Function to call to format the concept, or NULL
     111                       pmConceptCopyFunc copy, ///< Function to call to copy the concept, or NULL
    94112                       bool required,   ///< Is concept required?
    95113                       pmFPALevel level ///< Level at which to store concept in the FPA hierarchy
    96114                      );
    97115
    98 /// Get a list of defined concepts for a particular level.
    99 psList *pmConceptsList(pmFPALevel level);
     116/// Get the specifications for defined concepts of a particular level
     117psMetadata *pmConceptsSpecs(pmFPALevel level);
    100118
    101 /// Read the concepts for the given set of fpa, chip, cell
    102 ///
    103 /// Attempts to read as many concepts as possible from the specified source for the specified FPA, chip and
    104 /// cell.  That is, it will read chip- and cell-level concepts in addition to fpa-level concepts, if the chip
    105 /// and cell are provided.
    106 bool pmConceptsRead(pmFPA *fpa,         ///< FPA for which to read concepts
    107                     pmChip *chip,       ///< Chip for which to read concepts, or NULL
    108                     pmCell *cell,       ///< Cell for which to read concepts, or NULL
    109                     pmConceptSource source, ///< The source of the concepts to read
    110                     pmConfig *config    ///< Configuration
    111                    );
    112119
    113120/// Set the concepts within the FPA to the blank value
    114121bool pmConceptsBlankFPA(pmFPA *fpa      ///< FPA for which to set blank concepts
    115                        );
    116 
    117 /// Read concepts for an FPA; optionally, read concepts at all lower levels.
    118 ///
    119 /// Once concepts should be available for reading at the FPA-level, this function attempts to read the
    120 /// concepts from the specified source.  It also allows concepts to be read at lower levels by iterating over
    121 /// the components.
    122 bool pmConceptsReadFPA(pmFPA *fpa,      ///< FPA for which to read concepts
    123                        pmConceptSource source, ///< Source for concepts
    124                        bool propagateDown, ///< Propagate to lower levels?
    125                        pmConfig *config         ///< Configuration
    126                       );
    127 
    128 /// Write concepts for an FPA; optionally, write concepts at all lower levels.
    129 ///
    130 /// This function writes all concepts for the FPA to the specified "source".  It also allows concepts to be
    131 /// written for all lower levels by iterating over the components.
    132 bool pmConceptsWriteFPA(const pmFPA *fpa,     ///< FPA for which to write concepts
    133                         pmConceptSource source, ///< Source for concepts
    134                         bool propagateDown, ///< Propagate to lower levels?
    135                         pmConfig *config        ///< Configuration
    136122                       );
    137123
     
    140126                        );
    141127
    142 /// Read concepts for a chip; optionally, read concepts at the FPA and cell levels.
    143 ///
    144 /// Once concepts should be available for reading at the FPA-level, this function attempts to read the
    145 /// concepts from the specified source.  It also allows concepts to be read at the fpa level (through the
    146 /// parent), and the cell level by iterating over the components.
    147 bool pmConceptsReadChip(pmChip *chip,   ///< Chip for which to read concepts
    148                         pmConceptSource source, ///< Source for concepts
    149                         bool propagateUp, ///< Propagate to higher levels?
    150                         bool propagateDown, ///< Propagate to lower levels?
    151                         pmConfig *config        ///< Configuration
    152                        );
    153 
    154 /// Write concepts for a chip; optionally, write concepts at the FPA and cell levels.
    155 ///
    156 /// This function writes all concepts for the chip to the specified "source".  It also allows concepts to be
    157 /// written for the FPA, and the cell level by iterating over the components.
    158 bool pmConceptsWriteChip(const pmChip *chip,  ///< Chip for which to write concepts
    159                          pmConceptSource source, ///< Source for concepts
    160                          bool propagateUp,///< Propagate to higher levels?
    161                          bool propagateDown, ///< Propagate to lower levels?
    162                          pmConfig *config       ///< Configuration
    163                         );
    164 
    165128/// Set the concepts within the cell to the blank value
    166129bool pmConceptsBlankCell(pmCell *cell   ///< Cell for which to set blank concepts
    167                         );
    168 
    169 /// Read concepts for a cell; optionally, read concepts for the parents.
    170 ///
    171 /// Once concepts should be available for reading at the FPA-level, this function attempts to read the
    172 /// concepts from the specified source.  It also allows concepts to be read at upper levels through the
    173 /// parents (note, it would not read concepts for all chips, but only the parent of this cell).
    174 bool pmConceptsReadCell(pmCell *cell,   ///< Cell for which to read concepts
    175                         pmConceptSource source, ///< Source for concepts
    176                         bool propagateUp, ///< Propagate to higher levels?
    177                         pmConfig *config        ///< Configuration
    178                        );
    179 
    180 /// Write concepts for a cell; optionally, write concepts for the parents.
    181 ///
    182 /// This function writes all concepts for the chip to the specified "source".  It also allows concepts to be
    183 /// written for the upper levels through the parents (note, it would not write concepts for all chips, but
    184 /// only the parent of this cell).
    185 bool pmConceptsWriteCell(const pmCell *cell,  ///< FPA for which to write concepts
    186                          pmConceptSource source, ///< Source for concepts
    187                          bool propagateUp, ///< Propagate to higher levels?
    188                          pmConfig *config ///< Configuration
    189130                        );
    190131
     
    199140/// Frees the registered concepts so there is no memory leak when the user checks "persistent" memory.
    200141void pmConceptsDone(void);
    201 
    202 /// Copy all the concepts within an FPA to another FPA
    203 ///
    204 /// Iterates over all components of the FPA, and copies the concepts metadata from the source to the target.
    205 bool pmFPACopyConcepts(pmFPA *target,   ///< The target FPA
    206                        const pmFPA *source    ///< The source FPA
    207                       );
    208 
    209 /// Copy the concepts within an FPA to another FPA; optionally recurse to lower levels
    210 bool pmConceptsCopyFPA(pmFPA *target,   ///< Target FPA
    211                        const pmFPA *source, ///< Source FPA
    212                        bool chips,      ///< Recurse to chips level?
    213                        bool cells       ///< Recurse to cells level?
    214     );
    215 
    216 /// Copy the concepts within a chip to another chip; optionally recurse to lower level
    217 bool pmConceptsCopyChip(pmChip *target, ///< Target chip
    218                         const pmChip *source, ///< Source chip
    219                         bool cells      ///< Recurse to cells level?
    220     );
    221 
    222 /// Copy the concepts within a cell to another cell
    223 bool pmConceptsCopyCell(pmCell *target, ///< Target cell
    224                         const pmCell *source ///< Source cell
    225     );
    226142
    227143/// Interpolate a concept name to the actual value
Note: See TracChangeset for help on using the changeset viewer.