Reven can be extended by using python scripts or plugins. Both are similar except that a plugin can also interact with REVEN Axion's display and can be called with a shortcut from REVEN Axion.
There are three distinct APIs:
reven python library. It is used to manipulate the execution data, and can be called from both plugins and scripts.reven_api python library. You should use it only for features yet unsupported by the python API: it currently is the only way to create, start & stop projects, and create scenarios, all through the launcher_connection object.axion_api library. This API is used to interact with Reven Axion's GUI, and exists only from the context of a plugin.See below for snippets or the Examples page (accessible through the header of this page) for starting points.
This library is accessible from everywhere on the system through a standard Python CLI or the REVEN Axion's python console.
The first step is to connect to an existing Reven instance, for example on port 13370 of the host localhost:
You can then start an execution, if none has been done or loaded before:
From there, you can communicate with the Reven instance through member functions of the Project class. For example, you can get information about every trace using traces():
Inside a Trace (which is the same as a run in Axion), the most interesting object is the Point: it represents a single execution point.
As you can see, with these two objects you can query pretty much everything.
The low-level python API is, for now, the only way to create, start & stop projects, and create scenarios, all through the launcher_connection object. See the Examples page on how to do that, along with helper functions you can use.
This API is subject to changes: you can check its changelog for per-version modification.
It is accessible in the context of REVEN Axion only, through a plugin or the REVEN Axion's python console.
From there you can, for example, get the selected instruction:
reven and axion_api are loaded automatically.reven_connection instance is already created and is accessible under the name rvn_client.A plugin can use the axion_api library to interact with the REVEN Axion's display.
To make and use a plugin through REVEN Axion, process as follows:
Create a file my_plugin.py in your autoload directory and define the axion_calling function.
axion_calling plays the role of the main function for REVEN Axion.
Load your plugin in REVEN Axion through the REVEN Axion's python console as follows:
Remark: 'name' will be the name of the plugin in REVEN Axion and can be different of name of the plugin file.
To reload the plugin, use:
The axion_calling function is important because when you use the shortcut define for your plugin, REVEN Axion will try to call this function. If it is not define, nothing will happen.