X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Fxfp%2Fpd.py;h=ded76946702fd41eb285caec63f84bfb4c500505;hp=26f33116e99092ad8e91b3a82f8663d9dcc71e81;hb=6cbba91f23b9f9ace75b4722c9c0776b9211008d;hpb=92b7b49f6964f57a7d6fc4473645c993cfa4ba52 diff --git a/decoders/xfp/pd.py b/decoders/xfp/pd.py index 26f3311..ded7694 100644 --- a/decoders/xfp/pd.py +++ b/decoders/xfp/pd.py @@ -18,25 +18,29 @@ ## import sigrokdecode as srd -from plugtrx import (MODULE_ID, ALARM_THRESHOLDS, AD_READOUTS, GCS_BITS, +from common.plugtrx import (MODULE_ID, ALARM_THRESHOLDS, AD_READOUTS, GCS_BITS, CONNECTOR, TRANSCEIVER, SERIAL_ENCODING, XMIT_TECH, CDR, DEVICE_TECH, ENHANCED_OPTS, AUX_TYPES) class Decoder(srd.Decoder): - api_version = 2 + api_version = 3 id = 'xfp' name = 'XFP' longname = '10 Gigabit Small Form Factor Pluggable Module (XFP)' - desc = 'Data structure describing display device capabilities.' + desc = 'XFP I²C management interface structures/protocol' license = 'gplv3+' inputs = ['i2c'] - outputs = ['xfp'] + outputs = [] + tags = ['Networking'] annotations = ( ('fieldnames-and-values', 'XFP structure field names and values'), ('fields', 'XFP structure fields'), ) def __init__(self): + self.reset() + + def reset(self): # Received data items, used as an index into samplenum/data self.cnt = -1 # Start/end sample numbers per data item