X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=zc-queue-inspect;h=63fcd53f97be3d468f7464f15bea7ca617cd0d1d;hb=23b719f022c0094200a85b0c526ae49bc0780f12;hp=60ac5a24b3b0b8c1276d9ba70f54195b96e8f2f8;hpb=c8f42ae6ec354a19e9244fc69eec7ef2d319ce0c;p=zc diff --git a/zc-queue-inspect b/zc-queue-inspect index 60ac5a2..63fcd53 100755 --- a/zc-queue-inspect +++ b/zc-queue-inspect @@ -9,7 +9,7 @@ use POSIX qw(strftime); use lib '.'; use Protocol; -my $debug = $ENV{DEBUG}; +my $debug = $ENV{DEBUG} // 0; $| = 1; if ( $debug > 1 ) { @@ -35,6 +35,8 @@ foreach my $filename ( @ARGV ) { warn "hash = ",dump($hash) if $debug; + my $imei = $1 if $filename =~ m{queue/(\d+)}; + my $function_code = $hash->{function_code} || die "no function_code"; my $fc_desc = $function_code_description->{$up_down}->{$function_code} || die "no function_code_description for $up_down $function_code"; print " function_code=$function_code ", @@ -45,6 +47,7 @@ foreach my $filename ( @ARGV ) { foreach my $data_id ( @{ $hash->{data_id_order} } ) { print join(" | ", + $imei, $hash->{up_down}, unpack('H*', chr($data_id)), $protocol->{$data_id}->{description},