TReK Python  5.3.3
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  -> def  -> def ) -> def 
 Class initializer. More...
 
Commanding

These methods support sending/updating commands.

def get_command (name: str, Packet packet -> None  -> def  -> def ) -> def 
 Gets the complete definition of the command from the command controller. More...
 
def get_command_list ( -> List[str]  -> def  -> def ) -> def 
 Get a list of commands known by the command controller. More...
 
def initiate_command (name: str -> int  -> def  -> def ) -> 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  -> def ) -> def 
 Inserts the specified data into a command's 'data zone'. More...
 
def ready_for_request ( -> bool  -> def  -> def ) -> 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  -> def ) -> def 
 Sends the command identified by buf_ptr to the destination using the given name. More...
 
def send_this_command ( Packet packet -> int  -> def  -> def ) -> def 
 Builds the command defined by Packet and sends it to the destination. More...
 
def send_trek_command (name: str -> int  -> def  -> def ) -> 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  -> def ) -> def 
 Updates the specified command to the destination. More...
 
def update_destination_command (name: str -> None  -> def  -> def ) -> def 
 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  -> def  -> def ) -> def 
 Find out any command track information for this 'token'. More...
 
def get_command_response (name: str, CommandResponse response -> None  -> def  -> def ) -> def 
 Get the details for a command response. More...
 
def get_command_response_list ( -> List[str]  -> def  -> def ) -> def 
 Get a list of possible command responses for the command source. More...
 
Blocking

These methods support blocking.

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

These methods support configurations.

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

◆ 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