Edge API - Linux, Android
This page describes the API provided by LG AI Platform SDK.
Edge API is an interface supported in the Edge/Device area of LG AI Platform.
Linux/Android SDK provides 8 Edge APIs in total. The description and calling sequence of each API are as follows:
Engine Creation API
Creates an engine and allocates memory.
Engine Configuration API
Configures the control values and settings of the JSON format for an engine.
Engine Listener Registration API
Registers a callback listener to receive a resultant value after processing by the engine.
Engine Start API
Starts the engine once the engine settings are configured.
Input/Output Data Transmission API
Transfers the input data to an engine and receives the resultant value after it is processed by the engine.
It is used to change the engine settings or to transmit control commands while the engine is running.
Engine Stop API
Stops an engine when it is no longer used. In the case of an engine using a thread, it stops the thread. Data entered after the engine stops is ignored.
Engine Destruction API
Destroys the engine and releases the engine object from memory.
SDK API provides the getState() API so an application can easily check the status of an engine object. An application developer can check the engine status by calling the getState() API while the application is running. The engine statuses change when the API is called, as shown in the following figure.
The initial state of the engine.
If the create() API is processed successfully, the state of the engine changes to CREATED.
If the configure() API is processed successfully, the state of the engine changes to READY.
If the start() API is processed successfully, the state of the engine changes to RUNNING.
If the destroy() API is processed successfully, the state of the engine changes to DESTROYED.