Documentation Home Page ◇ RT-LAB Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.
Command
Group | Generic |
---|---|
Description | Run an RT-LAB command for a certain RT-Lab object. |
Required Control | Specific to each command, see OP_COMMAND |
Usage | outputId = RtlabApi.Command (ownerId, command, attributes, values) |
Input |
|
Output |
|
Return Value |
|
Examples | None |
Related Items | OP_COMMAND, OP_ATTRIBUTE |
Modules | import RtlabApi |
Example code | import sys
import RtlabApi
RtlabApi.OpenProject("CommandTest")
target_id = RtlabApi.FindObjectId(RtlabApi.OP_TYPE_TARGET, "test")
timeout = 2000
target_cmd_arg = (RtlabApi.ATT_VALUE, RtlabApi.ATT_WAIT_FOR_COMPLETION)
target_cmd_val = ("uname -a", True)
RtlabApi.RegisterDisplay(RtlabApi.DISPLAY_REGISTER_ALL)
RtlabApi.Command(target_id, RtlabApi.CMD_EXECUTE, target_cmd_arg, target_cmd_val)
result = ''
done = ''
while not done:
done, _, tmp = RtlabApi.DisplayInformation(timeout)
result = result + tmp
print(result) |
OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter