## along with this program; if not, see <http://www.gnu.org/licenses/>.
##
-# XFP protocol decoder
-
import sigrokdecode as srd
-import os
MODULE_ID = {
0x01: 'GBIC',
]
class Decoder(srd.Decoder):
- api_version = 1
+ api_version = 2
id = 'xfp'
name = 'XFP'
longname = '10 Gigabit Small Form Factor Pluggable Module (XFP)'
license = 'gplv3+'
inputs = ['i2c']
outputs = ['xfp']
- probes = []
- optional_probes = []
- options = {}
- annotations = [
- ['XFP field names and values', 'XFP structure field names and values'],
- ['XFP fields', 'XFP structure fields'],
- ]
+ annotations = (
+ ('fieldnames-and-values', 'XFP structure field names and values'),
+ ('fields', 'XFP structure fields'),
+ )
def __init__(self, **kwargs):
# Received data items, used as an index into samplenum/data
self.annotate("Vendor ID", chr(data[i]), cnt, cnt)
# Convert 16-bit two's complement values, with each increment
- # representing 1/256C, to degrees Celcius.
+ # representing 1/256C, to degrees Celsius.
def to_temp(self, value):
if value & 0x8000:
value = -((value ^ 0xffff) + 1)
self.annotate("AUX1 monitoring", aux)
aux = AUX_TYPES[data[0] & 0x0f]
self.annotate("AUX2 monitoring", aux)
-