13. Comp App Library
The Comp App Library is a comp app, but in library form. It Once set up the task and configuration, you can run the configuration from the “run” icon in the VS Code.
C++ interface for Python Binding or Isaac codelets to access the comp app. The Comp App Library makes integration of Uli SDK flexible.
When the comp app is generated, the interface files: lib_main.h and lib_main.cpp, and build target: “<comp_app_name>_” are also created. The lib_main.h and lib_main.cpp declares and implements the C++ interface functions of the Comp App Library. Here are the brief descriptions of the Comp App Library functions:
- int Initialize(string& working_directory)
- void Instantiate()
- void SetUpAction()
- void GetParams()
- int StartUpActions()
- void Shutdown()
- void Destroy()
- string GetData(const string& url)
- int SetData(const string& url, const string& json_string)
Set up the working directory, where the configuration files are read.
Params: working_directory path of the working directory.
Return: 1 if succeeded, otherwise 0.
Create comp objects of the comp app.
Params: none
Return: none
Set up comp objects of the comp app.
Params: none
Return: none
Read back the parameters of the services and write to configuration .json file. This function is to be used to create the default configuration .json file. It is the same as running the comp app with option –params.
Params: none
Return: none
Start up the comp objects of the comp app. It starts the state machines and event processors of the comp objects.
Params: none
Return: 1 if succeeded, otherwise 0.
Shutdown the comp objects of the comp app. It stops the state machines and event processors of the comp objects.
Params: none
Return: none
Delete the comp objects of the comp app.
Params: none
Return: none
Get service data from the service in the comp objects of the comp app.
Params:
url URL of the service data to get.
Return: JSON serialized string of the data.
Set service data to the service in the comp objects of the comp app.
Params:
url URL of the service data to set.
Json_string JSON serialized string of the data to set.
Return: 1 if succeeded, otherwise 0.