From: Dobrica Pavlinusic Date: Fri, 9 Oct 2020 11:30:11 +0000 (+0200) Subject: added imei as first column X-Git-Url: http://git.rot13.org/?p=zc;a=commitdiff_plain;h=097548063dc80cfbdbf6bef4c372fa461079a6a6;ds=sidebyside added imei as first column --- 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},