line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Finnigan::InstID; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
68
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings FATAL => qw( all ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
91
|
|
5
|
|
|
|
|
|
|
our $VERSION = 0.0206; |
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
9
|
use Finnigan; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
38
|
|
8
|
2
|
|
|
2
|
|
8
|
use base 'Finnigan::Decoder'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
143
|
|
9
|
|
|
|
|
|
|
|
10
|
2
|
|
|
2
|
|
9
|
use overload ('""' => 'stringify'); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
10
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub decode { |
13
|
1
|
|
|
1
|
1
|
541
|
my ($class, $stream) = @_; |
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
|
|
15
|
my $fields = [ |
16
|
|
|
|
|
|
|
"unknown data" => ['C8', 'RawBytes'], |
17
|
|
|
|
|
|
|
"unknown long[1]" => ['V', 'UInt32'], |
18
|
|
|
|
|
|
|
"model[1]" => ['varstr', 'PascalStringWin32'], |
19
|
|
|
|
|
|
|
"model[2]" => ['varstr', 'PascalStringWin32'], |
20
|
|
|
|
|
|
|
"serial number" => ['varstr', 'PascalStringWin32'], |
21
|
|
|
|
|
|
|
"software version" => ['varstr', 'PascalStringWin32'], |
22
|
|
|
|
|
|
|
"tag[1]" => ['varstr', 'PascalStringWin32'], |
23
|
|
|
|
|
|
|
"tag[2]" => ['varstr', 'PascalStringWin32'], |
24
|
|
|
|
|
|
|
"tag[3]" => ['varstr', 'PascalStringWin32'], |
25
|
|
|
|
|
|
|
"tag[4]" => ['varstr', 'PascalStringWin32'], |
26
|
|
|
|
|
|
|
]; |
27
|
|
|
|
|
|
|
|
28
|
1
|
|
|
|
|
9
|
my $self = Finnigan::Decoder->read($stream, $fields); |
29
|
|
|
|
|
|
|
|
30
|
1
|
|
|
|
|
8
|
return bless $self, $class; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub model { |
34
|
1
|
|
|
1
|
1
|
88
|
shift->{data}->{"model[1]"}->{value}; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub serial_number { |
38
|
0
|
|
|
0
|
1
|
|
shift->{data}->{"serial number"}->{value}; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub software_version { |
42
|
0
|
|
|
0
|
1
|
|
shift->{data}->{"software version"}->{value}; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub stringify { |
46
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
47
|
0
|
|
|
|
|
|
return $self->model |
48
|
|
|
|
|
|
|
. ", S/N: " . $self->serial_number |
49
|
|
|
|
|
|
|
. "; software version " . $self->software_version; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
__END__ |