@@ -41,13 +41,15 @@ def run_server():
4141 # ----------------------------------------------------------------------- #
4242 # If you don't set this or any fields, they are defaulted to empty strings.
4343 # ----------------------------------------------------------------------- #
44- identity = ModbusDeviceIdentification ()
45- identity .__setitem__ ('VendorName' , 'Pymodbus' )
46- identity .__setitem__ ('ProductCode' , 'PM' )
47- identity .__setitem__ ('VendorUrl' , 'http://github.com/riptideio/pymodbus/' ) #NOSONAR
48- identity .__setitem__ ('ProductName' , 'Pymodbus Server' )
49- identity .__setitem__ ('ModelName' , 'Pymodbus Server' )
50- identity .__setitem__ ('MajorMinorRevision' , version .short ())
44+ identity = ModbusDeviceIdentification (info_name = {
45+ 'VendorName' : 'Pymodbus' ,
46+ 'ProductCode' : 'PM' ,
47+ 'VendorUrl' : 'http://github.com/riptideio/pymodbus/' , #NOSONAR
48+ 'ProductName' : 'Pymodbus Server' ,
49+ 'ModelName' : 'Pymodbus Server' ,
50+ 'MajorMinorRevision' : version .short (),
51+
52+ })
5153
5254 # ----------------------------------------------------------------------- #
5355 # Add an example which is long enough to force the ReadDeviceInformation
0 commit comments