concurrency - How to simulate sensors behaviour with python scripts -
i'm using bunch of python scripts simulate sensor network behaviour. in particular, want simulate sensors asynchronously send readings mqtt broker. in order wrote scripts each 1 represents different sensor.
looking at: stackoverflow old question
i preferred not revive old question. anyway used approach:
script1.py & script2.py & script3.py & script4.py &... my question is: real concurrency? if try print received readings (on console) obtain, instance, readings belonging script1, 1 script 3, 4 script 2 , on... when expected no consequents readings same script. problem of printing or maybe & don't assure real concurrency between scripts?
i'm developing osx.
maybe there more realistic way simulate sensors behaviour?
Comments
Post a Comment