Callbacks
We provide clients with the capability to customize agent configuration through the use of callbacks. Clients can override these callbacks to seamlessly execute specific actions or retrieve essential data during the agent configuration process. At runtime, whenever a configuration change occurs (either during the initial loading of the configuration or an over-the-air update), a callback function named onConfigurationChangedCallback is invoked just before completing your custom agents’s setup. This callback can be overridden in both C++ SDK and Python SDK, enabling users to integrate additional operations during the setup process. For further insights, please consult the provided sample. Notably, this callback functionality is applicable to both Monitors and Recorders.
onConfigurationChangedCallback
In the following example of the onConfigurationChangedCallback
function, we get and print out the constantValues and the valueConfigurations that will configure the given agent (For more information, please refer to the configuration by value page).
This sample shows mainly the potential of this function, being that any logic can be added at setup time, modifying configuration, run additional code based on values…etc