Skip to content

Faster than real time simulation-network #82

Answered by JoelBender
EttoreZ asked this question in Q&A
Discussion options

You must be logged in to vote

There is a clocked_test.py module in the tests that wraps the asyncio event loop and allows the test to specify an amount of time to "accelerate" or skip forward. For example, if you have a virtual BACnet device that is supposed to wake up every n seconds and send out a Read Property Request, you can write that as a specialized subclass of Application and use a while True: await asyncio.sleep(1); await app.read_property(...) loop.

Let's say you have a CVS file that contains a list of timestamp, value, value, ... rows that you want to feed into a device and see its response. The outer simulation loop reads the row, waits for the timestamp (maybe a delta time), changes some values in an app…

Replies: 8 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@bbartling
Comment options

@EttoreZ
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by EttoreZ
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants