X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fmodbus%2Fpd.py;h=d5b39ca0725f0079f8d58462c0fa518edd823ebd;hb=ebe297ad9703b4d8212a0799ad5ef06aa59ac6b7;hp=d427844ca490892151899e3d8bf8d94db128b9c6;hpb=db858a048288645d00eeb643dc43006ef9875280;p=libsigrokdecode.git diff --git a/decoders/modbus/pd.py b/decoders/modbus/pd.py index d427844..d5b39ca 100644 --- a/decoders/modbus/pd.py +++ b/decoders/modbus/pd.py @@ -811,14 +811,15 @@ class Modbus_ADU_CS(Modbus_ADU): self.check_crc(bytecount + 12) class Decoder(srd.Decoder): - api_version = 2 + api_version = 3 id = 'modbus' name = 'Modbus' longname = 'Modbus RTU over RS232/RS485' desc = 'Modbus RTU protocol for industrial applications.' - license = 'gplv2+' + license = 'gplv3+' inputs = ['uart'] outputs = ['modbus'] + tags = ['Embedded/industrial'] annotations = ( ('sc-server-id', ''), ('sc-function', ''), @@ -846,7 +847,10 @@ class Decoder(srd.Decoder): 'values': ('RX', 'TX')}, ) - def __init__(self, **kwargs): + def __init__(self): + self.reset() + + def reset(self): self.ADUSc = None # Start off with empty slave -> client ADU. self.ADUCs = None # Start off with empty client -> slave ADU.