]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/i2cfilter/i2cfilter.py
srd: Add usable one-liner descriptions for all PDs.
[libsigrokdecode.git] / decoders / i2cfilter / i2cfilter.py
index 939e667b77b94195083c99bd063f7d44a54871d7..64010cb2a3f0404aba7e79031fa3b058f614144c 100644 (file)
@@ -26,14 +26,17 @@ class Decoder(srd.Decoder):
     id = 'i2cfilter'
     name = 'I2C filter'
     longname = 'I2C filter'
-    desc = 'Filter out specific addresses/directions in an I2C stream.'
+    desc = 'Filter out addresses/directions in an I2C stream.'
     license = 'gplv3+'
     inputs = ['i2c']
     outputs = []
+    probes = []
+    optional_probes = []
     options = {
         'address': ['Address to filter out of the I2C stream', 0],
         'direction': ['Direction to filter (read/write)', '']
     }
+    annotations = []
 
     def __init__(self, **kwargs):
         self.state = None
@@ -41,7 +44,10 @@ class Decoder(srd.Decoder):
     def start(self, metadata):
         self.out_proto = self.add(srd.OUTPUT_PROTO, 'i2cdata')
         if self.options['direction'] not in ('', 'read', 'write'):
-            raise Exception("Invalid direction: expected 'read' or 'write'")
+            raise Exception('Invalid direction: expected "read" or "write"')
+
+    def report(self):
+        pass
 
     def decode(self, ss, es, data):
         try: