Logo
Telescience Resource Kit
TReK Python  5.4.0 ART
CommandApi Class Reference

Provides access to command features of TReK. More...

Inherits ApiClient.

Public Member Functions

Initialize / Finalize

Functions handling class initialization and finalization.

def CommandApi ( -> None ) -> def 
 Class initializer. More...
 
Commanding

These methods support sending/updating commands.

def get_command (name: str, packet: Packet -> None ) -> def 
 Gets the complete definition of the command from the command controller. More...
 
def get_command_list ( -> List[str] ) -> def 
 Get a list of commands known by the command controller. More...
 
def initiate_command (name: str -> int ) -> def 
 Sends a request to the final destination to uplink a command. More...
 
def insert_data_and_send_command (name: str, byte_data: bytes -> int ) -> def 
 Inserts the specified data into a command's 'data zone'. More...
 
def ready_for_request ( -> bool ) -> def 
 Determine if it is ok to send a request on the command connection. More...
 
def send_binary_command (name: str, binary_data: bytes -> int ) -> def 
 Sends the command identified by buf_ptr to the destination using the given name. More...
 
def send_this_command (packet: Packet -> int ) -> def 
 Builds the command defined by Packet and sends it to the destination. More...
 
def send_trek_command (name: str -> int ) -> def 
 Sends the specified command based on the current definition of the command within the command controller. More...
 
def update_command (packet: Packet -> None ) -> def 
 Updates the specified command to the destination. More...
 
def update_destination_command (name: str -> None ) -> def 
 Sends a request to the final destination to update a command. More...
 
Command Sequences

These methods support sending/updating commands from a binary command sequences file.

def register_sequence_command_callback (callback_fn: SequenceCommandCallback -> None ) -> def 
 Register a callback function to receive sent command notifications. More...
 
def register_sequence_error_callback (callback_fn: SequenceErrorCallback -> None ) -> def 
 Register a callback function to receive notification when a sequence errors. More...
 
def register_sequence_start_callback (callback_fn: SequenceStartCallback -> None ) -> def 
 Register a callback function to receive a command sequence start notification. More...
 
def register_sequence_wait_callback (callback_fn: SequenceWaitCallback -> None ) -> def 
 Register a callback function to receive notification when a sequence pauses. More...
 
def register_sequence_stop_callback (callback_fn: SequenceStopCallback -> None ) -> def 
 Register a callback function to receive notification when a sequence ends. More...
 
def start_sequence (file_name: str -> int ) -> def 
 Start sending commands from the provided command sequence binary file. More...
 
def stop_sequence (token: int -> None ) -> def 
 Stop an active command sequence which correlated to a specific token. More...
 
def stop_all_sequences ( -> None ) -> def 
 Stop all active command sequences. More...
 
def find_active_sequence (token: int -> int ) -> def 
 Check if a sequence correlated to a specific token is active. More...
 
Command Response

These methods support command responses.

def get_track (token: int, track_item: TrackItem -> None ) -> def 
 Find out any command track information for this 'token'. More...
 
def get_command_response (name: str, response: CommandResponse -> None ) -> def 
 Get the details for a command response. More...
 
def get_command_response_list ( -> List[str] ) -> def 
 Get a list of possible command responses for the command source. More...
 
Blocking

These methods support blocking.

def destination_allows_blocking ( -> bool ) -> def 
 Determines if a destination allows blocking. More...
 
def get_destination_type ( -> str ) -> def 
 Returns name of destination. More...
 
def get_blocking_flag ( -> bool ) -> def 
 Gets the current value of the blocking flag for this instance of the API. More...
 
def get_blocking_timeout ( -> int ) -> def 
 Gets the current value of the blocking timeout. More...
 
def set_blocking_flag (new_flag: bool -> None ) -> def 
 Sets the blocking flag. More...
 
def set_blocking_timeout (timeout: int -> None ) -> def 
 Sets the amount of time a method that supports blocking will wait to unblock. More...
 
def unblock_destination ( -> None ) -> def 
 Unblocks a destination. More...
 
Configuration Message

These methods support configurations.

def get_configuration_message (name: str, param_coll: ParameterCollection -> str ) -> def 
 Get the details for a configuration message. More...
 
def get_configuration_message_list ( -> List[str] ) -> def 
 Get a list of messages that a destination allows to be configured by a user. More...
 
def set_configuration_item (name: str, value: str -> None ) -> def 
 Sets the value of a configuration item. More...
 
Status Message

These methods provide command status information.

def get_status_item (name: str -> str ) -> def 
 Gets the value of the requested item. More...
 
def get_status_message (name: str, param_coll: ParameterCollection -> str ) -> def 
 Get the details for a status message. More...
 
def get_status_message_list ( -> List[str] ) -> def 
 Get a list of messages that the user can send. More...
 
- Public Member Functions inherited from ApiClient
def cleanse ( -> None ) -> def 
 Cleans up any resources from crashed TReK user programs. More...
 
def connect ( str destination="DefaultDataStore" -> None ) -> def 
 Connects this instance of the API to TReK for the specified destination. More...
 
def is_connected ( -> bool ) -> def 
 Indicates if the API is connected. More...
 
def disconnect ( -> None ) -> def 
 Disconnects from the destination. More...
 
def get_wait_timeout ( -> int ) -> def 
 Returns the current timeout value for API calls. More...
 
def set_wait_timeout (timeout: int -> None ) -> def 
 Sets the timeout value for API calls that require communicating with TReK. More...
 

Detailed Description

Provides access to command features of TReK.

This class provides access to the command feature of TReK. Users of the class can uplink commands, update commands, receive command track information, and more.

Constructor & Destructor Documentation

◆ CommandApi()

() -> None

Class initializer.

Allocates instance to connect to commanding API.

Reimplemented from ApiClient.

Member Function Documentation

◆ destination_allows_blocking()

() -> bool

Determines if a destination allows blocking.

This will determine if the blocking flag is available for use.

Returns
True if blocking is available.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED

◆ find_active_sequence()

(token : int ) -> int

Check if a sequence correlated to a specific token is active.

Parameters
[in]tokenunique token to check if active.
Returns
SUCCESS (0), if sequence is active, FAIL (1), if the sequence is not active or not found.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT,

31122 - TCA_WORKER_WAIT_ERR,

15025 - TREK_DATA_VALUE_LESS_THAN_MIN

◆ get_blocking_flag()

() -> bool

Gets the current value of the blocking flag for this instance of the API.

Returns
True if blocking.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED

◆ get_blocking_timeout()

() -> int

Gets the current value of the blocking timeout.

Returns
Timeout in milliseconds.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT

◆ get_command()

(name : str 
packet : Packet 
) -> None

Gets the complete definition of the command from the command controller.

Populates command information within the provided packet for the requested command. The returned data can be used for the send_this_command() method.

Parameters
[in]nameThe name of the command to retrieve.
[out]packetThe packet definition of the commmand.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT,

11003 - CMD_API_MAX_NAME_LEN_ERROR

◆ get_command_list()

() -> List[str]

Get a list of commands known by the command controller.

Details about each command can be obtained by calling the get_command() method.

Returns
list[str] Returns an array of command names.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT,

11001 - CMD_API_FILE_OPEN_ERR

◆ get_command_response()

(name : str 
response : CommandResponse 
) -> None

Get the details for a command response.

The command response contains the details including the possible error codes and descriptions.

Parameters
[in]nameThe name of the command response. Usually returned from get_command_response_list().
[in,out]responseThe class instance updated to contain the details.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT,

11003 - CMD_API_MAX_NAME_LEN_ERROR

◆ get_command_response_list()

() -> List[str]

Get a list of possible command responses for the command source.

The order of the list is set by the Command Controller and should be listed from first expected response to last expected response. An empty list indicates that no responses are expected from the destination. get_command_response() can be called to get details about each response in the list.

Returns
list[str] List of command responses names.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT,

11001 - CMD_API_FILE_OPEN_ERR

◆ get_configuration_message()

(name : str 
param_coll : ParameterCollection 
) -> str

Get the details for a configuration message.

The parameter collection will be updated to contain one or more of parameters that may be configured for the destination.

Parameters
[in]nameThe name of the configuration message. Usually returned from get_configuration_message_list().
[in,out]param_collParameterCollection to hold parameters in the message.
Returns
Short description of message.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT,

11003 - CMD_API_MAX_NAME_LEN_ERROR,

14014 - CMD_API_NOT_ENOUGH_SPACE

◆ get_configuration_message_list()

() -> List[str]

Get a list of messages that a destination allows to be configured by a user.

The returned names can be used in calls to get_configuration_message() to get the details of what may be configured.

Returns
list[str] List containing the names of each configuration message.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT,

11001 - CMD_API_FILE_OPEN_ERR

◆ get_destination_type()

() -> str

Returns name of destination.

Returns
Destination name.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT,

14014 - CMD_API_NOT_ENOUGH_SPACE

◆ get_status_item()

(name : str ) -> str

Gets the value of the requested item.

Parameters
[in]nameThe name of the item to status.
Returns
Value.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT,

11003 - CMD_API_MAX_NAME_LEN_ERROR
Request String Description
AosLos Indicates if MCC-H currently AOS or LOS.
CarProcessingEnablement Indicates if command action reponse processing is enabled or disabled.
CarTimeout The amount of time in seconds that the POIC will wait for a CAR message before declaring failure.
ClearToSendMechanism The current response required before another command can be uplinked. Valid values are ERR, CAR, and FSV.
CommandDatabaseVersion The version of the command database used by the POIC.
ConnectionStatus Describes if connection to POIC was successful and if not the reason for failure.
CrrProcessingEnablement Indicates if command reaction reponse processing is enabled or disabled.
CurrentStationMode Indicates the current ISS mode.
FsvProcessingEnablement Indicates if flight system verifier processing is enabled or disabled.
FsvTimeout The amount of time in seconds that the POIC will wait for a FSV message before declaring failure.
KuAosLos Indicates whether the Ku-Band path is AOS or LOS. If LOS telemetry indicators for commanding may not be available.
MaximumRetries The number of attempts the POIC will make to transmit a command. set_configuration_item() can be used to control for individual sessions.
McchConnection Indicates if the POIC system is connected to MCC-H.
McchEnablement Indicates if the MCC-H is enabled or disabled for commanding.
MinimumTimeDelay The time delay required between issuing commands. Value is milliseconds.
Mission The mission from the MOP.
NonEhsCommandingEnablement Indicates if remote users are enabled or disabled from commanding.
OperationalSupportMode The operational support mode from the MOP.
PoicConnection Indicates if a remote EHS command system is connected. Not applicable to TReK users.
PoicEnablement Indicates if the POIC is enabled or disabled for commanding.
Project The project from the MOP.
RemoteEhsEnablement Indicates if a remote instance of the EHS system is enabled for commanding. Not applicable to TReK users.
SourceMessageKey Internal value used only by the API.
UplinkPath Identifiers the uplink path for real-time commands.
UserEnablement Indicates if the user in enabled or disabled for S-band commanding.
UserInhibitStatus Indicates if the user is inhibited from commanding due to LOS.

◆ get_status_message()

(name : str 
param_coll : ParameterCollection 
) -> str

Get the details for a status message.

The parameter collection will be updated to contain one or more of parameters and their current values.

Parameters
[in]nameThe name of the status message. Usually returned from get_status_message_list().
[in,out]param_collParameterCollection to hold parameters in message.
Returns
Short description of message.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT,

11003 - CMD_API_MAX_NAME_LEN_ERROR

◆ get_status_message_list()

() -> List[str]

Get a list of messages that the user can send.

The returned message names can be used in calls to get_status_message() to get the contents of the status message.

Returns
list[str] containing the name of each status message.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT,

11001 - CMD_API_FILE_OPEN_ERR

◆ get_track()

(token : int 
track_item : TrackItem 
) -> None

Find out any command track information for this 'token'.

The track item is updated to contains the name of the command, the time the command was sent, and an ordered (by receipt time) list of all responses, if any. It is possible that the same response name is received multiple times for a command.

Parameters
[in]tokenToken used to correlate specific instances of command sends. The value is returns from a call to send_this_command() or initiate_command().
[in,out]track_itemTrackItem to contain requested information.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT

◆ initiate_command()

(name : str ) -> int

Sends a request to the final destination to uplink a command.

If the final destination does not support this means of sending a command, the method will return an error. The returned token can be used to obtain and/or correlate tracking information.

Parameters
[in]nameThe name of the command.
Returns
Token that uniquely identifies a command send instance.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT,

11002 - CMD_API_MAX_LEN_ERROR,

◆ insert_data_and_send_command()

(name : str 
byte_data : bytes 
) -> int

Inserts the specified data into a command's 'data zone'.

The data field in the command must contain a single parameter for the insertion of the data. The returned token can be used to obtain and/or correlate tracking information.

Note
The destination's command controller may manipulate the data send to met interface requirements. See command controller documentation.
Parameters
[in]nameName of the command. Some destinations may not require the name, but it is advised for tracking purposes.
[in]byte_dataThe byte array of data to send.
Returns
Returns the token value that identifies the command instance.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT,

11002 - CMD_API_MAX_LEN_ERROR,

11003 - CMD_API_MAX_NAME_LEN_ERROR,

11004 - CMD_API_DOES_NOT_EXIST

◆ ready_for_request()

() -> bool

Determine if it is ok to send a request on the command connection.

Returns
True if ready.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT

◆ register_sequence_command_callback()

(callback_fn : SequenceCommandCallback ) -> None

Register a callback function to receive sent command notifications.

Parameters
[in]callback_fnCallback method to receive notification when each command executes.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT,

31122 - TCA_WORKER_WAIT_ERR,

11018 - CMD_API_SEM_OPEN_ERROR,

11020 - CMD_API_NOT_CLEAR_TO_SEND
Note
Callbacks occur in a different thread than the main routine.

The user's callback function provided as callaback_fn, follows the following method:

def command_callback(token: int, status: str, command: str, count: int, ret_code: int, command_token: int):

Parameters

  • token unique sequence identifier.
  • status status of the sequence.
  • command name of the command.
  • count the number of commands executed.
  • ret_count return code associated with the command.
  • command_token unique token for the executed command for tracking.

◆ register_sequence_error_callback()

(callback_fn : SequenceErrorCallback ) -> None

Register a callback function to receive notification when a sequence errors.

Parameters
[in]callback_fnCallback method to receive notification.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT,

31122 - TCA_WORKER_WAIT_ERR,

11018 - CMD_API_SEM_OPEN_ERROR,

11020 - CMD_API_NOT_CLEAR_TO_SEND
Note
Callbacks occur in a different thread than the main routine.

The user's callback function provided as callaback_fn, follows the following method:

def error_callback(token: int, count: int, ret_code: int):

Parameters

  • token unique sequence identifier.
  • count the number of commands executed.
  • ret_count return code associated with the command.

◆ register_sequence_start_callback()

(callback_fn : SequenceStartCallback ) -> None

Register a callback function to receive a command sequence start notification.

Parameters
[in]callback_fnCallback method to receive notification when a sequence starts.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT,

31122 - TCA_WORKER_WAIT_ERR,

11018 - CMD_API_SEM_OPEN_ERROR,

11020 - CMD_API_NOT_CLEAR_TO_SEND
Note
Callbacks occur in a different thread than the main routine.

The user's callback function provided as callaback_fn, follows the following method:

def start_callback(token: int, sequence_file: str):

Parameters

  • token unique sequence identifier.
  • sequence_file full path of the sequence file starting.

◆ register_sequence_stop_callback()

(callback_fn : SequenceStopCallback ) -> None

Register a callback function to receive notification when a sequence ends.

Parameters
[in]callback_fnCallback method to receive notification.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT,

31122 - TCA_WORKER_WAIT_ERR,

11018 - CMD_API_SEM_OPEN_ERROR,

11020 - CMD_API_NOT_CLEAR_TO_SEND
Note
Callbacks occur in a different thread than the main routine.

The user's callback function provided as callaback_fn, follows the following method:

def stop_callback(token: int, status: str, count: int, ret_code: int):

Parameters

  • token unique sequence identifier.
  • status status of the sequence.
  • count the number of commands executed.
  • ret_count return code associated with the command.

◆ register_sequence_wait_callback()

(callback_fn : SequenceWaitCallback ) -> None

Register a callback function to receive notification when a sequence pauses.

Parameters
[in]callback_fnCallback method to receive notification.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT,

31122 - TCA_WORKER_WAIT_ERR,

11018 - CMD_API_SEM_OPEN_ERROR,

11020 - CMD_API_NOT_CLEAR_TO_SEND
Note
Callbacks occur in a different thread than the main routine.

The user's callback function provided as callaback_fn, follows the following method:

def wait_callback(token: int, status: str, wait_millis: int):

Parameters

  • token unique sequence identifier.
  • status status of the sequence.
  • wait_millis the amount of time in milliseconds for the wait.

◆ send_binary_command()

(name : str 
binary_data : bytes 
) -> int

Sends the command identified by buf_ptr to the destination using the given name.

The returned token can be used to obtain and/or correlate tracking information.

Parameters
[in]nameName of the command. Some destinations may not require the name, but it is advised for tracking purposes.
Note
The destination's command controller may manipulate the data send to met interface requirements. See command controller documentation.
Parameters
[in]binary_dataThe byte array of data to send.
Returns
Returns the token value that identifies the command instance.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT,

11002 - CMD_API_MAX_LEN_ERROR,

11003 - CMD_API_MAX_NAME_LEN_ERROR,

11004 - CMD_API_DOES_NOT_EXIST

◆ send_this_command()

(packet : Packet ) -> int

Builds the command defined by Packet and sends it to the destination.

The returned token can be used to obtain and/or correlate tracking information.

Note
The destination's command controller may manipulate the data send to met interface requirements. See command controller documentation.
Parameters
[in]packetA complete definition of the packet to send. All parameter values must have a value.
Returns
Token that uniquely identifies a command sent instance.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT

◆ send_trek_command()

(name : str ) -> int

Sends the specified command based on the current definition of the command within the command controller.

The returned token can be used to obtain and/or correlate tracking information.

Parameters
[in]nameThe name of the command. Some destinations may not require the name, but it is advisable to set it for tracking purposes.
Returns
Token value that uniquely identifies a command send instance.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT,

11003 - CMD_API_MAX_NAME_LEN_ERROR,

11004 - CMD_API_DOES_NOT_EXIST

◆ set_blocking_flag()

(new_flag : bool ) -> None

Sets the blocking flag.

If False, it forces a destination to allow commands to be sent.

By default the flag is true. For command controllers that have optional blocking, this flag indicates whether or not the API method will block until the 'clear to send' mechanism is released. The API methods that use this flag are: send_binary_command(), insert_data_and_send_command(), initiate_command(), send_this_command(), and send_trek_command().

Note
It is not recommended that you change this behavior of the API unless you have exhausted all other options. Changing a destination that allows blocking to one that does not enforce it can cause commands to be rejected because the destination is not ready. If the destination is broken (i.e., has a bug that needs to be fixed), this method may provide a temporary workaround until the problem is resolved.
Parameters
[in]new_flagNew blocking setting.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT

◆ set_blocking_timeout()

(timeout : int ) -> None

Sets the amount of time a method that supports blocking will wait to unblock.

Value is ignored for destinations that do not support blocking or when user has turned off blocking with set_blocking_flag(). This timeout value should be less than the value set by ApiClient.set_wait_timeout().

The default value for the blocking timeout is 20,000 milliseconds.

Parameters
[in]timeoutTimeout value in milliseconds.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT

◆ set_configuration_item()

(name : str 
value : str 
) -> None

Sets the value of a configuration item.

Parameters
[in]nameThe name of the configuration item.
[in]valueThe value of the configuration item.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT,

11003 - CMD_API_MAX_NAME_LEN_ERROR
Request String Description
NumberOfRetries Sets the number of times a command will be retried if it does not succeed. Cannot exceed the MaximumRetries status value (get_status_item()).

◆ start_sequence()

(file_name : str ) -> int

Start sending commands from the provided command sequence binary file.

The returned token can be used to correlate tracking information.

Parameters
[in]file_nameThe full path and file name of the binary command sequence to start.
Returns
Token value that uniquely identifies the command sequence instance.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT,

31122 - TCA_WORKER_WAIT_ERR,

11002 - CMD_API_MAX_LEN_ERROR,

11006 - CMD_API_BAD_INDEX,

11018 - CMD_API_SEM_OPEN_ERROR

◆ stop_all_sequences()

() -> None

Stop all active command sequences.

Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT,

31122 - TCA_WORKER_WAIT_ERR

◆ stop_sequence()

(token : int ) -> None

Stop an active command sequence which correlated to a specific token.

Parameters
[in]tokenunique sequence token to stop.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT,

31122 - TCA_WORKER_WAIT_ERR

◆ unblock_destination()

() -> None

Unblocks a destination.

If the destination doesn't allow blocking, the function will still return without exception.

This function is provided in case a logic error in the delivered software prevents a command connection from being used. You should not call this method unless it is determined that the delivered software has an error. Please contact the TReK Help Desk if the destination is remaining blocked unexpectedly for help.

Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

31020 - TCA_WAIT_TIMEOUT

◆ update_command()

(packet : Packet ) -> None

Updates the specified command to the destination.

The name of the command is retrieved from the Packet. The current definition is removed from the command store and replaced with the new definition supplied. No checks are performed to see if the command defintions match in any way.

Parameters
[in]packetThe definition of the new command.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

11004 - CMD_API_DOES_NOT_EXIST,

11003 - CMD_API_MAX_NAME_LEN_ERROR

◆ update_destination_command()

(name : str ) -> None

Sends a request to the final destination to update a command.

If the final destination does not support this means of sending a command, the method will return an error. The actual data sent to the destination will vary based on the defined interface.

Parameters
[in]nameThe name of the command.
Exceptions
TrekError31123 - TCA_API_NOT_CONNECTED,

11003 - CMD_API_MAX_NAME_LEN_ERROR