X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fxfp%2Fpd.py;h=86f1e9d1ef192cb0df6fc4d42021a0d139d30c39;hb=4f4e035397fa0770d47bf8b663e87651e0709511;hp=27135e585a1c267a7990af2dc56469b9222bf1a6;hpb=135b790c851c52400279e7c932e1f900d91ae5cc;p=libsigrokdecode.git diff --git a/decoders/xfp/pd.py b/decoders/xfp/pd.py index 27135e5..86f1e9d 100644 --- a/decoders/xfp/pd.py +++ b/decoders/xfp/pd.py @@ -23,20 +23,28 @@ from common.plugtrx import (MODULE_ID, ALARM_THRESHOLDS, AD_READOUTS, GCS_BITS, 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'), + ('field-name-and-val', 'Field name and value'), + ('field-val', 'Field value'), + ) + annotation_rows = ( + ('field-names-and-vals', 'Field names and values', (0,)), + ('field-vals', 'Field values', (1,)), ) 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