TReK Python  5.3.2
Telemetry/Command API
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 
 Class initializer. More...
 
Commanding

These methods support sending/updating commands.

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

These methods support command responses.

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

These methods support blocking.

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

These methods support configurations.

def get_configuration_message (name: str, ParameterCollection param_coll) -> str 
 Get the details for a configuration message. More...
 
def get_configuration_message_list () -> List[str] 
 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 
 Sets the value of a configuration item. More...
 
Status Message

These methods provide command status information.

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

CommandApi () -> None

Class initializer.

Allocates instance to connect to commanding API.

Reimplemented from ApiClient.

Member Function Documentation

◆ destination_allows_blocking()

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

◆ get_blocking_flag()

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()

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()

get_command (name : str