IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 5, 2006, 2:02:35 PM (20 years ago)
Author:
eugene
Message:

working on file I/O modifications

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psModulesUtils.c

    r6481 r6522  
    312312    return false;
    313313}
     314
     315ppImageLoadDepth ppImageCheckDepth (psMetadata *recipe, char *name) {
     316
     317    bool status;
     318
     319    // determine the load depth
     320    const char *depth = psMetadataLookupStr(&status, recipe, name);
     321    if (! status || ! depth || strlen(depth) == 0) {
     322        psLogMsg("psphot", PS_LOG_ERROR, "%s not specified in recipe.", name);
     323        exit(EXIT_FAILURE);
     324    }
     325
     326    if (!strcasecmp(depth, "FPA"))  return (PP_LOAD_FPA);
     327    if (!strcasecmp(depth, "CHIP")) return (PP_LOAD_CHIP);
     328    if (!strcasecmp(depth, "CELL")) return (PP_LOAD_CELL);
     329
     330    psLogMsg(__func__, PS_LOG_ERROR, "%s in recipe is not FPA, CHIP or CELL.", name);
     331    exit(EXIT_FAILURE);
     332
     333    return PP_LOAD_NONE;
     334}
Note: See TracChangeset for help on using the changeset viewer.