Closed matheuswhite closed 1 month ago
The plugin should implement a function help
that returns a table with supported commands. The table must obey the following format:
function scope.help()
return {
{'connect', scope.arg('dev_name', scope.dyn)},
{'disconnect'},
{'write', scope.arg('characteristic', scope.dyn), scope.arg('data', scope.str)}
{'read', scope.arg('characteristic', scope.dyn)},
{'track', scope.arg('characteristic', scope.dyn), scope.arg('mode', scope.options('last', 'all'))},
}
end
scope.str
: String typescope.options
: Options type. This type has a list of options, resolved in loadtime.scope.dyn
-> Dynamic type. This type has a list of options, resolved in runtime. To resolve this argument, the program must call the function scope.resolve(command, argument)
. This function must return a list of strings.function scope.resolve(command, argument)
if argument == 'characteristic' then
return scope.ble_chars()
end
end
Do help for !plugin
inside the program
It'll be made on #98
Dependencies