## 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
}
def start(self):
- self.out_ann = self.add(srd.OUTPUT_ANN, 'xfp')
+ self.out_ann = self.register(srd.OUTPUT_ANN)
def decode(self, ss, es, data):
cmd, data = data
self.annotate("AUX1 monitoring", aux)
aux = AUX_TYPES[data[0] & 0x0f]
self.annotate("AUX2 monitoring", aux)
-