]> sigrok.org Git - libsigrokdecode.git/blame - decoders/common/plugtrx/mod.py
license: remove FSF postal address from boiler plate license text
[libsigrokdecode.git] / decoders / common / plugtrx / mod.py
CommitLineData
1049c90f
BV
1##
2## This file is part of the libsigrokdecode project.
3##
4## Copyright (C) 2016 Bert Vermeulen <bert@biot.com>
5##
6## This program is free software; you can redistribute it and/or modify
7## it under the terms of the GNU General Public License as published by
8## the Free Software Foundation; either version 3 of the License, or
9## (at your option) any later version.
10##
11## This program is distributed in the hope that it will be useful,
12## but WITHOUT ANY WARRANTY; without even the implied warranty of
13## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14## GNU General Public License for more details.
15##
16## You should have received a copy of the GNU General Public License
17## along with this program; if not, see <http://www.gnu.org/licenses/>.
18##
19
20# This module contains definitions for use by pluggable network adapters,
21# such as SFP, XFP etc.
22
23MODULE_ID = {
24 0x01: 'GBIC',
25 0x02: 'Integrated module/connector',
26 0x03: 'SFP',
27 0x04: '300-pin XBI',
28 0x05: 'XENPAK',
29 0x06: 'XFP',
30 0x07: 'XFF',
31 0x08: 'XFP-E',
32 0x09: 'XPAK',
33 0x0a: 'X2',
34}
35
36ALARM_THRESHOLDS = {
a9f7935a
UH
37 0: 'Temp high alarm',
38 2: 'Temp low alarm',
39 4: 'Temp high warning',
40 6: 'Temp low warning',
41 16: 'Bias high alarm',
42 18: 'Bias low alarm',
43 20: 'Bias high warning',
44 22: 'Bias low warning',
45 24: 'TX power high alarm',
46 26: 'TX power low alarm',
47 28: 'TX power high warning',
48 30: 'TX power low warning',
49 32: 'RX power high alarm',
50 34: 'RX power low alarm',
51 36: 'RX power high warning',
52 38: 'RX power low warning',
53 40: 'AUX 1 high alarm',
54 42: 'AUX 1 low alarm',
55 44: 'AUX 1 high warning',
56 46: 'AUX 1 low warning',
57 48: 'AUX 2 high alarm',
58 50: 'AUX 2 low alarm',
59 52: 'AUX 2 high warning',
60 54: 'AUX 2 low warning',
1049c90f
BV
61}
62
63AD_READOUTS = {
a9f7935a
UH
64 0: 'Module temperature',
65 4: 'TX bias current',
66 6: 'Measured TX output power',
67 8: 'Measured RX input power',
68 10: 'AUX 1 measurement',
69 12: 'AUX 2 measurement',
1049c90f
BV
70}
71
72GCS_BITS = [
a9f7935a
UH
73 'TX disable',
74 'Soft TX disable',
75 'MOD_NR',
76 'P_Down',
77 'Soft P_Down',
78 'Interrupt',
79 'RX_LOS',
80 'Data_Not_Ready',
81 'TX_NR',
82 'TX_Fault',
83 'TX_CDR not locked',
84 'RX_NR',
85 'RX_CDR not locked',
1049c90f
BV
86]
87
88CONNECTOR = {
a9f7935a
UH
89 0x01: 'SC',
90 0x02: 'Fibre Channel style 1 copper',
91 0x03: 'Fibre Channel style 2 copper',
92 0x04: 'BNC/TNC',
93 0x05: 'Fibre Channel coax',
94 0x06: 'FiberJack',
95 0x07: 'LC',
96 0x08: 'MT-RJ',
97 0x09: 'MU',
98 0x0a: 'SG',
99 0x0b: 'Optical pigtail',
100 0x20: 'HSSDC II',
101 0x21: 'Copper pigtail',
1049c90f
BV
102}
103
104TRANSCEIVER = [
105 # 10GB Ethernet
a9f7935a
UH
106 ['10GBASE-SR', '10GBASE-LR', '10GBASE-ER', '10GBASE-LRM', '10GBASE-SW',
107 '10GBASE-LW', '10GBASE-EW'],
1049c90f 108 # 10GB Fibre Channel
a9f7935a
UH
109 ['1200-MX-SN-I', '1200-SM-LL-L', 'Extended Reach 1550 nm',
110 'Intermediate reach 1300 nm FP'],
1049c90f
BV
111 # 10GB Copper
112 [],
113 # 10GB low speed
a9f7935a
UH
114 ['1000BASE-SX / 1xFC MMF', '1000BASE-LX / 1xFC SMF', '2xFC MMF',
115 '2xFC SMF', 'OC48-SR', 'OC48-IR', 'OC48-LR'],
1049c90f 116 # 10GB SONET/SDH interconnect
a9f7935a 117 ['I-64.1r', 'I-64.1', 'I-64.2r', 'I-64.2', 'I-64.3', 'I-64.5'],
1049c90f 118 # 10GB SONET/SDH short haul
a9f7935a 119 ['S-64.1', 'S-64.2a', 'S-64.2b', 'S-64.3a', 'S-64.3b', 'S-64.5a', 'S-64.5b'],
1049c90f 120 # 10GB SONET/SDH long haul
a9f7935a 121 ['L-64.1', 'L-64.2a', 'L-64.2b', 'L-64.2c', 'L-64.3', 'G.959.1 P1L1-2D2'],
1049c90f 122 # 10GB SONET/SDH very long haul
a9f7935a 123 ['V-64.2a', 'V-64.2b', 'V-64.3'],
1049c90f
BV
124]
125
126SERIAL_ENCODING = [
a9f7935a
UH
127 '64B/66B',
128 '8B/10B',
129 'SONET scrambled',
130 'NRZ',
131 'RZ',
1049c90f
BV
132]
133
134XMIT_TECH = [
a9f7935a
UH
135 '850 nm VCSEL',
136 '1310 nm VCSEL',
137 '1550 nm VCSEL',
138 '1310 nm FP',
139 '1310 nm DFB',
140 '1550 nm DFB',
141 '1310 nm EML'
142 '1550 nm EML'
143 'copper',
1049c90f
BV
144]
145
146CDR = [
a9f7935a
UH
147 '9.95Gb/s',
148 '10.3Gb/s',
149 '10.5Gb/s',
150 '10.7Gb/s',
151 '11.1Gb/s',
152 '(unknown)',
153 'lineside loopback mode',
154 'XFI loopback mode',
1049c90f
BV
155]
156
157DEVICE_TECH = [
a9f7935a
UH
158 ['no wavelength control', 'sctive wavelength control'],
159 ['uncooled transmitter device', 'cooled transmitter'],
160 ['PIN detector', 'APD detector'],
161 ['transmitter not tunable', 'transmitter tunable'],
1049c90f
BV
162]
163
164ENHANCED_OPTS = [
a9f7935a
UH
165 'VPS',
166 'soft TX_DISABLE',
167 'soft P_Down',
168 'VPS LV regulator mode',
169 'VPS bypassed regulator mode',
170 'active FEC control',
171 'wavelength tunability',
172 'CMU',
1049c90f
BV
173]
174
175AUX_TYPES = [
a9f7935a
UH
176 'not implemented',
177 'APD bias voltage',
178 '(unknown)',
179 'TEC current',
180 'laser temperature',
181 'laser wavelength',
182 '5V supply voltage',
183 '3.3V supply voltage',
184 '1.8V supply voltage',
185 '-5.2V supply voltage',
186 '5V supply current',
187 '(unknown)',
188 '(unknown)',
189 '3.3V supply current',
190 '1.8V supply current',
191 '-5.2V supply current',
1049c90f 192]