IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 28, 2007, 6:44:37 PM (19 years ago)
Author:
jhoblitt
Message:

rename all *_version fields to be *_id
change chip* tables to use a chip_id
change cam* tables to use a cam_id
change all *_id fields to be S64

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/camtoolConfig.c

    r12058 r12131  
    4646    // -pendingexp
    4747    psMetadata *pendingexpArgs = psMetadataAlloc();
    48     psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-exp_tag", 0,
    49             "search by exposure ID", NULL);
    50     psMetadataAddS32(pendingexpArgs, PS_LIST_TAIL, "-chip_version", 0,
    51             "search for exposures with this chip version", -1);
    52     psMetadataAddS32(pendingexpArgs, PS_LIST_TAIL, "-cam_version", 0,
    53             "search for exposures with this cam version", -1);
     48    psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-cam_id", 0,
     49            "search by camtool ID", NULL);
     50    psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-chip_id", 0,
     51            "search by chiptool ID", NULL);
    5452    psMetadataAddU64(pendingexpArgs, PS_LIST_TAIL, "-limit",  0,
    55         "limit result set to N items", 0);
     53            "limit result set to N items", 0);
    5654    psMetadataAddBool(pendingexpArgs, PS_LIST_TAIL, "-simple", 0,
    5755            "use the simple output format", false);
     
    6058    // -pendingimfile
    6159    psMetadata *pendingimfileArgs = psMetadataAlloc();
    62     psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-exp_tag", 0,
    63             "search by exposure ID", NULL);
     60    psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-cam_id", 0,
     61            "search by camtool ID", NULL);
     62    psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-chip_id", 0,
     63            "search by chiptool ID", NULL);
    6464    psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-class", 0,
    6565            "search by class", NULL);
     
    7272    // -addprocessedexp
    7373    psMetadata *addprocessedexpArgs = psMetadataAlloc();
    74     psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-exp_tag", 0,
    75             "define exp ID (required)", NULL);
     74    psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-cam_id", 0,
     75            "define camtool ID (required)", NULL);
     76    psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-chip_id", 0,
     77            "define chiptool ID (required)", NULL);
    7678    psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-uri", 0,
    7779            "define URI (required)", NULL);
     
    9698    psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-path_base", 0,
    9799            "define banana 1", NULL);
    98     psMetadataAddS8(addprocessedexpArgs, PS_LIST_TAIL, "-code",  0,
    99         "set fault code (required)", 0);
    100     psMetadataAddBool(pendingexpArgs, PS_LIST_TAIL, "-faulted",  0,
    101         "only return imfiles with a fault status set", false);
     100    psMetadataAddS16(addprocessedexpArgs, PS_LIST_TAIL, "-code",  0,
     101            "set fault code (required)", 0);
     102    psMetadataAddBool(addprocessedexpArgs, PS_LIST_TAIL, "-faulted",  0,
     103            "only return imfiles with a fault status set", false);
    102104
    103105    // -processedexp
    104106    psMetadata *processedexpArgs = psMetadataAlloc();
    105     psMetadataAddStr(processedexpArgs, PS_LIST_TAIL, "-exp_tag", 0,
    106             "search by exposure ID", NULL);
    107     psMetadataAddS32(processedexpArgs, PS_LIST_TAIL, "-chip_version", 0,
    108             "search for exposures with this chip version", -1);
    109     psMetadataAddS32(processedexpArgs, PS_LIST_TAIL, "-cam_version", 0,
    110             "search for exposures with this cam version", -1);
     107    psMetadataAddStr(processedexpArgs, PS_LIST_TAIL, "-cam_id", 0,
     108            "search by camtool ID", NULL);
     109    psMetadataAddStr(processedexpArgs, PS_LIST_TAIL, "-chip_id", 0,
     110            "search by chiptool ID", NULL);
    111111    psMetadataAddU64(processedexpArgs, PS_LIST_TAIL, "-limit",  0,
    112         "limit result set to N items", 0);
     112            "limit result set to N items", 0);
    113113    psMetadataAddBool(processedexpArgs, PS_LIST_TAIL, "-simple", 0,
    114114            "use the simple output format", false);
    115115    psMetadataAddBool(processedexpArgs, PS_LIST_TAIL, "-faulted",  0,
    116         "only return imfiles with a fault status set", false);
     116            "only return imfiles with a fault status set", false);
    117117
    118118    // -updateprocessedexp
    119119    psMetadata *updateprocessedexpArgs = psMetadataAlloc();
    120     psMetadataAddStr(updateprocessedexpArgs, PS_LIST_TAIL, "-exp_tag",  0,
    121         "search by exposure ID", NULL);
     120    psMetadataAddStr(updateprocessedexpArgs, PS_LIST_TAIL, "-cam_id", 0,
     121            "search by camtool ID", NULL);
     122    psMetadataAddStr(updateprocessedexpArgs, PS_LIST_TAIL, "-chip_id",  0,
     123            "search by chiptool ID", NULL);
    122124    psMetadataAddStr(updateprocessedexpArgs, PS_LIST_TAIL, "-class",  0,
    123         "search by class", NULL);
     125            "search by class", NULL);
    124126    psMetadataAddStr(updateprocessedexpArgs, PS_LIST_TAIL, "-class_id",  0,
    125         "search by class ID", NULL);
    126     psMetadataAddS8(updateprocessedexpArgs, PS_LIST_TAIL, "-code",  0,
    127         "set fault code (required)", 0);
     127            "search by class ID", NULL);
     128    psMetadataAddS16(updateprocessedexpArgs, PS_LIST_TAIL, "-code",  0,
     129            "set fault code (required)", 0);
    128130
    129131    // -block
     
    221223    config->where = psMetadataAlloc();
    222224
    223     addWhereStr(exp_tag);
     225{
     226    psString str = NULL;
     227    bool status = false;
     228    if ((str = psMetadataLookupStr(&status, config->args, "-cam_id"))) {
     229        if (!psMetadataAddS64(config->where, PS_LIST_TAIL, "cam_id", 0, "==", (psS64)atoll(str))) {
     230            psError(PS_ERR_UNKNOWN, false, "failed to add item cam_id");
     231            psFree(config);
     232            return NULL;
     233        }
     234    }
     235}
     236
     237{
     238    psString str = NULL;
     239    bool status = false;
     240    if ((str = psMetadataLookupStr(&status, config->args, "-chip_id"))) {
     241        if (!psMetadataAddS64(config->where, PS_LIST_TAIL, "chip_id", 0, "==", (psS64)atoll(str))) {
     242            psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id");
     243            psFree(config);
     244            return NULL;
     245        }
     246    }
     247}
     248
    224249    // convert '-inst' to 'camera'
    225250    {
Note: See TracChangeset for help on using the changeset viewer.