IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 6, 2011, 1:56:40 PM (15 years ago)
Author:
eugene
Message:

do not use ppConfigDump to get the burntool state; do not wrap SOURCE in double quotes; fixed 0-counting error in kernel solution; add needed elements to megacam camera config; add PS_NOPATTERN recipe

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/chip_imfile.pl

    r31941 r32355  
    266266        }
    267267
    268         ## Read camera config to get the current good burntool state
    269         ## this returns just the values of interest in a tiny mdc file
    270         my $camera_config_cmd = "$ppConfigDump -camera $camera -get-key BURNTOOL.STATE.GOOD -get-key BURNTOOL.STATE.GOOD.UPDATE";
    271         ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    272             run(command => $camera_config_cmd, verbose => 0);
    273         unless ($success) {
    274             $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
    275             &my_die("Unable to perform ppConfigDump: $error_code", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR);
    276         }
    277 
    278         my $camData = $mdcParser->parse(join "", @$stdout_buf) or
    279             &my_die("Unable to parse ppConfigDump metadata", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR);
    280 
    281         my $burntoolStateGood;
    282         my $burntoolStateGoodUpdate;
    283         foreach my $camEntry (@$camData) {
    284             if ($camEntry->{name} eq "BURNTOOL.STATE.GOOD") {
    285                 $burntoolStateGood = $camEntry->{value};
    286             }
    287             if ($camEntry->{name} eq "BURNTOOL.STATE.GOOD.UPDATE") {
    288                 $burntoolStateGoodUpdate = $camEntry->{value};
    289             }
    290         }
     268        ## Read camera config to get the current good burntool state :
     269        ## XXX This is extremely slow. Any better way to do this?
     270        ## my $camera_config_cmd = "$ppConfigDump -camera $camera -dump-camera -";
     271        ## ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     272        ##     run(command => $camera_config_cmd, verbose => 0);
     273        ## unless ($success) {
     274        ##     $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     275        ##     &my_die("Unable to perform ppConfigDump: $error_code", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR);
     276        ## }
     277        ##
     278        ## my $camData = $mdcParser->parse(join "", @$stdout_buf) or
     279        ##     &my_die("Unable to parse ppConfigDump metadata", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR);
     280
     281        ## XXX short term hack until we have a C-based parser
     282        my $burntoolStateGood = 14;
     283        my $burntoolStateGoodUpdate = 13;
     284        ## foreach my $camEntry (@$camData) {
     285        ##     if ($camEntry->{name} eq "BURNTOOL.STATE.GOOD") {
     286        ##         $burntoolStateGood = $camEntry->{value};
     287        ##     }
     288        ##     if ($camEntry->{name} eq "BURNTOOL.STATE.GOOD.UPDATE") {
     289        ##         $burntoolStateGoodUpdate = $camEntry->{value};
     290        ##     }
     291        ## }
    291292
    292293        if ($run_state eq 'new') {
Note: See TracChangeset for help on using the changeset viewer.