X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Fxfp%2Fpd.py;h=0bc6724511966f8ba43ba8f94076372b40d3209e;hp=1e971e64c057e3c1262fa5d565908acb69179868;hb=039b0db244e2e592a581a6c9b79a934bde136569;hpb=1049c90ff82d3d5ce32ac92b032dd2d5a5d847cd diff --git a/decoders/xfp/pd.py b/decoders/xfp/pd.py index 1e971e6..0bc6724 100644 --- a/decoders/xfp/pd.py +++ b/decoders/xfp/pd.py @@ -18,12 +18,12 @@ ## 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)' @@ -36,7 +36,10 @@ class Decoder(srd.Decoder): ('fields', 'XFP structure fields'), ) - def __init__(self, **kwargs): + 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