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', ''),
'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.