Application and Tasks

An application is simply a Lua script file.

An application shall have a unique name. Application name follows the same validation rule as developer account name.

Combination of developer account name and application name uniquely identifies an application.

Functions

An application is a collection of functions.

A function may have arguments.

Public and Private Functions

Every function in Lua file is public function by default.

Developer may mark function as private using “local” keyword.

Note, Liberty-IoT-OS enforces several further restrictions on Application code. One restriction is that a global declaration in the code shall not be modified (written). Any such attempt will raise a runtime error.

Tasks

Every function is automatically exposed as executable.

Using a smartphone or Liberty-IoT Studio, user creates a task by:

  1. Choose a function from an application.
  2. Specify the input argument of that function (if there is any)

In another word, every public function is an executable in Liberty-IoT-OS. Every task is a process in Liberty-IoT-OS, which is an instance of function with specific arguments.

Task is running on Liberty IoT Hub. Task is managed with Smart-Phone tool or web tool.

Using our tools, users can easily create, modify, start, stop and delete a task.