summaryrefslogtreecommitdiff
path: root/common/plugtrx/mod.py
blob: 3d1b66ddfbde2145e6b2f20c211db9bbd5e5a23c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
##
## This file is part of the libsigrokdecode project.
##
## Copyright (C) 2016 Bert Vermeulen <bert@biot.com>
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, see <http://www.gnu.org/licenses/>.
##

# This module contains definitions for use by pluggable network adapters,
# such as SFP, XFP etc.

MODULE_ID = {
    0x01: 'GBIC',
    0x02: 'Integrated module/connector',
    0x03: 'SFP',
    0x04: '300-pin XBI',
    0x05: 'XENPAK',
    0x06: 'XFP',
    0x07: 'XFF',
    0x08: 'XFP-E',
    0x09: 'XPAK',
    0x0a: 'X2',
}

ALARM_THRESHOLDS = {
    0:  'Temp high alarm',
    2:  'Temp low alarm',
    4:  'Temp high warning',
    6:  'Temp low warning',
    16: 'Bias high alarm',
    18: 'Bias low alarm',
    20: 'Bias high warning',
    22: 'Bias low warning',
    24: 'TX power high alarm',
    26: 'TX power low alarm',
    28: 'TX power high warning',
    30: 'TX power low warning',
    32: 'RX power high alarm',
    34: 'RX power low alarm',
    36: 'RX power high warning',
    38: 'RX power low warning',
    40: 'AUX 1 high alarm',
    42: 'AUX 1 low alarm',
    44: 'AUX 1 high warning',
    46: 'AUX 1 low warning',
    48: 'AUX 2 high alarm',
    50: 'AUX 2 low alarm',
    52: 'AUX 2 high warning',
    54: 'AUX 2 low warning',
}

AD_READOUTS = {
    0:  'Module temperature',
    4:  'TX bias current',
    6:  'Measured TX output power',
    8:  'Measured RX input power',
    10: 'AUX 1 measurement',
    12: 'AUX 2 measurement',
}

GCS_BITS = [
    'TX disable',
    'Soft TX disable',
    'MOD_NR',
    'P_Down',
    'Soft P_Down',
    'Interrupt',
    'RX_LOS',
    'Data_Not_Ready',
    'TX_NR',
    'TX_Fault',
    'TX_CDR not locked',
    'RX_NR',
    'RX_CDR not locked',
]

CONNECTOR = {
    0x01:   'SC',
    0x02:   'Fibre Channel style 1 copper',
    0x03:   'Fibre Channel style 2 copper',
    0x04:   'BNC/TNC',
    0x05:   'Fibre Channel coax',
    0x06:   'FiberJack',
    0x07:   'LC',
    0x08:   'MT-RJ',
    0x09:   'MU',
    0x0a:   'SG',
    0x0b:   'Optical pigtail',
    0x20:   'HSSDC II',
    0x21:   'Copper pigtail',
}

TRANSCEIVER = [
    # 10GB Ethernet
    ['10GBASE-SR', '10GBASE-LR', '10GBASE-ER', '10GBASE-LRM', '10GBASE-SW',
        '10GBASE-LW',   '10GBASE-EW'],
    # 10GB Fibre Channel
    ['1200-MX-SN-I', '1200-SM-LL-L', 'Extended Reach 1550 nm',
        'Intermediate reach 1300 nm FP'],
    # 10GB Copper
    [],
    # 10GB low speed
    ['1000BASE-SX / 1xFC MMF', '1000BASE-LX / 1xFC SMF', '2xFC MMF',
        '2xFC SMF', 'OC48-SR', 'OC48-IR', 'OC48-LR'],
    # 10GB SONET/SDH interconnect
    ['I-64.1r', 'I-64.1', 'I-64.2r', 'I-64.2', 'I-64.3', 'I-64.5'],
    # 10GB SONET/SDH short haul
    ['S-64.1', 'S-64.2a', 'S-64.2b', 'S-64.3a', 'S-64.3b', 'S-64.5a', 'S-64.5b'],
    # 10GB SONET/SDH long haul
    ['L-64.1', 'L-64.2a', 'L-64.2b', 'L-64.2c', 'L-64.3', 'G.959.1 P1L1-2D2'],
    # 10GB SONET/SDH very long haul
    ['V-64.2a', 'V-64.2b', 'V-64.3'],
]

SERIAL_ENCODING = [
    '64B/66B',
    '8B/10B',
    'SONET scrambled',
    'NRZ',
    'RZ',
]

XMIT_TECH = [
    '850 nm VCSEL',
    '1310 nm VCSEL',
    '1550 nm VCSEL',
    '1310 nm FP',
    '1310 nm DFB',
    '1550 nm DFB',
    '1310 nm EML'
    '1550 nm EML'
    'copper',
]

CDR = [
    '9.95Gb/s',
    '10.3Gb/s',
    '10.5Gb/s',
    '10.7Gb/s',
    '11.1Gb/s',
    '(unknown)',
    'lineside loopback mode',
    'XFI loopback mode',
]

DEVICE_TECH = [
    ['no wavelength control', 'sctive wavelength control'],
    ['uncooled transmitter device', 'cooled transmitter'],
    ['PIN detector', 'APD detector'],
    ['transmitter not tunable', 'transmitter tunable'],
]

ENHANCED_OPTS = [
    'VPS',
    'soft TX_DISABLE',
    'soft P_Down',
    'VPS LV regulator mode',
    'VPS bypassed regulator mode',
    'active FEC control',
    'wavelength tunability',
    'CMU',
]

AUX_TYPES = [
    'not implemented',
    'APD bias voltage',
    '(unknown)',
    'TEC current',
    'laser temperature',
    'laser wavelength',
    '5V supply voltage',
    '3.3V supply voltage',
    '1.8V supply voltage',
    '-5.2V supply voltage',
    '5V supply current',
    '(unknown)',
    '(unknown)',
    '3.3V supply current',
    '1.8V supply current',
    '-5.2V supply current',
]