| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
############################################################ |
|
2
|
|
|
|
|
|
|
# |
|
3
|
|
|
|
|
|
|
# $Id: Constants.pm 976 2007-03-04 20:47:36Z nicolaw $ |
|
4
|
|
|
|
|
|
|
# Parse::DMIDecode::Constants - SMBIOS Constants |
|
5
|
|
|
|
|
|
|
# |
|
6
|
|
|
|
|
|
|
# Copyright 2006 Nicola Worthington |
|
7
|
|
|
|
|
|
|
# |
|
8
|
|
|
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); |
|
9
|
|
|
|
|
|
|
# you may not use this file except in compliance with the License. |
|
10
|
|
|
|
|
|
|
# You may obtain a copy of the License at |
|
11
|
|
|
|
|
|
|
# |
|
12
|
|
|
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0 |
|
13
|
|
|
|
|
|
|
# |
|
14
|
|
|
|
|
|
|
# Unless required by applicable law or agreed to in writing, software |
|
15
|
|
|
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, |
|
16
|
|
|
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
17
|
|
|
|
|
|
|
# See the License for the specific language governing permissions and |
|
18
|
|
|
|
|
|
|
# limitations under the License. |
|
19
|
|
|
|
|
|
|
# |
|
20
|
|
|
|
|
|
|
############################################################ |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
package Parse::DMIDecode::Constants; |
|
23
|
|
|
|
|
|
|
# vim:ts=4:sw=4:tw=78 |
|
24
|
|
|
|
|
|
|
|
|
25
|
4
|
|
|
4
|
|
21
|
use strict; |
|
|
4
|
|
|
|
|
7
|
|
|
|
4
|
|
|
|
|
193
|
|
|
26
|
|
|
|
|
|
|
require Exporter; |
|
27
|
4
|
|
|
|
|
1726
|
use vars qw($VERSION $DEBUG |
|
28
|
|
|
|
|
|
|
@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS |
|
29
|
4
|
|
|
4
|
|
24
|
@TYPES %GROUPS %TYPE2GROUP); |
|
|
4
|
|
|
|
|
7
|
|
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
@ISA = qw(Exporter); |
|
32
|
|
|
|
|
|
|
@EXPORT = qw(); |
|
33
|
|
|
|
|
|
|
@EXPORT_OK = qw(@TYPES %GROUPS %TYPE2GROUP); |
|
34
|
|
|
|
|
|
|
%EXPORT_TAGS = (all => \@EXPORT_OK); |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
$VERSION = '0.03' || sprintf('%d', q$Revision: 976 $ =~ /(\d+)/g); |
|
37
|
|
|
|
|
|
|
$DEBUG ||= $ENV{DEBUG} ? 1 : 0; |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
@TYPES = ( # Description Index Group(s) |
|
40
|
|
|
|
|
|
|
'BIOS', # 0 bios |
|
41
|
|
|
|
|
|
|
'System', # 1 system |
|
42
|
|
|
|
|
|
|
'Base Board', # 2 baseboard |
|
43
|
|
|
|
|
|
|
'Chassis', # 3 chassis |
|
44
|
|
|
|
|
|
|
'Processor', # 4 processor |
|
45
|
|
|
|
|
|
|
'Memory Controller', # 5 memory |
|
46
|
|
|
|
|
|
|
'Memory Module', # 6 memory |
|
47
|
|
|
|
|
|
|
'Cache', # 7 cache |
|
48
|
|
|
|
|
|
|
'Port Connector', # 8 connector |
|
49
|
|
|
|
|
|
|
'System Slots', # 9 slot |
|
50
|
|
|
|
|
|
|
'On Board Devices', # 10 baseboard |
|
51
|
|
|
|
|
|
|
'OEM Strings', # 11 |
|
52
|
|
|
|
|
|
|
'System Configuration Options', # 12 system |
|
53
|
|
|
|
|
|
|
'BIOS Language', # 13 bios |
|
54
|
|
|
|
|
|
|
'Group Associations', # 14 |
|
55
|
|
|
|
|
|
|
'System Event Log', # 15 system |
|
56
|
|
|
|
|
|
|
'Physical Memory Array', # 16 memory |
|
57
|
|
|
|
|
|
|
'Memory Device', # 17 memory |
|
58
|
|
|
|
|
|
|
'32-bit Memory Error', # 18 |
|
59
|
|
|
|
|
|
|
'Memory Array Mapped Address', # 19 |
|
60
|
|
|
|
|
|
|
'Memory Device Mapped Address', # 20 |
|
61
|
|
|
|
|
|
|
'Built-in Pointing Device', # 21 |
|
62
|
|
|
|
|
|
|
'Portable Battery', # 22 |
|
63
|
|
|
|
|
|
|
'System Reset', # 23 system |
|
64
|
|
|
|
|
|
|
'Hardware Security', # 24 |
|
65
|
|
|
|
|
|
|
'System Power Controls', # 25 |
|
66
|
|
|
|
|
|
|
'Voltage Probe', # 26 |
|
67
|
|
|
|
|
|
|
'Cooling Device', # 27 |
|
68
|
|
|
|
|
|
|
'Temperature Probe', # 28 |
|
69
|
|
|
|
|
|
|
'Electrical Current Probe', # 29 |
|
70
|
|
|
|
|
|
|
'Out-of-band Remote Access', # 30 |
|
71
|
|
|
|
|
|
|
'Boot Integrity Services', # 31 |
|
72
|
|
|
|
|
|
|
'System Boot', # 32 system |
|
73
|
|
|
|
|
|
|
'64-bit Memory Error', # 33 |
|
74
|
|
|
|
|
|
|
'Management Device', # 34 |
|
75
|
|
|
|
|
|
|
'Management Device Component', # 35 |
|
76
|
|
|
|
|
|
|
'Management Device Threshold Data', # 36 |
|
77
|
|
|
|
|
|
|
'Memory Channel', # 37 |
|
78
|
|
|
|
|
|
|
'IPMI Device', # 38 |
|
79
|
|
|
|
|
|
|
'Power Supply' # 39 |
|
80
|
|
|
|
|
|
|
); |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
%GROUPS = ( |
|
83
|
|
|
|
|
|
|
'bios' => [ qw(0 13) ], |
|
84
|
|
|
|
|
|
|
'system' => [ qw(1 12 15 23 32) ], |
|
85
|
|
|
|
|
|
|
'baseboard' => [ qw(2 10) ], |
|
86
|
|
|
|
|
|
|
'chassis' => [ qw(3) ], |
|
87
|
|
|
|
|
|
|
'processor' => [ qw(4) ], |
|
88
|
|
|
|
|
|
|
'memory' => [ qw(5 6 16 17) ], |
|
89
|
|
|
|
|
|
|
'cache' => [ qw(7) ], |
|
90
|
|
|
|
|
|
|
'connector' => [ qw(8) ], |
|
91
|
|
|
|
|
|
|
'slot' => [ qw(9) ], |
|
92
|
|
|
|
|
|
|
); |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
%TYPE2GROUP = (); |
|
95
|
|
|
|
|
|
|
for my $group (keys %GROUPS) { |
|
96
|
|
|
|
|
|
|
for my $dmitype (@{$GROUPS{$group}}) { |
|
97
|
|
|
|
|
|
|
$TYPE2GROUP{$dmitype} = $group; |
|
98
|
|
|
|
|
|
|
} |
|
99
|
|
|
|
|
|
|
} |
|
100
|
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
1; |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=pod |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head1 NAME |
|
108
|
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
Parse::DMIDecode::Constants - SMBIOS Constants |
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
use strict; |
|
114
|
|
|
|
|
|
|
use Parse::DMIDecode::Constants qw(@TYPES %GROUPS); |
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
117
|
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
This module provides and can export constants relating to the SMBIOS |
|
119
|
|
|
|
|
|
|
specification and dmidecode interface command. |
|
120
|
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=head1 EXPORTS |
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=head2 @TYPES |
|
124
|
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=head2 %GROUPS |
|
126
|
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
128
|
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
L |
|
130
|
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=head1 VERSION |
|
132
|
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
$Id: Constants.pm 976 2007-03-04 20:47:36Z nicolaw $ |
|
134
|
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=head1 AUTHOR |
|
136
|
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
Nicola Worthington |
|
138
|
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
L |
|
140
|
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
If you like this software, why not show your appreciation by sending the |
|
142
|
|
|
|
|
|
|
author something nice from her |
|
143
|
|
|
|
|
|
|
L? |
|
144
|
|
|
|
|
|
|
( http://www.amazon.co.uk/gp/registry/1VZXC59ESWYK0?sort=priority ) |
|
145
|
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=head1 COPYRIGHT |
|
147
|
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
Copyright 2006 Nicola Worthington. |
|
149
|
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
This software is licensed under The Apache Software License, Version 2.0. |
|
151
|
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
L |
|
153
|
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=cut |
|
155
|
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
__END__ |