TuoniCommand¶
- class tuoni.TuoniCommand(conf, c2)[source]¶
A class that provides data and functionality for a sent command.
- command_id¶
The unique identifier of the command.
- Type:
int
- configuration¶
The configuration settings for the command.
- Type:
dict
- execConf¶
The execution configuration for the command.
- Type:
dict
- created¶
The time, as a string, indicating when the command was created.
- Type:
str
- sent¶
The time, as a string, indicating when the command was sent.
- Type:
str
- result¶
The result data returned from the command execution.
- Type:
- get_result(reload=True)[source]¶
Retrieve the result object of the command.
- Parameters:
reload (bool) – If True, reload the command result data from the server.
- Returns:
The result object containing the data from the command execution.
- Return type:
- result_status_done(reload=True)[source]¶
Check if the command has completed.
- Parameters:
reload (bool) – If True, reload the command data from the server to verify the current status.
- result_status_ongoing(reload=True)[source]¶
Check if the command is still ongoing.
- Parameters:
reload (bool) – If True, reload the command data from the server to verify the current status.
- wait_result(interval=1, maxWait=0)[source]¶
Wait for the command result object to be available.
- Parameters:
interval (int) – The interval, in seconds, to reload the data from the server.
maxWait (int) – The maximum time to wait, in seconds, before giving up. A value of 0 means wait indefinitely.
- Returns:
The result object containing the data from the command execution, if available within the specified time.
- Return type: