Loading

Uli SDK

Comp App Library

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:

 

  1. int Initialize(string& working_directory)
  2. 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.

  3. void Instantiate()
  4. Create comp objects of the comp app.

    Params: none

    Return: none

  5. void SetUpAction()
  6. Set up comp objects of the comp app.

    Params: none

    Return: none

  7. void GetParams()
  8. 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

  9. int StartUpActions()
  10. 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.

  11. void Shutdown()
  12. Shutdown the comp objects of the comp app. It stops the state machines and event processors of the comp objects.

    Params: none

    Return: none

  13. void Destroy()
  14. Delete the comp objects of the comp app.

    Params: none

    Return: none

  15. string GetData(const string& url)
  16. 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.

  17. int SetData(const string& url, const string& json_string)
  18. 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.