@@ -61,7 +61,8 @@ def updating_writer(a):
6161 rand_addr = random .randint (0 , 65000 )
6262 log .debug ("Writing to datastore: {}, {}" .format (rand_addr , rand_value ))
6363 # import pdb; pdb.set_trace()
64- context [slave_id ].setValues (writefunction , rand_addr , [rand_value ])
64+ context [slave_id ].setValues (writefunction , rand_addr , [rand_value ],
65+ update = False )
6566 values = context [slave_id ].getValues (readfunction , rand_addr , count )
6667 log .debug ("Values from datastore: " + str (values ))
6768
@@ -85,14 +86,15 @@ def run_dbstore_update_server():
8586 identity .VendorUrl = 'http://github.com/bashwork/pymodbus/'
8687 identity .ProductName = 'pymodbus Server'
8788 identity .ModelName = 'pymodbus Server'
88- identity .MajorMinorRevision = '1 .0'
89+ identity .MajorMinorRevision = '2.2 .0'
8990
9091 # ----------------------------------------------------------------------- #
9192 # run the server you want
9293 # ----------------------------------------------------------------------- #
9394 time = 5 # 5 seconds delay
9495 loop = LoopingCall (f = updating_writer , a = (context ,))
9596 loop .start (time , now = False ) # initially delay by time
97+ loop .stop ()
9698 StartTcpServer (context , identity = identity , address = ("" , 5020 ))
9799
98100
0 commit comments