]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/onewire_network/pd.py
All PDs: Drop unneeded comments.
[libsigrokdecode.git] / decoders / onewire_network / pd.py
index ab11ea4436b4ce0f5db82caec843e794d95e8827..642cc0e68c869b42bb60ad1a92c8e8091b205781 100644 (file)
@@ -1,5 +1,5 @@
 ##
-## This file is part of the sigrok project.
+## This file is part of the libsigrokdecode project.
 ##
 ## Copyright (C) 2012 Iztok Jeras <iztok.jeras@gmail.com>
 ##
@@ -18,8 +18,6 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 ##
 
-# 1-Wire protocol decoder (network layer)
-
 import sigrokdecode as srd
 
 # Dictionary of ROM commands and their names, next state.
@@ -61,12 +59,9 @@ class Decoder(srd.Decoder):
         self.data = 0x0
         self.rom = 0x0000000000000000
 
-    def start(self, metadata):
-        self.out_proto = self.add(srd.OUTPUT_PROTO, 'onewire_network')
-        self.out_ann = self.add(srd.OUTPUT_ANN, 'onewire_network')
-
-    def report(self):
-        pass
+    def start(self):
+        self.out_proto = self.register(srd.OUTPUT_PYTHON)
+        self.out_ann = self.register(srd.OUTPUT_ANN)
 
     def putx(self, data):
         # Helper function for most annotations.