|
Telescience Resource Kit
TReK .NET Framework
5.4.0 ART
|
This class describes a packet composed of one or more parameters. More...
#include <trek_cmd_user_api_dotnet.h>
Static Public Member Functions | |
static int | Uplink_POIC_Command (System::String^ dest_name_ptr, System::String^ cmd_name_ptr) |
This function sends a request to the POIC that will build the command uplink pattern from the current values stored in the POIC Operational Command Database (OCDB). More... | |
static int | Uplink_User_Command (System::String^ dest_name_ptr, System::String^ cmd_name_ptr, array< System::Byte >^ cmd_data_ptr, System::UInt32 len_of_cmd_data) |
This function sends the user provided command to the specified destination. More... | |
static int | Add_Header_And_Uplink_Command (System::String^ dest_name_ptr, System::String^ cmd_name_ptr, System::String^ header_name_ptr, array< System::Byte >^ cmd_data_ptr, System::UInt32 len_of_cmd_data) |
This function builds the specified header from the information contained in the TReK database associated with the destination and appends the user provided command data to the header. The resulting bit pattern is sent to the destination. More... | |
static int | Build_And_Uplink_Command (System::String^ dest_name_ptr, System::String^ cmd_name_ptr) |
This function builds the uplink pattern from the information contained in the TReK database for this destination. Both the header and command are built and the resulting bit pattern is sent to the destination. More... | |
static int | Update_Numeric_Field_Value (FIELD_TYPE field_type, System::String^ dest_name_ptr, System::String^ mnemonic_ptr, System::String^ field_name_ptr, System::Double new_value) |
This function updates a local command or header field value with the specified double precision floating point value. More... | |
static int | Update_String_Field_Value (FIELD_TYPE field_type, System::String^ dest_name_ptr, System::String^ mnemonic_ptr, System::String^ field_name_ptr, System::String^ new_value_ptr) |
This function updates a local command or header field value with the specified NULL terminated string value. More... | |
static int | Update_Binary_Field_Value (FIELD_TYPE field_type, System::String^ dest_name_ptr, System::String^ mnemonic_ptr, System::String^ field_name_ptr, array< System::Byte >^ new_value_ptr, System::Int32 length) |
This function updates a local command or header field value with the specified binary value. More... | |
static int | Update_POIC_Database (FIELD_TYPE field_type, System::String^ dest_name_ptr, System::String^ mnemonic_ptr) |
This function updates the modifiable fields in the POIC database with the contents of the local database for the specified command. More... | |
static int | Get_Numeric_Field_Value (FIELD_TYPE field_type, System::String^ dest_name_ptr, System::String^ mnemonic_ptr, System::String^ field_name_ptr, [System::Runtime::InteropServices::Out]System::Double %value_ptr) |
This function gets the current value of a local command or header field. More... | |
static int | Get_String_Field_Value (FIELD_TYPE field_type, System::String^ dest_name_ptr, System::String^ mnemonic_ptr, System::String^ field_name_ptr, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data_ptr, [System::Runtime::InteropServices::Out]System::String^ %value_ptr) |
This function gets the current value of a local command or header field. More... | |
static int | Get_Binary_Field_Value (FIELD_TYPE field_type, System::String^ dest_name_ptr, System::String^ mnemonic_ptr, System::String^ field_name_ptr, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data_ptr, [System::Runtime::InteropServices::Out]array< System::Byte >^ %value_ptr) |
This function gets the current value of a local command or header field. More... | |
static int | Get_POIC_Command_System_Configuration (System::String^ dest_name_ptr, [System::Runtime::InteropServices::Out]POIC_COMMAND_SYSTEM_CONFIGURATION %config_ptr) |
This function retrieves the Command System Configuration message for a destination. This message contains all of the items found in the most recent message received from the POIC. More... | |
static int | Get_POIC_Command_System_Status (System::String^ dest_name_ptr, [System::Runtime::InteropServices::Out]POIC_COMMAND_SYSTEM_STATUS %status_ptr) |
This function retrieves the Command System Status message for a destination. This message contains all of the items found in the most recent message received from the POIC. More... | |
static int | Get_Command_API_Return_Code_As_String (System::Int32^ error_code, System::Int32^ size_of_data, [System::Runtime::InteropServices::Out]System::String^ %message_ptr) |
This function provides a way to retrieve a string value that corresponds to a Command API integer value return code. More... | |
static int | Unblock_Destination (System::String^ dest_name_ptr) |
This function bypasses the built in blocking (i.e., waiting for the appropriate "Clear to Send" message to be returned from the POIC) for a destination in TReK. More... | |
static int | Set_Number_Of_Retries (System::String^ dest_name_ptr, System::Int32 num_retries) |
This function sets the number of retries for the POIC system to attempt when sending a command uplink to the MCC-H. More... | |
This class describes a packet composed of one or more parameters.
The Packet class encapsulates one or more parameters that can be built or extracted. The Packet class has three zones: header, data, and trailer. For the Packet to be considered valid, at least one zone must be populated. Each zone can be populated with a ParameterCollection or another Packet. The example below shows a packet that has all three zones populated. The Header and Trailer zones consist of a parameter collection and the Data zone consists of another Packet which only has two zones populated (Header and Data).
|
static |
This function builds the specified header from the information contained in the TReK database associated with the destination and appends the user provided command data to the header. The resulting bit pattern is sent to the destination.
[in] | dest_name_ptr | The name of the destination to send the command. |
[in] | cmd_name_ptr | The name of the command to request for uplink. |
[in] | header_name_ptr | The name of the header to build. This header must be in the database for the destination. |
[in] | cmd_data_ptr | The bit pattern for the command data. |
[in] | len_of_cmd_data | The length of the command data bit pattern in bytes. |
Example:
|
static |
This function builds the uplink pattern from the information contained in the TReK database for this destination. Both the header and command are built and the resulting bit pattern is sent to the destination.
[in] | dest_name_ptr | The name of the destination to send the command. This destination must be a POIC type destination. |
[in] | cmd_name_ptr | The name of the command to build for uplink. |
Example:
|
static |
This function gets the current value of a local command or header field.
The command or header must be defined in the database associated with the destination. This function is used to data that cannot be represented as a number or string.
[in] | field_type | Either COMMAND_FIELD or HEADER_FIELD. |
[in] | dest_name_ptr | The name of the destination to get the command or header. |
[in] | mnemonic_ptr | The name of the command or header. |
[in] | field_name_ptr | The name of the field to retrieve the current value for. |
[in] | size_of_data_ptr | The size of data allocated by the calling program in bytes. You must specify enough space for the data to be copied. |
[out] | value_ptr | The returned value for the command or header field. |
Example:
|
static |
This function provides a way to retrieve a string value that corresponds to a Command API integer value return code.
The user must allocate memory for the string.
[in] | error_code | Returned from a call to another TReK Command API function. |
[in] | size_of_data | The size of data allocated. Should be at least 70 bytes. |
[out] | message_ptr | The returned message string. |
Example:
|
static |
This function gets the current value of a local command or header field.
The command or header must be defined in the database associated with the destination. This function is used to get all numeric data, including integers and unsigned integers.
[in] | field_type | Either COMMAND_FIELD or HEADER_FIELD. |
[in] | dest_name_ptr | The name of the destination to get the command or header. |
[in] | mnemonic_ptr | The name of the command or header. |
[in] | field_name_ptr | The name of the field to retrieve the current value for. |
[out] | value_ptr | The returned value for the command or header field. |
Example:
|
static |
This function retrieves the Command System Configuration message for a destination. This message contains all of the items found in the most recent message received from the POIC.
[in] | dest_name_ptr | The name of the destination. This destination must be a POIC type destination. |
[out] | config_ptr | A structure defined in trek_cmd_user_api.h. You must have allocated memory for this variable before calling the function. |
Example:
|
static |
This function retrieves the Command System Status message for a destination. This message contains all of the items found in the most recent message received from the POIC.
[in] | dest_name_ptr | The name of the destination. This destination must be a POIC type destination. |
[out] | status_ptr | A structure defined in trek_cmd_user_api.h. You must have allocated memory for this variable before calling the function. |
Example:
|
static |
This function gets the current value of a local command or header field.
The command or header must be defined in the database associated with the destination. This function is used to get all string values.
[in] | field_type | Either COMMAND_FIELD or HEADER_FIELD. |
[in] | dest_name_ptr | The name of the destination to get the command or header. |
[in] | mnemonic_ptr | The name of the command or header. |
[in] | field_name_ptr | The name of the field to retrieve the current value for. |
[in] | size_of_data_ptr | The size of data allocated by the calling program in bytes. You must specify enough space for the data to be copied. |
[out] | value_ptr | The returned value for the command or header field. |
Example:
|
static |
This function sets the number of retries for the POIC system to attempt when sending a command uplink to the MCC-H.
This value will be checked whenever a new Command System Configuration message is received for the destination. If the current value set with this function exceeds the maximum number of retries specified in the Command System Configuration message, it will be reset to the value in the Command System Configuration message.
[in] | dest_name_ptr | The name of the destination to change the number of retries. |
[in] | num_retries | New number of retries. |
Example:
|
static |
This function bypasses the built in blocking (i.e., waiting for the appropriate "Clear to Send" message to be returned from the POIC) for a destination in TReK.
It can be safely called for any destination type, but is really only applicable to POIC and TReK destinations. Since this function bypasses the blocking in TReK necessary to meet defined interfaces, the POIC destination may not accept further requests (e.g., command uplinks). This function should only be used as a means to resolve potential interface problems between the POIC and TReK when all other options have been exhausted.
[in] | dest_name_ptr | The name of the destination to unblock. |
Example:
|
static |
This function updates a local command or header field value with the specified binary value.
The command or header must be defined in the database associated with the destination. Note: For fixed length fields, if you attempt to store less than the expected number of bytes, the data will be right justified. The remaining bytes of the field will be set to zero.
[in] | field_type | Either COMMAND_FIELD or HEADER_FIELD. |
[in] | dest_name_ptr | The name of the destination to update the command or header. |
[in] | mnemonic_ptr | The name of the command or header. |
[in] | field_name_ptr | The name of the field to update. |
[in] | new_value_ptr | New binary data for field value. |
[in] | length | The number of bytes of data for new_value_ptr. |
Example:
|
static |
This function updates a local command or header field value with the specified double precision floating point value.
The command or header must be defined in the database associated with the destination. This function is used to update all numeric data, including integers and unsigned integers. This function allows the numeric fields to be updated as floating point numbers. If the uplink data type for the field is an integer, the value will be truncated when added to the uplink packet.
[in] | field_type | Either COMMAND_FIELD or HEADER_FIELD. |
[in] | dest_name_ptr | The name of the destination to update the command or header. |
[in] | mnemonic_ptr | The name of the command or header. |
[in] | field_name_ptr | The name of the field to update. |
[in] | new_value | The new value for the command or header field. |
Example:
|
static |
This function updates the modifiable fields in the POIC database with the contents of the local database for the specified command.
[in] | field_type | Must be COMMAND_FIELD |
[in] | dest_name_ptr | The name of the destination to update the command. |
[in] | mnemonic_ptr | The name of the command. |
Example:
|
static |
This function updates a local command or header field value with the specified NULL terminated string value.
The command or header must be defined in the database associated with the destination.
[in] | field_type | Either COMMAND_FIELD or HEADER_FIELD. |
[in] | dest_name_ptr | The name of the destination to update the command or header. |
[in] | mnemonic_ptr | The name of the command or header. |
[in] | field_name_ptr | The name of the field to update. |
[in] | new_value_ptr | New NULL terminated string value for the command or header field. |
Example:
|
static |
This function sends a request to the POIC that will build the command uplink pattern from the current values stored in the POIC Operational Command Database (OCDB).
[in] | dest_name_ptr | The name of the destination to send the command. This destination must be a POIC type destination. |
[in] | cmd_name_ptr | The name of the command to request for uplink. |
Example:
|
static |
This function sends the user provided command to the specified destination.
[in] | dest_name_ptr | The name of the destination to send the command. |
[in] | cmd_name_ptr | The name of the command to request for uplink. |
[in] | cmd_data_ptr | The entire bit pattern for the command. This includes any headers and checksum. |
[in] | len_of_cmd_data | The length of the bit pattern to uplink in bytes. |
Example: