Changeset 32355 for trunk/ippScripts/scripts
- Timestamp:
- Sep 6, 2011, 1:56:40 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/chip_imfile.pl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/chip_imfile.pl
r31941 r32355 266 266 } 267 267 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 ## } 291 292 292 293 if ($run_state eq 'new') {
Note:
See TracChangeset
for help on using the changeset viewer.
