Support load lua scripts to augument the program features. This script must have 2 functions:
serial_rx(msg: bytes): This function will be called when a new message is received from device. Its arguments are:
b. msg: A byte stream with the message received from device.
user_command(arg_list: List[str]): This function will be called when the user invokes this script using ! notation. Its arguments are:
b. args: A list of arguments passed by user
The plugins can be installed or loaded in runtime. Plugins installed are copied to config folder and loaded at each start-up.
The current system commands, using ! notation, must be replaced by plugin system. At the start-up, the program will check the integrity of system plugins. If there are missing plugins or some plugins are broken, then the program will download this plugins. The system plugins have the following names: sys.lua and serial.lua.
Support load lua scripts to augument the program features. This script must have 2 functions:
serial_rx(msg: bytes)
: This function will be called when a new message is received from device. Its arguments are: b.msg
: A byte stream with the message received from device.user_command(arg_list: List[str])
: This function will be called when the user invokes this script using!
notation. Its arguments are: b.args
: A list of arguments passed by userThe plugins can be installed or loaded in runtime. Plugins installed are copied to config folder and loaded at each start-up.
The current system commands, using
!
notation, must be replaced by plugin system. At the start-up, the program will check the integrity of system plugins. If there are missing plugins or some plugins are broken, then the program will download this plugins. The system plugins have the following names:sys.lua
andserial.lua
.