Create and Wait (LCC.assist.request)
Declaration
result, err, task = LCC.assist.request(options)
Parameters
- options
Table. Assist request configuration. See Common Options and Return Objects.
Return Values
- result
Table ornil. The submitted result object on success. - err
String ornil. Failure reason, such as"cancelled","expired", or"timeout". - task
Table ornil. The latest task state.
Notes
request()callsLCC.assist.create(options)to create the request, then callsLCC.assist.wait(task.id, options.timeout, options.pollIntervalMs)to block until a result is available.
In most scripts, preferask_text(),pick_point(), orrequest_control()because they set the request type automatically.
If the wait times out, the SDK cancels the request and returnsnil, "timeout", task.
Example
local result, err, task = LCC.assist.request({
type = "control",
title = "Handle verification",
text = "Remote-control the device, finish the current verification, then click Done",
timeout = 300,
})
if not result then
nLog("assist request not completed", err, task and task.status)
end