IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30353


Ignore:
Timestamp:
Jan 24, 2011, 2:43:37 PM (15 years ago)
Author:
watersc1
Message:

added -updatepzexp mode to pztool so the state can be set for bad exposures

Location:
trunk/ippTools/src
Files:
3 edited

Legend:

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

    r30227 r30353  
    4747static bool advanceMode(pxConfig *config);
    4848
     49static bool updatepzexpMode(pxConfig *config);
    4950static bool updatenewexpMode(pxConfig *config);
    5051
     
    8586        MODECASE(PZTOOL_MODE_TOADVANCE, toadvanceMode);
    8687        MODECASE(PZTOOL_MODE_ADVANCE, advanceMode);
     88        MODECASE(PZTOOL_MODE_UPDATEPZEXP, updatepzexpMode);
    8789        MODECASE(PZTOOL_MODE_UPDATENEWEXP, updatenewexpMode);
    8890        default:
     
    894896            || (strncmp(state, "stop", 5) == 0)
    895897            || (strncmp(state, "reg", 4) == 0)
     898            || (strncmp(state, "drop", 5) == 0)
    896899        )
    897900    ) {
     
    910913}
    911914
     915static bool updatepzexpMode(pxConfig *config)
     916{
     917  PS_ASSERT_PTR_NON_NULL(config, false);
     918  PXOPT_LOOKUP_STR(exp_name, config->args, "-exp_name", true, false);
     919  PXOPT_LOOKUP_STR(camera,   config->args, "-camera",   true, false);
     920  PXOPT_LOOKUP_STR(telescope,config->args, "-telescope",true, false);
     921  PXOPT_LOOKUP_STR(state,    config->args, "-set_state",true, false);
     922
     923  if (!pzDownloadExpSetState(config,exp_name,camera,telescope,state)) {
     924    psError(PS_ERR_UNKNOWN, false, "failed to change state for %s:%s:%s", exp_name, camera, telescope);
     925    return false;
     926  }
     927  return true;
     928}
     929 
     930 
    912931static bool updatenewexpMode(pxConfig *config)
    913932{
     
    952971
    953972
     973
     974
    954975#if 0
    955976static psArray *pzArrayAddArray(psArray *array, psArray *input)
  • trunk/ippTools/src/pztool.h

    r30206 r30353  
    3737    PZTOOL_MODE_TOADVANCE,
    3838    PZTOOL_MODE_ADVANCE,
     39    PZTOOL_MODE_UPDATEPZEXP,
    3940    PZTOOL_MODE_UPDATENEWEXP,
    4041} pztoolMode;
  • trunk/ippTools/src/pztoolConfig.c

    r30227 r30353  
    156156    psMetadataAddStr(advanceArgs, PS_LIST_TAIL, "-label",  0,     "define the label for the chip stage", NULL);
    157157
     158    // -updatepzexp
     159    psMetadata *updatepzexpArgs = psMetadataAlloc();
     160    psMetadataAddStr(updatepzexpArgs, PS_LIST_TAIL, "-exp_name",   0,            "search by exposure name (required)", NULL);
     161    psMetadataAddStr(updatepzexpArgs, PS_LIST_TAIL, "-camera",     0,            "search by camera (required)", NULL);
     162    psMetadataAddStr(updatepzexpArgs, PS_LIST_TAIL, "-telescope",  0,            "search by telescope (required)", NULL);
     163    psMetadataAddStr(updatepzexpArgs, PS_LIST_TAIL, "-set_state",  0,            "define new state (required)", NULL);
     164   
    158165    // -updatenewexp
    159166    psMetadata *updatenewexpArgs = psMetadataAlloc();
     
    178185    PXOPT_ADD_MODE("-toadvance",          "", PZTOOL_MODE_TOADVANCE,    toadvanceArgs);
    179186    PXOPT_ADD_MODE("-advance",          "", PZTOOL_MODE_ADVANCE,    advanceArgs);
     187    PXOPT_ADD_MODE("-updatepzexp",     "", PZTOOL_MODE_UPDATEPZEXP, updatepzexpArgs);
    180188    PXOPT_ADD_MODE("-updatenewexp",    "", PZTOOL_MODE_UPDATENEWEXP,updatenewexpArgs);
    181189
Note: See TracChangeset for help on using the changeset viewer.