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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
|
<template>
<div>
<div class="form-floating mb-3">
<textarea v-if="type === 'eeprom-ethtool'" type="text" class="form-control" placeholder="EEPROM input" id="eeprom" v-model="eeprom"></textarea>
<input v-else type="text" class="form-control" placeholder="EEPROM input" id="eeprom" v-model="eeprom">
<label for="eeprom">EEPROM input</label>
</div>
<template v-if="type === 'eeprom-lantiq'">
<div class="form-floating mb-3">
<select class="form-control" placeholder="Select EEPROM" id="eeprom-type" v-model="eeprom_switch">
<option value="A0">EEPROM A0</option>
<option value="A2">EEPROM A2</option>
</select>
<label for="eeprom-type">Select EEPROM A0 or A2</label>
</div>
<div class="table-wrapper">
<table>
<tr>
<th>address</th>
<th>size</th>
<th>name</th>
<th>hex value</th>
<th>decoded value</th>
<th>description</th>
</tr>
<tr v-for="(value, key, index) in eeprom_json" :key="index">
<td>{{ value.address }}</td>
<td>{{ value.size }}</td>
<td v-if="value.name.startsWith('**')"><b>{{ value.name.replaceAll('**', '') }}</b></td>
<td v-else>{{ value.name }}</td>
<td><code v-if="value.value">{{ chunk(value.value)?.map(it => `0x${it}`)?.join(' ') }}</code></td>
<td><span v-if="value.human">{{ value.human }}</span></td>
<td v-if="value.description.startsWith('**')"><b>{{ value.description.replaceAll('**', '') }}</b></td>
<td v-else>{{ value.description }}</td>
</tr>
</table>
</div>
<div markdown="span" class="alert alert-blue" role="alert" v-if="revision">
<svg viewBox="0 0 24 24" class="info-icon"><use xlink:href="#svg-info"></use></svg>
<span> <b>Info</b> For more information, see the {{ revision }} specification.</span>
</div>
</template>
<template v-if="type === 'eeprom-ethtool'">
<div class="form-floating mb-3">
<select class="form-control" placeholder="Select EEPROM" id="eeprom-type" v-model="eeprom_switch">
<option value="A0">EEPROM A0</option>
<option value="A2">EEPROM A2</option>
</select>
<label for="eeprom-type">Select EEPROM A0 or A2</label>
</div>
<div class="table-wrapper">
<table>
<tr>
<th>address</th>
<th>size</th>
<th>name</th>
<th>hex value</th>
<th>decoded value</th>
<th>description</th>
</tr>
<tr v-for="(value, key, index) in eeprom_json" :key="index">
<td>{{ value.address }}</td>
<td>{{ value.size }}</td>
<td v-if="value.name.startsWith('**')"><b>{{ value.name.replaceAll('**', '') }}</b></td>
<td v-else>{{ value.name }}</td>
<td><code v-if="value.value">{{ chunk(value.value)?.map(it => `0x${it}`)?.join(' ') }}</code></td>
<td><span v-if="value.human">{{ value.human }}</span></td>
<td v-if="value.description.startsWith('**')"><b>{{ value.description.replaceAll('**', '') }}</b></td>
<td v-else>{{ value.description }}</td>
</tr>
</table>
</div>
<div markdown="span" class="alert alert-blue" role="alert" v-if="revision">
<svg viewBox="0 0 24 24" class="info-icon"><use xlink:href="#svg-info"></use></svg>
<span> <b>Info</b> For more information, see the {{ revision }} specification.</span>
</div>
</template>
<template v-if="type === 'eeprom-rooted-edit'">
<div class="form-floating mb-3">
<input type="text" class="form-control" placeholder="GPON S/N HEX" id="gpon-serial" v-model="serial_hex" style="width: 50%">
<input type="text" class="form-control" placeholder="GPON S/N ASCII" id="gpon-serial-ascii" v-model="serial_ascii" style="width: 50%">
<label for="gpon-serial">GPON S/N in format 0x47504F4E12345678 or GPON12345678</label>
</div>
<div class="form-floating mb-3">
<select class="form-control" placeholder="GPON Ploam/LoID Switch" id="gpon-loid-ploam-switch" v-model="loidPloamSwitch">
<option value="02">GPON PLOAM</option>
<option value="01">GPON LoID</option>
</select>
<label for="gpon-loid-ploam-switch">GPON Ploam/LoID Switch</label>
</div>
<div class="form-floating mb-3" v-if="loidPloamSwitch === '02'">
<input type="text" class="form-control" placeholder="GPON Ploam Password HEX" id="gpon-ploam" v-model="ploam_hex" style="width: 50%">
<input type="text" class="form-control" placeholder="GPON Ploam Password ASCII" id="gpon-ploam-ascii" v-model="ploam_ascii" style="width: 50%">
<label for="gpon-ploam">GPON Ploam in format 0x31323334353637383930 or 1234567890</label>
</div>
<div class="form-floating mb-3" v-if="loidPloamSwitch === '01'">
<input type="text" class="form-control" placeholder="GPON LoID User" id="gpon-loid" v-model="loid_hex" style="width: 50%">
<input type="text" class="form-control" placeholder="GPON LoID User" id="gpon-loid-ascii" v-model="loid_ascii" style="width: 50%">
<label for="gpon-loid">GPON LoID User in hex format 0x31323334353637383930 or 1234567890</label>
</div>
<div class="form-floating mb-3" v-if="loidPloamSwitch === '01'">
<input type="text" class="form-control" placeholder="GPON LoPW Password" id="gpon-lopw" v-model="lopw_hex" style="width: 50%">
<input type="text" class="form-control" placeholder="GPON LoPW Password" id="gpon-lopw-ascii" v-model="lopw_ascii" style="width: 50%">
<label for="gpon-lopw">GPON LoPW Password in hex format 0x31323334353637383930 or 1234567890</label>
</div>
<div class="form-floating mb-3">
<input type="text" class="form-control" placeholder="MAC address" id="bridge-mac" v-model="mac_prettier" pattern="[0-9A-Fa-f]{2}[:-]?[0-9A-Fa-f]{2}[:-]?[0-9A-Fa-f]{2}[:-]?[0-9A-Fa-f]{2}[:-]?[0-9A-Fa-f]{2}[:-]?[0-9A-Fa-f]{2}">
<label for="bridge-mac">Bridge MAC Address in format 48:57:02:da:be:ef, 48-57-02-da-be-ef or 485702dabeef</label>
</div>
<div class="form-floating mb-3">
<input type="text" class="form-control" placeholder="sfp_a2_info output" id="sfp-a2-info" v-model="eeprom" readonly>
<label for="sfp-a2-info">sfp_a2_info output</label>
</div>
</template>
</div>
</template>
<script>
export default {
data() {
return {
raw: null,
eeprom_decode: null,
lantiq_0: null,
lantiq_last: null,
eeprom_table: {
"A0":[
{
"address": "",
"size": "",
"name": "**BASE ID FIELDS (SFF-8472)**",
"description": ""
},
{
"address": "0",
"size": "1",
"name": "Identifier",
"description": "Type of transceiver",
"parse": "table_identifier_values"
},
{
"address": "1",
"size": "1",
"name": "Ext identifier",
"description": "Additional information about the transceiver",
"parse": "table_phy_device_identifier_value"
},
{
"address": "2",
"size": "1",
"name": "Connector",
"description": "Type of media connector",
"parse": "table_connector_value"
},
{
"address": "3-10",
"size": "8",
"name": "Transceiver",
"description": "Code for optical compatibility"
},
{
"address": "11",
"size": "1",
"name": "Encoding",
"description": "High speed serial encoding algorithm",
"parse": "table_encoding_value"
},
{
"address": "12",
"size": "1",
"name": "Signaling Rate, Nominal",
"description": "Nominal signaling rate",
"parse": "hexToRate"
},
{
"address": "13",
"size": "1",
"name": "Rate Identifier",
"description": "Type of rate select functionality"
},
{
"address": "14",
"size": "1",
"name": "Length (SMF,km)",
"description": "Link length supported for single-mode fiber, units of km",
"parse": "hexTo_km"
},
{
"address": "15",
"size": "1",
"name": "Length (SMF)",
"description": "Link length supported for single-mode fiber, units of 100 m",
"parse": "hexTo100m"
},
{
"address": "16",
"size": "1",
"name": "Length (50 um, OM2)",
"description": "Link length supported for 50 um OM2 fiber, units of 10 m",
"parse": "hexTo10m"
},
{
"address": "17",
"size": "1",
"name": "Length (62.5 um, OM1)",
"description": "Link length supported for 62.5 um OM1 fiber, units of 10 m",
"parse": "hexTo10m"
},
{
"address": "18",
"size": "1",
"name": "Length copper cable",
"description": "Link length supported for copper or direct attach cable, units of m",
"parse": "hexTo_m"
},
{
"address": "19",
"size": "1",
"name": "Length (50 um, OM3)",
"description": "Link length supported for 50 um OM3 fiber, units of 10 m",
"parse": "hexTo10m"
},
{
"address": "20-35",
"size": "16",
"name": "Vendor name",
"description": "SFP vendor name (ASCII)",
"parse": "hexToAscii"
},
{
"address": "36",
"size": "1",
"name": "Transceiver",
"description": "Code for optical compatibility",
"parse":"table_extended_specification_compliance_codeds"
},
{
"address": "37-39",
"size": "3",
"name": "Vendor OUI",
"description": "SFP vendor IEEE company ID"
},
{
"address": "40-55",
"size": "16",
"name": "Vendor PN",
"description": "Part number provided by SFP vendor (ASCII)",
"parse": "hexToAscii"
},
{
"address": "56-59",
"size": "4",
"name": "Vendor rev",
"description": "Revision level for part number provided by vendor (ASCII)",
"parse": "hexToAscii"
},
{
"address": "60-61",
"size": "2",
"name": "Wavelength",
"description": "Laser wavelength",
"parse": "hexTo_nm"
},
{
"address": "62",
"size": "1",
"name": "Fibre Channel Speed 2",
"description": "Transceiver's Fibre Channel speed capabilities"
},
{
"address": "63",
"size": "1",
"name": "CC_BASE",
"description": "Check code for Base ID Fields (addresses 0 to 62)"
},
{
"address": "",
"size": "",
"name": "**EXTENDED ID FIELDS (SFF-8472)**",
"description": ""
},
{
"address": "64-65",
"size": "2",
"name": "Options",
"description": "Indicates which optional transceiver signals are implemented"
},
{
"address": "66",
"size": "1",
"name": "Signaling Rate, max",
"description": "Upper signaling rate margin, units of %"
},
{
"address": "67",
"size": "1",
"name": "Signaling Rate, min",
"description": "Lower signaling rate margin, units of %"
},
{
"address": "68-83",
"size": "16",
"name": "Vendor SN",
"description": "Serial number provided by vendor (ASCII)",
"parse": "hexToAscii"
},
{
"address": "84-91",
"size": "8",
"name": "Date code",
"description": "Vendor's manufacturing date code"
},
{
"address": "92",
"size": "1",
"name": "Diagnostic Monitoring Type",
"description": "Indicates which type of diagnostic monitoring is implemented",
"parse":"table_diagnostic_monitoring_type"
},
{
"address": "93",
"size": "1",
"name": "Enhanced Options",
"description": "Indicates which optional enhanced features are implemented",
"parse":"table_enhanced_options"
},
{
"address": "94",
"size": "1",
"name": "SFF-8472 Compliance",
"description": "Indicates which revision of SFF-8472 the transceiver complies with",
"parse":"table_compliance"
},
{
"address": "95",
"size": "1",
"name": "CC_EXT",
"description": "Check code for the Extended ID Fields (addresses 64 to 94)"
},
{
"address": "",
"size": "",
"name": "**VENDOR SPECIFIC FIELDS**",
"description": ""
},
{
"address": "96-127",
"size": "32",
"name": "Vendor data",
"description": "Vendor specifc data (ASCII)",
"parse": "hexToAscii"
},
{
"address": "128-255",
"size": "128",
"name": "Reserved",
"description": "Reserved"
},
{
"address": "",
"size": "",
"name": "**EXTRA EEPROM FIELDS**",
"description": "**Not exposed to I2C interface**"
},
{
"address": "256-639",
"size": "384",
"name": "Reserved",
"description": "Reserved"
}
],
"A2":[
{
"address": "",
"size": "",
"name": "**DIAGNOSTIC AND CONTROL FIELDS**",
"description": ""
},
{
"address": "0-1",
"size": "2",
"name": "Temp High Alarm",
"description": "",
"parse": "hexToTemp"
},
{
"address": "2-3",
"size": "2",
"name": "Temp Low Alarm",
"description": "",
"parse": "hexToTemp"
},
{
"address": "4-5",
"size": "2",
"name": "Temp High Warning",
"description": "",
"parse": "hexToTemp"
},
{
"address": "6-7",
"size": "2",
"name": "Temp Low Warning",
"description": "",
"parse": "hexToTemp"
},
{
"address": "8-9",
"size": "2",
"name": "Voltage High Alarm",
"description": "",
"parse": "hexToVolt"
},
{
"address": "10-11",
"size": "2",
"name": "Voltage Low Alarm",
"description": "",
"parse": "hexToVolt"
},
{
"address": "12-13",
"size": "2",
"name": "Voltage High Warning",
"description": "",
"parse": "hexToVolt"
},
{
"address": "14-15",
"size": "2",
"name": "Voltage Low Warning",
"description": "",
"parse": "hexToVolt"
},
{
"address": "16-17",
"size": "2",
"name": "Bias High Alarm",
"description": "",
"parse": "hexToMilliAmpere"
},
{
"address": "18-19",
"size": "2",
"name": "Bias Low Alarm",
"description": "",
"parse": "hexToMilliAmpere"
},
{
"address": "20-21",
"size": "2",
"name": "Bias High Warning",
"description": "",
"parse": "hexToMilliAmpere"
},
{
"address": "22-23",
"size": "2",
"name": "Bias Low Warning",
"description": "",
"parse": "hexToMilliAmpere"
},
{
"address": "24-25",
"size": "2",
"name": "TX Power High Alarm",
"description": "Value expressed in watts subunits",
"parse": "hex_suWTo_dBm"
},
{
"address": "26-27",
"size": "2",
"name": "TX Power Low Alarm",
"description": "Value expressed in watts subunits",
"parse": "hex_suWTo_dBm"
},
{
"address": "28-29",
"size": "2",
"name": "TX Power High Warning",
"description": "Value expressed in watts subunits",
"parse": "hex_suWTo_dBm"
},
{
"address": "30-31",
"size": "2",
"name": "TX Power Low Warning",
"description": "Value expressed in watts subunits",
"parse": "hex_suWTo_dBm"
},
{
"address": "32-33",
"size": "2",
"name": "RX Power High Alarm",
"description": "Value expressed in watts subunits",
"parse": "hex_suWTo_dBm"
},
{
"address": "34-35",
"size": "2",
"name": "RX Power Low Alarm",
"description": "Value expressed in watts subunits",
"parse": "hex_suWTo_dBm"
},
{
"address": "36-37",
"size": "2",
"name": "RX Power High Warning",
"description": "Value expressed in watts subunits",
"parse": "hex_suWTo_dBm"
},
{
"address": "38-39",
"size": "2",
"name": "RX Power Low Warning",
"description": "Value expressed in watts subunits",
"parse": "hex_suWTo_dBm"
},
{
"address": "40-45",
"size": "6",
"name": "MAC address",
"description": "Contains the mac address of the SFP, it could also be empty",
"parse": "hexToMac"
},
{
"address": "46-55",
"size": "10",
"name": "Reserved",
"description": "Reserved"
},
{
"address": "56-59",
"size": "4",
"name": "RX_PWR(4) Calibration",
"description": "4th order RSSI calibration coefficient"
},
{
"address": "60-63",
"size": "4",
"name": "RX_PWR(3) Calibration",
"description": "3rd order RSSI calibration coefficient"
},
{
"address": "64-67",
"size": "4",
"name": "RX_PWR(2) Calibration",
"description": "2nd order RSSI calibration coefficient"
},
{
"address": "68-71",
"size": "4",
"name": "RX_PWR(1) Calibration",
"description": "1st order RSSI calibration coefficient"
},
{
"address": "72-75",
"size": "4",
"name": "RX_PWR(0) Calibration",
"description": "0th order RSSI calibration coefficient"
},
{
"address": "76-77",
"size": "2",
"name": "TX_I(Slope) Calibration",
"description": "Slope for Bias calibration"
},
{
"address": "78-79",
"size": "2",
"name": "TX_I(Offset) Calibration",
"description": "Offset for Bias calibration"
},
{
"address": "80-81",
"size": "2",
"name": "TX_PWR(Slope) Calibration",
"description": "Slope for TX Power calibration"
},
{
"address": "82-83",
"size": "2",
"name": "TX_PWR(Offset) Calibration",
"description": "Offset for TX Power calibration"
},
{
"address": "84-85",
"size": "2",
"name": "T(Slope) Calibration",
"description": "Slope for Temperature calibration"
},
{
"address": "86-87",
"size": "2",
"name": "T(Offset) Calibration",
"description": "Offset for Temperature calibration, in units of 256ths °C"
},
{
"address": "88-89",
"size": "2",
"name": "V(Slope) Calibration",
"description": "Slope for VCC calibration"
},
{
"address": "90-91",
"size": "2",
"name": "V(Offset) Calibration",
"description": "Offset for VCC calibration"
},
{
"address": "92-94",
"size": "3",
"name": "Reserved",
"description": "Reserved"
},
{
"address": "95",
"size": "1",
"name": "CC_DMI",
"description": "Check code for Base Diagnostic Fields (addresses 0 to 94)"
},
{
"address": "96",
"size": "1",
"name": "Temperature MSB",
"description": "Internally measured module temperature"
},
{
"address": "97",
"size": "1",
"name": "Temperature LSB",
"description": ""
},
{
"address": "98",
"size": "1",
"name": "Vcc MSB",
"description": "Internally measured supply voltage in transceiver"
},
{
"address": "99",
"size": "1",
"name": "Vcc LSB",
"description": ""
},
{
"address": "100",
"size": "1",
"name": "TX Bias MSB",
"description": "Internally measured TX Bias Current"
},
{
"address": "101",
"size": "1",
"name": "TX Bias LSB",
"description": ""
},
{
"address": "102",
"size": "1",
"name": "TX Power MSB",
"description": "Measured TX output power"
},
{
"address": "103",
"size": "1",
"name": "TX Power LSB",
"description": ""
},
{
"address": "104",
"size": "1",
"name": "RX Power MSB",
"description": "Measured RX input power"
},
{
"address": "105",
"size": "1",
"name": "RX Power LSB",
"description": ""
},
{
"address": "106-109",
"size": "4",
"name": "Optional Diagnostics",
"description": "Monitor Data for Optional Laser temperature and TEC current"
},
{
"address": "110",
"size": "1",
"name": "Status/Control",
"description": "Optional Status and Control Bits",
"parse": "table_real_time_diagnostic_and_control"
},
{
"address": "111",
"size": "1",
"name": "Reserved",
"description": "Reserved"
},
{
"address": "112-113",
"size": "2",
"name": "Alarm Flags",
"description": "Diagnostic Alarm Flag Status Bits",
"parse": "table_alarm_and_warning"
},
{
"address": "114",
"size": "1",
"name": "Tx Input EQ control",
"description": "Tx Input equalization level control",
"parse": "hex_to_dBm"
},
{
"address": "115",
"size": "1",
"name": "Rx Out Emphasis control",
"description": "Rx Output emphasis level control",
"parse": "hex_to_dBm"
},
{
"address": "116-117",
"size": "2",
"name": "Warning Flags",
"description": "Diagnostic Warning Flag Status Bits",
"parse": "table_alarm_and_warning"
},
{
"address": "118-119",
"size": "2",
"name": "Ext Status/Control",
"description": "Extended module control and status bytes"
},
{
"address": "",
"size": "",
"name": "**GENERAL USE FIELDS**",
"description": ""
},
{
"address": "120-126",
"size": "7",
"name": "Vendor Specific",
"description": "Vendor specific memory addresses"
},
{
"address": "127",
"size": "1",
"name": "Table Select",
"description": "Optional Page Select"
},
{
"address": "",
"size": "",
"name": "**USER WRITABLE EEPROM**",
"description": ""
},
{
"address": "128-190",
"size": "63",
"name": "Reserved",
"description": "Reserved"
},
{
"address": "191-214",
"size": "24",
"name": "GPON LOID or PLOAM",
"description": "GPON Logical ONU ID or PLOAM, depends on `GPON LOID/PLOAM switch`",
"parse": "hexToAscii"
},
{
"address": "215-231",
"size": "17",
"name": "GPON LPWD",
"description": "GPON Logical Password",
"parse": "hexToAscii"
},
{
"address": "232",
"size": "1",
"name": "GPON LOID/PLOAM switch",
"description": "`0x01` to enable LOID, `0x02` to enable PLOAM"
},
{
"address": "233-240",
"size": "8",
"name": "GPON SN",
"description": "GPON Serial Number (ME 256)",
"parse": "hexToSerial"
},
{
"address": "241-247",
"size": "7",
"name": "Reserved",
"description": "Reserved"
},
{
"address": "248-255",
"size": "8",
"name": "Vendor Control",
"description": "Vendor specific control functions"
},
{
"address": "",
"size": "",
"name": "**EXTRA EEPROM FIELDS**",
"description": "**Not exposed to I2C interface**"
},
{
"address": "256-383",
"size": "128",
"name": "Unknown vendor specific",
"description": "Probably not used in current SFPs"
},
{
"address": "384-389",
"size": "6",
"name": "MAC address (Huawei Rooted Firmware)",
"description": "Contains the mac address of the SFP, probably it used only in Huawei Rooted Firmware",
"parse":"hexToMac"
},
{
"address": "390-511",
"size": "122",
"name": "Unknown vendor specific",
"description": "Probably not used in current SFPs"
},
{
"address": "512-531",
"size": "20",
"name": "GPON Equipment ID",
"description": "GPON Equipment ID (ME 257), may not work in some firmwares",
"parse": "hexToAscii"
},
{
"address": "532-535",
"size": "4",
"name": "GPON Vendor ID",
"description": "GPON Vendor ID (ME 256 and more), may not work in some firmware",
"parse": "hexToAscii"
},
{
"address": "536-639",
"size": "104",
"name": "Reserved",
"description": "Reserved"
}
]
},
eeprom_switch: "A0"
}
},
props: ['type'],
computed: {
revision: {
get() {
if (this.eeprom_switch === "A0") {
var rev = this.getPart(94, 94);
return rev !== "00" ? this.table_compliance(rev).slice(0, -1) ?? "SFF-8472" : "SFF-8472";
}
return "SFF-8472";
}
},
eeprom: {
get() {
if(this.type === 'eeprom-lantiq' || this.type === 'eeprom-rooted-edit') {
if(this.eeprom_decode){
var lantiq_new = (this.eeprom_decode.join('').match(/.{1,90}/g) ?? []).map(it => this.hexToBase64(it));
lantiq_new.unshift(this.lantiq_0);
lantiq_new.push(...this.lantiq_last);
return lantiq_new.join('@');
}
return '';
} else {
return this.raw;
}
},
set(val) {
this.raw = val;
if(this.type === 'eeprom-lantiq' || this.type === 'eeprom-rooted-edit') {
var lantiq_array = val.split('@');
this.lantiq_0 = lantiq_array.shift();
if(this.lantiq_0.includes("sfp_a2_info")) {
this.eeprom_switch = "A2";
}
else if(this.lantiq_0.includes("sfp_a0_low_128")) {
this.eeprom_switch = "A0";
}
this.lantiq_last = lantiq_array.slice(-2);
var lantiq_decode = lantiq_array.map(it => this.base64ToHex(it)).join('');
this.eeprom_decode = [...lantiq_decode];
}
else if(this.type === 'eeprom-ethtool') {
var ethtool_map = Object.fromEntries(val.split('\n').filter(it => it.startsWith("0x")).map(it => { var [key, value] = it.split(/[: ]+(.*)/s);
key = parseInt(key, 16);
value = value.replace(/\s+/g, '');
value = [...value];
return [key,value] }));
var eeprom_decode = [];
var max = Math.max(...Object.keys(ethtool_map).map(it => parseInt(it)));
for(var i = 0; i < max; i+=16) {
eeprom_decode.push(...(ethtool_map[i] ?? Array.from({length: 32}, () => 0)));
};
this.eeprom_decode = [...eeprom_decode];
var ethtool_0 = val.split('\n')[0];
const conditions = {
"A0": ['-m', '--dump-module-eeprom', '--module-info'],
"A2": ['-e', '--eeprom-dump']
};
for (const [key, value] of Object.entries(conditions)) {
if (value.some(el => ethtool_0.includes(el))) {
this.eeprom_switch = key;
break;
}
}
}
},
},
eeprom_json: {
get() {
var finalArray = [...this.eeprom_table[this.eeprom_switch]];
finalArray.map(it => {
if(it.address) {
var addr = it.address.split('-').map(x => parseInt(x));
it.value = this.getPart(addr[0], addr[addr.length -1])
if(it.parse) it.human = this[it.parse ?? ((it) => { console.log(`no function find for ${it.parse}`)})](it.value)
}
return it;
});
return finalArray;
}
},
serial: {
get() {
return this.getPart(233, 240);
},
set(value) {
if(value.length == 16)
this.setPart(233, 240, value);
}
},
serial_hex: {
get() {
if(this.serial) return this.addHexPrefix(this.serial);
},
set(value) {
value = this.stripHexPrefix(value);
if(value.length == 16)
this.serial = value;
}
},
serial_ascii: {
get() {
if(this.serial) return this.hexToSerial(this.serial);
},
set(value) {
if(value.length == 12)
this.serial = this.asciiToHex(value.substring(0,4))+value.substring(4);
}
},
ploam: {
get() {
if(this.loidPloamSwitch === "02")
return this.getPart(191, 214);
},
set(value) {
if(this.loidPloamSwitch === "02")
this.setPart(191, 214, value);
}
},
ploam_hex: {
get() {
if(this.ploam) return this.addHexPrefix(this.ploam.substring(0,20));
},
set(value) {
this.ploam = this.stripHexPrefix(value);
}
},
ploam_ascii: {
get() {
if(this.ploam) return this.hexToAscii(this.ploam.substring(0,20));
},
set(value) {
if(value.length <= 10)
this.ploam = this.asciiToHex(value);
}
},
loid: {
get() {
if(this.loidPloamSwitch === "01")
return this.getPart(191, 214);
},
set(value) {
if(this.loidPloamSwitch === "01")
this.setPart(191, 214, value);
}
},
loid_hex: {
get() {
if(this.loid) return this.addHexPrefix(this.loid.substring(0,20));
},
set(value) {
this.loid = this.stripHexPrefix(value);
}
},
loid_ascii: {
get() {
if(this.loid) return this.hexToAscii(this.loid.substring(0,20));
},
set(value) {
if(value.length <= 10)
this.loid = this.asciiToHex(value);
}
},
lopw: {
get() {
if(this.loidPloamSwitch === "01")
return this.getPart(215, 231);
},
set(value) {
if(this.loidPloamSwitch === "01")
this.setPart(215, 231, value);
}
},
lopw_hex: {
get() {
if(this.lopw) return this.hexToAscii(this.lopw.substring(0,20));
},
set(value) {
this.lopw = this.stripHexPrefix(value);
}
},
lopw_ascii: {
get() {
if(this.lopw) return this.hexToAscii(this.lopw.substring(0,20));
},
set(value) {
if(value.length <= 10)
this.lopw = this.asciiToHex(value);
}
},
loidPloamSwitch: {
get() {
return this.getPart(232, 232);
},
set(value) {
this.setPart(232, 232, value);
}
},
equipmentID: {
get() {
return this.getPart(512, 531);
},
set(value) {
this.setPart(512, 531, value);
}
},
vendorID: {
get() {
return this.getPart(532, 535);
},
set(value) {
this.setPart(532, 535, value);
}
},
mac_rooted: {
get() {
return this.getPart(384, 389);
},
set(value) {
this.setPart(384, 389, value);
}
},
mac_prettier: {
get() {
return this.hexToMac(this.mac_rooted);
},
set(value) {
if(value.length == 12) {
this.mac = value;
}
else if(value.length == 14) {
this.mac = stripHexPrefix(value);
}
else if(value.length == 17) {
this.mac = value.split(value[2]).join('');
}
}
}
},
methods: {
getPart: function (startIndex, endIndex) {
return this.eeprom_decode?.slice(startIndex * 2, (endIndex + 1) * 2)?.join('');
},
setPart: function (startIndex, endIndex, value) {
let calcLength = (endIndex + 1 - startIndex) * 2;
if(!value) {
return;
}
if (value.length < calcLength) {
value += '0'.repeat(calcLength - value.length);
} else if(value.length > calcLength) {
value = value.substring(0, calcLength);
}
this.eeprom_decode.splice(startIndex * 2, calcLength, ...[...value]);
},
isHexPrefixed: function(str, prefix = '0x') {
if (typeof str !== 'string') {
throw new Error("[is-hex-prefixed] value must be type 'string', is currently type " + (typeof str) + ", while checking isHexPrefixed.");
}
return str.slice(0, 2) === prefix;
},
stripHexPrefix: function(str, prefix = '0x') {
if (typeof str !== 'string') {
return str;
}
return this.isHexPrefixed(str) ? str.slice(prefix.length) : str;
},
chunk: function(str) {
return str?.match(/../g);
},
hexToBase64: function (hexStr) {
return btoa([...hexStr].reduce((acc, _, i) => acc += !(i - 1 & 1) ? String.fromCharCode(parseInt(hexStr.substring(i - 1, i + 1), 16)) : '', ''));
},
base64ToHex: function(base64Value) {
try {
return [...atob(base64Value)].map(c=> c.charCodeAt(0).toString(16).padStart(2,0)).join('');
} catch { return ''; }
},
parseInt2complement: function(bitstring, bitcount)
{
var value = parseInt(bitstring, 2);
if ((value & (1<<(bitcount-1))) > 0) {
value = value - (1<<(bitcount));
}
return value;
},
reverseEndian: function(hex) {
return hex ? this.chunk(hex).reverse().join('') : "";
},
hexToTemp: function(hex) {
return hex ? `${this.parseInt2complement((parseInt(this.reverseEndian(hex), 16)).toString(2), 8)}℃` : "";
},
hexToVolt: function(hex) {
return hex ? `${parseInt(hex, 16) / 10000}V` : "";
},
hexToMilliAmpere: function(hex) {
return hex ? `${parseInt(hex, 16) / 10000}mA` : "";
},
hexToMac: function(hex) {
return hex ? this.chunk(hex).join(':') : "";
},
hex_to_dBm: function(hex) {
return hex ? `${parseInt(hex, 16)}dBm` : "";
},
hex_suWTo_dBm: function(hex) {
return hex ? `${(10 * Math.log10(parseInt(hex, 16) / 10000)).toFixed(2)}dBm` : "";
},
hex_dBmTo_mw: function(hex) {
return hex ? Math.pow(10, parseInt(hex, 16) / 10) : "";
},
hexToAscii: function (hex) {
return hex ? this.chunk(hex)?.map(el => String.fromCharCode(parseInt(el, 16)))?.join('')?.replace(/\0/g, '') : "";
},
hexToSerial: function (hex) {
return hex ? this.hexToAscii(hex.substring(0,8))+hex.substring(8) : "";
},
hexTo_km: function(hex) {
return hex ? `${parseInt(hex, 16)}km` : "";
},
hexTo100m: function(hex) {
return hex ? `${parseInt(hex, 16) / 10}km` : "";
},
hexTo10m: function(hex) {
return hex ? `${parseInt(hex, 16) * 10}m` : "";
},
hexTo_m: function(hex) {
return hex ? `${parseInt(hex, 16)}m` : "";
},
hexTo_nm: function(hex) {
return hex ? `${parseInt(hex, 16)}nm` : "";
},
hexToRate: function(hex) {
return hex ? `${parseInt(hex, 16) / 10}Gbps` : "";
},
flagDecoder: function(element, table, not_table) {
var list = []
var flags = parseInt(element, 16)
for(const [key, value] of Object.entries(table)) {
if(flags & key) {
list.push(value)
} else if(not_table && not_table[key]) {
list.push(not_table[key])
}
}
return list;
},
table_identifier_values: function (hex) {
var table = {
"01":"GBIC",
"02":"Module soldered to motherboard (ex: SFF)",
"03":"SFP/SFP+/SFP28"
}
return hex ? table[hex] ?? `See ${this.revision} Table 3.2` : "";
},
table_phy_device_identifier_value: function (hex) {
var table = {
"00":"GBIC definition is not specified or the GBIC definition is not compliant with a defined MOD_DEF. See product specification for details",
"01":"GBIC is compliant with MOD_DEF 1",
"02":"GBIC is compliant with MOD_DEF 2",
"03":"GBIC is compliant with MOD_DEF 3",
"04":"GBIC/SFP function is defined by serial ID only",
"05":"GBIC is compliant with MOD_DEF 5",
"06":"GBIC is compliant with MOD_DEF 6",
"07":"GBIC is compliant with MOD_DEF 7",
}
return hex ? table[hex] ?? `See ${this.revision} Table 3.3` : "";
},
table_connector_value: function (hex) {
var table = {
"00":"Unknown or unspecified",
"01":"SC (Subscriber Connector)",
"02":"Fibre Channel Style 1 copper connector",
"03":"Fibre Channel Style 2 copper connector",
"04":"BNC/TNC (Bayonet/Threaded Neill-Concelman)",
"05":"Fibre Channel coax headers",
"06":"Fiber Jack",
"07":"LC (Lucent Connector)",
"08":"MT-RJ (Mechanical Transfer - Registered Jack)",
"09":"MU (Multiple Optical)",
"21":"Copper pigtail",
"22":"RJ45 (Registered Jack)"
}
return hex ? table[hex] ?? `See ${this.revision} Table 3.4` : "";
},
table_encoding_value: function (hex) {
var table = {
"00":"Unspecified",
"01":"8B/10B",
"02":"4B/5B",
"03":"NRZ",
"04":"Manchester",
"05":"SONET Scrambled",
"06":"64B/66B",
}
return hex ? table[hex] ?? `See ${this.revision} Table 3.6` : "";
},
table_real_time_diagnostic_and_control: function(hex) {
var table = {
128:"TX Disable State",
64:"Soft TX Disable",
32:"RS(1) State",
16:"Rate Select State",
8:"Soft Rate Select",
4:"TX Fault",
2:"LOS",
1:"Data_Ready_Bar"
}
return hex ? this.flagDecoder(hex, table)?.join(', ') : "";
},
table_alarm_and_warning: function(hex) {
var table = [{
128:"Temp High",
64:"Temp Low",
32:"Vcc High",
16:"Vcc Low",
8:"TX Bias High",
4:"TX Bias Low",
2:"TX Power High",
1:"TX Power Low"
},{
128:"RX Power High",
64:"RX Power Low",
}]
return hex ? this.chunk(hex)?.flatMap((element, index) => this.flagDecoder(element, table[index]))?.join(', ') : "";
},
table_diagnostic_monitoring_type: function(hex) {
var table = {
64:"Digital diagnostic monitoring implemented",
32:"Internally calibrated",
16:"Externally calibrated",
8:"Received power measurement type: average power",
4:"Address change required"
}
var not_table = {
128:"Reserved for legacy diagnostic implementations",
8:"Received power measurement type: OMA",
4:"Address change required"
}
return hex ? this.flagDecoder(hex, table, not_table)?.join(', ') : "";
},
table_enhanced_options: function(hex) {
var table = {
128:"Alarm/warning flags implemented for all monitored quantities",
64:"Soft TX_DISABLE control and monitoring implemented",
32:"Soft TX_FAULT monitoring implemented",
16:"Soft RX_LOS monitoring implemented",
8:"Soft RATE_SELECT control and monitoring implemented",
4:"Application Select control implemented per SFF-8079",
2:"Rate Select control implemented per SFF-8431"
}
return hex ? this.flagDecoder(hex, table)?.join(', ') : "";
},
table_compliance: function(hex) {
var table = {
"00":"Digital diagnostic functionality not included or undefined.",
"01":"Rev 9.3 of SFF-8472.",
"02":"Rev 9.5 of SFF-8472.",
"03":"Rev 10.2 of SFF-8472.",
"04":"Rev 10.4 of SFF-8472.",
"05":"Rev 11.0 of SFF-8472.",
"06":"Rev 11.3 of SFF-8472.",
"07":"Rev 11.4 of SFF-8472.",
"08":"Rev 12.3 of SFF-8472.",
"09":"Rev 12.4 of SFF-8472.",
}
return hex ? table[hex] ?? "" : "";
},
table_extended_specification_compliance_codeds: function(hex) {
var table = {
"00":"Unspecified.",
"01":"100G AOC (Active Optical Cable), retimed or 25GAUI C2M AOC. Providing a worst BER of 5 × 10-5.",
"02":"100GBASE-SR4 or 25GBASE-SR.",
"03":"100GBASE-LR4 or 25GBASE-LR.",
"04":"100GBASE-ER4 or 25GBASE-ER.",
"05":"100GBASE-SR10.",
"06":"100G CWDM4.",
"07":"100G PSM4 Parallel SMF.",
"08":"100G ACC (Active Copper Cable), retimed or 25GAUI C2M ACC. Providing a worst BER of 5 × 10-5.",
"09":"Obsolete (assigned before 100G CWDM4 MSA required FEC).",
"0A":"Reserved.",
"0B":"100GBASE-CR4, 25GBASE-CR CA-25G-L or 50GBASE-CR2 with RS (Clause91) FEC.",
"0C":"25GBASE-CR CA-25G-S or 50GBASE-CR2 with BASE-R (Clause 74 Fire code) FEC.",
"0D":"25GBASE-CR CA-25G-N or 50GBASE-CR2 with no FEC.",
"0E":"10 Mb/s Single Pair Ethernet (802.3cg, Clause 146/147, 1000 m copper).",
"10":"40GBASE-ER4.",
"11":"4 x 10GBASE-SR.",
"12":"40G PSM4 Parallel SMF.",
"13":"G959.1 profile P1I1-2D1 (10709 MBd, 2km, 1310 nm SM).",
"14":"G959.1 profile P1S1-2D2 (10709 MBd, 40km, 1550 nm SM).",
"15":"G959.1 profile P1L1-2D2 (10709 MBd, 80km, 1550 nm SM).",
"16":"10GBASE-T with SFI electrical interface.",
"17":"100G CLR4.",
"18":"100G AOC, retimed or 25GAUI C2M AOC. Providing a worst BER of 10-12 or below.",
"19":"100G ACC, retimed or 25GAUI C2M ACC. Providing a worst BER of 10-12 or below.",
"1A":"100GE-DWDM2 (DWDM transceiver using 2 wavelengths on a 1550 nm DWDM grid with a reach up to 80 km).",
"1B":"100G 1550nm WDM (4 wavelengths).",
"1C":"10GBASE-T Short Reach (30 meters).",
"1D":"5GBASE-T.",
"1E":"2.5GBASE-T.",
"1F":"40G SWDM4.",
"20":"100G SWDM4.",
"21":"100G PAM4 BiDi.",
"37":"10GBASE-BR (Clause 158).",
"38":"25GBASE-BR (Clause 159).",
"39":"50GBASE-BR (Clause 160).",
"22":"4WDM-10 MSA (10km version of 100G CWDM4 with same RS(528,514) FEC in host system).",
"23":"4WDM-20 MSA (20km version of 100GBASE-LR4 with RS(528,514) FEC in host system).",
"24":"4WDM-40 MSA (40km reach with APD receiver and RS(528,514) FEC in host system).",
"25":"100GBASE-DR (Clause 140), CAUI-4 (no FEC).",
"26":"100G-FR or 100GBASE-FR1 (Clause 140), CAUI-4 (no FEC on host interface).",
"27":"100G-LR or 100GBASE-LR1 (Clause 140), CAUI-4 (no FEC on host interface).",
"28":"100GBASE-SR1 (802.3, Clause 167), CAUI-4 (no FEC on host interface).",
"3A":"100GBASE-VR1 (802.3, Clause 167), CAUI-4 (no FEC on host interface).",
"29":"100GBASE-SR1, 200GBASE-SR2 or 400GBASE-SR4 (802.3, Clause 167).",
"36":"100GBASE-VR1, 200GBASE-VR2 or 400GBASE-VR4 (802.3, Clause 167).",
"2A":"100GBASE-FR1 (802.3, Clause 140) or 400GBASE-DR4-2 (P802.3df, Clause 124).",
"2B":"100GBASE-LR1 (802.3, Clause 140).",
"2C":"100G-LR1-20 MSA, CAUI-4 (no FEC on host interface).",
"2D":"100G-ER1-30 MSA, CAUI-4 (no FEC on host interface).",
"2E":"100G-ER1-40 MSA, CAUI-4 (no FEC on host interface).",
"2F":"100G-LR1-20 MSA.",
"34":"100G-ER1-30 MSA.",
"35":"100G-ER1-40 MSA.",
"30":"Active Copper Cable with 50GAUI, 100GAUI-2 or 200GAUI-4 C2M. Providing a worst BER of 10-6 or below.",
"31":"Active Optical Cable with 50GAUI, 100GAUI-2 or 200GAUI-4 C2M. Providing a worst BER of 10-6 or below.",
"32":"Active Copper Cable with 50GAUI, 100GAUI-2 or 200GAUI-4 C2M. Providing a worst BER of 2.6x10-4 for ACC, 10-5 for AUI, or below.",
"33":"Active Optical Cable with 50GAUI, 100GAUI-2 or 200GAUI-4 C2M. Providing a worst BER of 2.6x10-4 for AOC, 10-5 for AUI, or below.",
"3F":"100GBASE-CR1, 200GBASE-CR2 or 400GBASE-CR4 (P802.3ck, Clause 162).",
"40":"50GBASE-CR, 100GBASE-CR2, or 200GBASE-CR4.",
"41":"50GBASE-SR, 100GBASE-SR2, or 200GBASE-SR4.",
"42":"50GBASE-FR or 200GBASE-DR4.",
"4A":"50GBASE-ER (IEEE 802.3, Clause 139).",
"43":"200GBASE-FR4.",
"44":"200G 1550 nm PSM4.",
"45":"50GBASE-LR.",
"46":"200GBASE-LR4.",
"47":"400GBASE-DR4 (802.3, Clause 124), 400GAUI-4 C2M (Annex 120G).",
"48":"400GBASE-FR4 (802.3, Clause 151).",
"49":"400GBASE-LR4-6 (802.3, Clause 151).",
"4B":"400G-LR4-10.",
"4C":"400GBASE-ZR (P802.3cw, Clause 156).",
"7F":"256GFC-SW4 (FC-PI-7P).",
"80":"64GFC (FC-PI-7).",
"81":"128GFC (FC-PI-8)."
}
return hex ? table[hex] ?? "" : "";
},
asciiToHex: function(str) {
return ([...str].map((_, n) => Number(str.charCodeAt(n)).toString(16)).join(''));
},
addHexPrefix: function(str, prefix = '0x') {
if(this.isHexPrefixed(str, prefix)) return str;
return `${prefix}${str}`;
}
}
};
</script>
<style scoped>
table td {
overflow-wrap: break-word;
word-wrap: break-word;
word-break: break-word;
}
</style>
|