Axion Synchronization
The synchronization feature allows to instruct Axion to select a transition from a Python client connected to the same server.
To do so, you can setup Axion to listen to events sent to a named "session".
Basic setup
The session currently listened to is indicated by the dropdown list on the right of the status menu.
By default, the synchronization is disabled for Axion clients (the "Not synchronized" item is selected).
To enable synchronization, use the session dropdown list to select the Default Session
From there, you can select a transition in Axion from a Python client connected to the same server and the same session:
server.sessions.publish_transition(server.trace.transition(4242)) # Select transition #4242
Please refer to the Python API guide for more information about how to connect to a REVEN server using Python.
Advanced setup
If you want several Axion clients to listen to different Python clients, you can use the session dropdown list and select the "New Session..." item to input a new session name.
This will create a new session on the REVEN server.
From there, you can set up Python to send events to that session, and only Axion clients listening to that session will received them:
# Only the axion client listening to "MySession" will receive events
server.sessions.tracked = "MySession"
server.sessions.publish_transition(server.trace.transition(1212))
Note that we did not need to set the tracked
session in the basic setup section, because
the default
session is tracked by default.
For more information about sessions handling in the Python API, please refer to the documentation of the Sessions class.