bin/phytronFilterIpPortLog.pl

Wed, 23 Feb 2022 16:47:37 +0100

author
Bernhard.Kuner@bessy.de
date
Wed, 23 Feb 2022 16:47:37 +0100
changeset 2437
edf7037215c1
parent 2436
714726513a7d
child 2438
2a8fd0711e15
permissions
-rw-r--r--

phytronFilterIpPoerLog.pl: Translate status to readable string
Ignore-this: 218573778c5997c4f7994e6968f2d223d5c4513f8da01be44bb3059c197dc1969c725a3821c53933

2435
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
1 #!/usr/bin/env perl
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
2
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
3 # EXAMPLE Data from phyMotion IP-Port log
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
4 #
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
5 # asynSetTraceMask connMOU1YU5L -1 9
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
6 # SIOC2S5L>
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
7 # 2022/02/22 16:05:47.956 mou1s05l.blc05.bessy.de:22222 write 14
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
8 # 0M1.1P20R:XX
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
9 # 2022/02/22 16:05:47.966 mou1s05l.blc05.bessy.de:22222 read 12
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
10 # -50188:25
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
11 # 2022/02/22 16:05:47.966 mou1s05l.blc05.bessy.de:22222 write 14
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
12 # 0M1.1P22R:XX
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
13 # 2022/02/22 16:05:47.975 mou1s05l.blc05.bessy.de:22222 read 7
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
14 # 0:0C
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
15 use strict;
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
16 use Getopt::Long;
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
17
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
18 my $usage = "phytronFilterLog.pl [OPTIONS] phytronIpPortLogFile\n\t-h: help\n\t-f: filter e.g. M1.1 for motor 1\n";
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
19 my $filter = ".*"; #default: get all
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
20 my $ignore = "___";
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
21 our($opt_h,$opt_f,$opt_i) = (undef,undef,undef);
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
22
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
23 Getopt::Long::config(qw(no_ignore_case));
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
24 die unless GetOptions("h","f=s","i=s");
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
25 die $usage unless scalar(@ARGV) > 0;
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
26 die $usage if( $opt_h);
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
27
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
28 $filter = $opt_f if( $opt_f);
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
29 $ignore = $opt_i if( $opt_i);
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
30 my $inFileName = @ARGV[0];
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
31
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
32 open(IN_FILE, "<$inFileName") or die "can't open input file: '$inFileName'";
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
33
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
34 my $command;
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
35 my $reply;
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
36 my $timeWrite;
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
37 my $timeRead;
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
38 my $line;
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
39 my $lineNr = 0;
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
40 while( <IN_FILE> )
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
41 {
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
42 my $matchFilter = undef;
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
43 $line = $_;
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
44 $lineNr++;
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
45 $timeWrite = $1;
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
46 # check write
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
47 if($line =~ /^.*?\s(.*?)\s.*?\s(\w+)/ && $2 eq 'write') {
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
48 $line = <IN_FILE>;
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
49 $lineNr++;
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
50 if($line=~/\d(M.*):../) { # Axis command
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
51 $command=$1;
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
52 }
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
53 elsif($line=~/(.*):../) { # other command
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
54 $command=$1;
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
55 }
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
56 else {
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
57 $command = "ILLEGAL COMMAND: '$line'\n";
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
58 }
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
59 if( not ($command =~/$ignore/) ) {
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
60 if( $command =~/$filter/) {
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
61 print "$lineNr\t$timeWrite\twr\t$command\n";
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
62 $matchFilter = 1;
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
63 }
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
64 }
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
65 }
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
66 else {
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
67 chomp($line);
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
68 print "$lineNr\t$timeWrite\terr\tWRITE EXPECTED:\t'$line'\n";
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
69 }
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
70
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
71 # next should be 'read'
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
72 $line = <IN_FILE>;
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
73 $lineNr++;
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
74 $timeRead = $1;
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
75 if($line =~ /^.*?\s(.*?)\s.*?\s(\w+)/ && $2 eq 'read') {
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
76 $line = <IN_FILE>;
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
77 $lineNr++;
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
78 if($line=~/(.*):../) {
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
79 $reply = $1;
2437
edf7037215c1 phytronFilterIpPoerLog.pl: Translate status to readable string
Bernhard.Kuner@bessy.de
parents: 2436
diff changeset
80 $reply = getStatus($reply) if($command=~/M\d+\.\dSE/)
2435
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
81 }
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
82 else {
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
83 chomp($line);
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
84 $reply = "ILLEGAL REPLY: '$line'";
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
85 }
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
86 print "$lineNr\t$timeRead\trd\t$reply\n" if($matchFilter);
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
87 }
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
88 else {
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
89 chomp($line);
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
90 print "$lineNr\t$timeRead\terr\tMISS READ\t'$line'\n";
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
91 }
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
92 }
4c75c41ba75f bin/phytronFilterIpPortLog.pl: Tool to beautify and filter IP-Port data to debug phyMotion motors
Bernhard.Kuner@bessy.de
parents:
diff changeset
93 close IN_FILE;
2437
edf7037215c1 phytronFilterIpPoerLog.pl: Translate status to readable string
Bernhard.Kuner@bessy.de
parents: 2436
diff changeset
94
edf7037215c1 phytronFilterIpPoerLog.pl: Translate status to readable string
Bernhard.Kuner@bessy.de
parents: 2436
diff changeset
95 sub getStatus
edf7037215c1 phytronFilterIpPoerLog.pl: Translate status to readable string
Bernhard.Kuner@bessy.de
parents: 2436
diff changeset
96 { my ($reply) = @_;
edf7037215c1 phytronFilterIpPoerLog.pl: Translate status to readable string
Bernhard.Kuner@bessy.de
parents: 2436
diff changeset
97 my $hex = sprintf("%X",$reply);
edf7037215c1 phytronFilterIpPoerLog.pl: Translate status to readable string
Bernhard.Kuner@bessy.de
parents: 2436
diff changeset
98 my $msg;
edf7037215c1 phytronFilterIpPoerLog.pl: Translate status to readable string
Bernhard.Kuner@bessy.de
parents: 2436
diff changeset
99
edf7037215c1 phytronFilterIpPoerLog.pl: Translate status to readable string
Bernhard.Kuner@bessy.de
parents: 2436
diff changeset
100 $msg .= " busy" if(($hex & 1));
edf7037215c1 phytronFilterIpPoerLog.pl: Translate status to readable string
Bernhard.Kuner@bessy.de
parents: 2436
diff changeset
101 $msg .= " Illegal" if(($hex & 2));
edf7037215c1 phytronFilterIpPoerLog.pl: Translate status to readable string
Bernhard.Kuner@bessy.de
parents: 2436
diff changeset
102 $msg .= " WaitSync" if(($hex & 4));
edf7037215c1 phytronFilterIpPoerLog.pl: Translate status to readable string
Bernhard.Kuner@bessy.de
parents: 2436
diff changeset
103 $msg .= " isInit" if(($hex & 0x8));
edf7037215c1 phytronFilterIpPoerLog.pl: Translate status to readable string
Bernhard.Kuner@bessy.de
parents: 2436
diff changeset
104 $msg .= " LS+" if(($hex & 0x10));
edf7037215c1 phytronFilterIpPoerLog.pl: Translate status to readable string
Bernhard.Kuner@bessy.de
parents: 2436
diff changeset
105 $msg .= " LS-" if(($hex & 0x20));
edf7037215c1 phytronFilterIpPoerLog.pl: Translate status to readable string
Bernhard.Kuner@bessy.de
parents: 2436
diff changeset
106 $msg .= " LSM" if(($hex & 0x40));
edf7037215c1 phytronFilterIpPoerLog.pl: Translate status to readable string
Bernhard.Kuner@bessy.de
parents: 2436
diff changeset
107 $msg .= " SwLS+" if(($hex & 80));
edf7037215c1 phytronFilterIpPoerLog.pl: Translate status to readable string
Bernhard.Kuner@bessy.de
parents: 2436
diff changeset
108 $msg .= " SwLS-" if(($hex & 100));
edf7037215c1 phytronFilterIpPoerLog.pl: Translate status to readable string
Bernhard.Kuner@bessy.de
parents: 2436
diff changeset
109 $msg .= " SwLS-" if(($hex & 100));
edf7037215c1 phytronFilterIpPoerLog.pl: Translate status to readable string
Bernhard.Kuner@bessy.de
parents: 2436
diff changeset
110 $msg .= " ready" if(($hex & 0x200));
edf7037215c1 phytronFilterIpPoerLog.pl: Translate status to readable string
Bernhard.Kuner@bessy.de
parents: 2436
diff changeset
111
edf7037215c1 phytronFilterIpPoerLog.pl: Translate status to readable string
Bernhard.Kuner@bessy.de
parents: 2436
diff changeset
112 $msg .= " LS_Err" if(($hex & 0x1000));
edf7037215c1 phytronFilterIpPoerLog.pl: Translate status to readable string
Bernhard.Kuner@bessy.de
parents: 2436
diff changeset
113 $msg .= " PwrStg_Err" if(($hex & 0x20000));
edf7037215c1 phytronFilterIpPoerLog.pl: Translate status to readable string
Bernhard.Kuner@bessy.de
parents: 2436
diff changeset
114
edf7037215c1 phytronFilterIpPoerLog.pl: Translate status to readable string
Bernhard.Kuner@bessy.de
parents: 2436
diff changeset
115 $msg .= " RUN" if(($hex & 0x10000));
edf7037215c1 phytronFilterIpPoerLog.pl: Translate status to readable string
Bernhard.Kuner@bessy.de
parents: 2436
diff changeset
116 $msg .= " DONE" if(($hex & 0x80000));
edf7037215c1 phytronFilterIpPoerLog.pl: Translate status to readable string
Bernhard.Kuner@bessy.de
parents: 2436
diff changeset
117 return "$reply, 0x$hex STAT:$msg";
edf7037215c1 phytronFilterIpPoerLog.pl: Translate status to readable string
Bernhard.Kuner@bessy.de
parents: 2436
diff changeset
118 }

mercurial