TReK .NET Framework  5.3.3
Telemetry/Command API
trek::trek_user_api Class Reference

‍**************************************************************** More...

#include <trek_user_api_dotnet.h>

Static Public Member Functions

static int Get_Next_Raw_Value (PACKET_TYPE packet_type, PARAMETER_TYPE parameter_type, System::String^ identifier, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]System::UInt32 %number_samples, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]array< array< System::Byte >^>^ value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
 This function provides a way to retrieve one or multiple samples of the next raw value for a specified parameter. A parameter can be an entire packet, a subset, or an MSID. More...
 
static int Get_Next_Converted_Integer_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
 This function provides a way to retrieve one or multiple next sample(s) for a parameter that when converted is an unsigned integer. More...
 
static int Get_Next_Converted_Unsigned_Integer_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::UInt32 >^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
 Provides a way to retrieve one or multiple next sample(s) for a parameter that when converted is an integer. More...
 
static int Get_Next_Converted_Double_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Double >^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
 This function provides a way to retrieve one or multiple next sample(s) for a parameter that when converted is an unsigned integer. More...
 
static int Get_Next_Converted_String_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out] System::Int32 size_of_data, [System::Runtime::InteropServices::Out]array< System::String^>^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
 This function provides a way to retrieve one or multiple next sample(s) for a parameter that when converted is a string. More...
 
static int Get_Next_Converted_Time_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< Trek_Time >^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
 This function provides a way to retrieve one or multiple next sample(s) for a parameter that when converted is a time. More...
 
static int Get_Next_Calibrated_Double_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Double >^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
 This function provides a way to retrieve one or multiple next sample(s) for a parameter that when calibrated is a floating point. More...
 
static int Get_Next_Calibrated_String_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out] System::Int32 size_of_data, [System::Runtime::InteropServices::Out]array< System::String^>^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
 This function provides a way to retrieve one or multiple next sample(s) for a parameter that when calibrated is a string. More...
 
static int Get_Newest_Raw_Value (PACKET_TYPE packet_type, PARAMETER_TYPE parameter_type, System::String^ identifier, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]System::UInt32 %number_samples, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]array< array< System::Byte >^>^ value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
 This function provides a way to retrieve one or multiple samples of the newest raw value for a specified parameter. A parameter can be an entire packet, a subset, or an MSID. More...
 
static int Get_Newest_Converted_Integer_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
 This function provides a way to retrieve one or multiple newest sample(s) for a parameter that when converted is an integer. More...
 
static int Get_Newest_Converted_Unsigned_Integer_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::UInt32 >^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
 This function provides a way to retrieve one or multiple newest sample(s) for a parameter that when converted is an unsigned integer. More...
 
static int Get_Newest_Converted_Double_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Double >^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
 This function provides a way to retrieve one or multiple newest sample(s) for a parameter that when converted is an unsigned integer. More...
 
static int Get_Newest_Converted_String_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out] System::Int32 size_of_data, [System::Runtime::InteropServices::Out]array< System::String^>^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
 This function provides a way to retrieve one or multiple newest sample(s) for a parameter that when converted is a string. More...
 
static int Get_Newest_Converted_Time_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< Trek_Time >^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
 This function provides a way to retrieve one or multiple newest sample(s) for a parameter that when converted is a time. More...
 
static int Get_Newest_Calibrated_Double_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Double >^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
 This function provides a way to retrieve one or multiple newest sample(s) for a parameter that when calibrated is a floating point. More...
 
static int Get_Newest_Calibrated_String_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out] System::Int32 size_of_data, [System::Runtime::InteropServices::Out]array< System::String^>^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
 This function provides a way to retrieve one or multiple newest sample(s) for a parameter that when calibrated is a string. More...
 
static int Get_Same_Packet_Raw_Value (PACKET_TYPE packet_type, PARAMETER_TYPE parameter_type, System::String^ identifier, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]System::UInt32 %number_samples, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ from_this_pkt_token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]array< array< System::Byte >^>^ value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
 This function provides a way to retrieve one or multiple samples of a parameter as raw (unprocessed) data from the same packet as another parameter. A parameter can be an entire packet, a subset, or an MSID. More...
 
static int Get_Same_Packet_Converted_Integer_Value (PACKET_TYPE packet_type, System::String^ msid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ from_this_pkt_token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
 This function provides a way to retrieve one or multiple samples of a parameter from the same packet as another parameter when the desired parameter is converted as an integer. More...
 
static int Get_Same_Packet_Converted_Unsigned_Integer_Value (PACKET_TYPE packet_type, System::String^ msid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ from_this_pkt_token, [System::Runtime::InteropServices::Out]array< System::UInt32 >^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
 This function provides a way to retrieve one or multiple samples of a parameter from the same packet as another parameter when the desired parameter is converted as an unsigned integer. More...
 
static int Get_Same_Packet_Converted_Double_Value (PACKET_TYPE packet_type, System::String^ msid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ from_this_pkt_token, [System::Runtime::InteropServices::Out]array< System::Double >^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
 This function provides a way to retrieve one or multiple samples of a parameter from the same packet as another parameter when the desired parameter is converted as a double. More...
 
static int Get_Same_Packet_Converted_String_Value (PACKET_TYPE packet_type, System::String^ msid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ from_this_pkt_token, [System::Runtime::InteropServices::Out] System::Int32 size_of_data, [System::Runtime::InteropServices::Out]array< System::String^>^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
 This function provides a way to retrieve one or multiple samples of a parameter from the same packet as another parameter when the desired parameter is converted as a character string. More...
 
static int Get_Same_Packet_Converted_Time_Value (PACKET_TYPE packet_type, System::String^ msid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ from_this_pkt_token, [System::Runtime::InteropServices::Out]array< Trek_Time >^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
 This function provides a way to retrieve one or multiple samples of a parameter from the same packet as another parameter when the desired parameter is converted as a time value. The time value is returned via a TReK_Time structure. The definition of the TReK_Time structure is located in the trek.h file. The TReK_Time structure contains a variable that is a tm_time structure. The tm_time structure is defined in the C Run-time library. More...
 
static int Get_Same_Packet_Calibrated_Double_Value (PACKET_TYPE packet_type, System::String^ msid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ from_this_pkt_token, [System::Runtime::InteropServices::Out]array< System::Double >^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
 This function provides a way to retrieve one or multiple samples of a parameter from the same packet as another parameter when the desired parameter is calibrated as a double. More...
 
static int Get_Same_Packet_Calibrated_String_Value (PACKET_TYPE packet_type, System::String^ msid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ from_this_pkt_token, [System::Runtime::InteropServices::Out] System::Int32 size_of_data, [System::Runtime::InteropServices::Out]array< System::String^>^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
 This function provides a way to retrieve one or multiple samples of a parameter from the same packet as another parameter when the desired parameter is calibrated as a character string. More...
 
static int Get_API_Return_Code_As_String ([System::Runtime::InteropServices::Out]System::Int32 api_code, [System::Runtime::InteropServices::Out]System::Int32 size_of_data, [System::Runtime::InteropServices::Out]System::String^ %message)
 This function provides a way to retrieve a string value that corresponds to an API integer value return code. More...
 
static int Get_Parameter_Information (PACKET_TYPE packet_type, System::String^ msid, DATA_MODE data_mode, System::String^ processing_flag, [System::Runtime::InteropServices::Out]measurement_properties %meas_prop)
 This function provides a way to retrieve parameter information about a MSID. More...
 
static int Get_Packet_Arrival_Event_Name (PACKET_TYPE packet_type, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]System::String^ %event_name)
 This function gets the event name associated with packet arrival. This string can be used with the WaitForPacketArrival() function. When a packet arrives the WaitForPacketArrival() function releases and you can get new data from the packet. More...
 
static int Get_Newest_Datazone (PACKET_TYPE packet_type, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]array< System::Byte >^ value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the newest available data zone for the specified packet. More...
 
static int Get_Next_Datazone (PACKET_TYPE packet_type, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]array< System::Byte >^ value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the next available data zone for the specified packet. More...
 
static int Wait_For_Packet_Arrival ([System::Runtime::InteropServices::Out]System::String^ %event_name, [System::Runtime::InteropServices::Out]System::UInt32 %timeout)
 This function gets the event name associated with packet arrival. This string can be used with the WaitForPacketArrival() function. When a packet arrives the WaitForPacketArrival() function releases and you can get new data from the packet. More...
 
static int Unregister_Packet_Arrival_Event (PACKET_TYPE packet_type, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]System::String^ %event_name)
 Removes the specified event name associated with packet arrival. More...
 
static int Initialize_Multiple_Parameters (PACKET_TYPE packet_type, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< multiple_add_struct >^ %add_struct, System::Int32 number_parameters)
 This function immediately returns SUCCESS. More...
 
static int Set_Monitor_Log_File (System::String^ filename)
 This function sets the filename for writing monitoring messages for archival. The filename should include the full directory path. When the file is created a timestamp is appended to the name and a ".log" extension is added after the timestamp. More...
 
static int Start_Monitor_Logging ()
 This function starts logging of monitoring messages. Only messages occurring after the function call will be written to the file. More...
 
static int Stop_Monitor_Logging ()
 This function stops logging of monitoring messages. More...
 
static int Get_One_Next_Raw_Value (PACKET_TYPE packet_type, PARAMETER_TYPE parameter_type, System::String^ identifier, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]array< System::Byte >^ value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the newest available raw (unprocessed/binary) value for the specified parameter. More...
 
static int Get_One_Next_Converted_Integer_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the next available integer value for the specified parameter. More...
 
static int Get_One_Next_Converted_Unsigned_Integer_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::UInt32 %value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the next available unsigned integer value for the specified parameter. More...
 
static int Get_One_Next_Converted_Double_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Double %value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the next available double value for the specified parameter. More...
 
static int Get_One_Next_Converted_String_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]System::String^ %value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the next available string value for the specified parameter. More...
 
static int Get_One_Next_Converted_Time_String_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]System::String^ %value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the next available time string value for the specified parameter. More...
 
static int Get_One_Next_Calibrated_String_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]System::String^ %value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the next available calibrated string (enumerator) value for the specified parameter. More...
 
static int Get_One_Next_Converted_Time_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]Trek_Time %value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the next available time string value for the specified parameter. More...
 
static int Get_One_Next_Calibrated_Double_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Double %value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the next available calibrated double value for the specified parameter. More...
 
static int Get_One_Newest_Raw_Value (PACKET_TYPE packet_type, PARAMETER_TYPE parameter_type, System::String^ identifier, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]array< System::Byte >^ value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the raw value for the specified parameter from the same packet as another parameter. More...
 
static int Get_One_Newest_Converted_Integer_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the integer value for the specified parameter from the same packet as another parameter. More...
 
static int Get_One_Newest_Converted_Unsigned_Integer_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::UInt32 %value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the integer value for the specified parameter from the same packet as another parameter. More...
 
static int Get_One_Newest_Converted_Double_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Double %value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the integer value for the specified parameter from the same packet as another parameter. More...
 
static int Get_One_Newest_Converted_String_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]System::String^ %value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the integer value for the specified parameter from the same packet as another parameter. More...
 
static int Get_One_Newest_Converted_Time_String_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]System::String^ %value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the newest available time string value for the specified parameter. More...
 
static int Get_One_Newest_Converted_Time_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]Trek_Time %value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the newest available time string value for the specified parameter. More...
 
static int Get_One_Newest_Calibrated_String_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]System::String^ %value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the newest available calibrated string (enumerator) value for the specified parameter. More...
 
static int Get_One_Newest_Calibrated_Double_Value (PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Double %value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the newest available calibrated string (enumerator) value for the specified parameter. More...
 
static int Get_One_Same_Packet_Raw_Value (PACKET_TYPE packet_type, PARAMETER_TYPE parameter_type, System::String^ identifier, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ from_this_pkt_token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]array< System::Byte >^ value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the raw value for the specified parameter from the same packet as another parameter. More...
 
static int Get_One_Same_Packet_Converted_Integer_Value (PACKET_TYPE packet_type, System::String^ msid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ from_this_pkt_token, [System::Runtime::InteropServices::Out]System::Int32 %value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the integer value for the specified parameter from the same packet as another parameter. More...
 
static int Get_One_Same_Packet_Converted_Unsigned_Integer_Value (PACKET_TYPE packet_type, System::String^ msid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ from_this_pkt_token, [System::Runtime::InteropServices::Out]System::UInt32 %value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the unsigned integer value for the specified parameter from the same packet as another parameter. More...
 
static int Get_One_Same_Packet_Converted_Double_Value (PACKET_TYPE packet_type, System::String^ msid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ from_this_pkt_token, [System::Runtime::InteropServices::Out]System::Double %value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the double value for the specified parameter from the same packet as another parameter. More...
 
static int Get_One_Same_Packet_Converted_String_Value (PACKET_TYPE packet_type, System::String^ msid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ from_this_pkt_token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]System::String^ %value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the string value for the specified parameter from the same packet as another parameter. More...
 
static int Get_One_Same_Packet_Converted_Time_String_Value (PACKET_TYPE packet_type, System::String^ msid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ from_this_pkt_token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]System::String^ %value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the time value for the specified parameter from the same packet as another parameter. More...
 
static int Get_One_Same_Packet_Converted_Time_Value (PACKET_TYPE packet_type, System::String^ msid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ from_this_pkt_token, [System::Runtime::InteropServices::Out]Trek_Time %value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the newest available time value for the specified parameter. More...
 
static int Get_One_Same_Packet_Calibrated_String_Value (PACKET_TYPE packet_type, System::String^ msid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ from_this_pkt_token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]System::String^ %value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the newest available calibrated string (enumerator) value for the specified parameter. More...
 
static int Get_One_Same_Packet_Calibrated_Double_Value (PACKET_TYPE packet_type, System::String^ msid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ from_this_pkt_token, [System::Runtime::InteropServices::Out]System::Double %value, [System::Runtime::InteropServices::Out]System::String^ %status)
 Gets the newest available calibrated double value for the specified parameter. More...
 

Detailed Description

‍****************************************************************

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

Member Function Documentation

◆ Get_API_Return_Code_As_String()

int trek::trek_user_api::Get_API_Return_Code_As_String ( [System::Runtime::InteropServices::Out] System::Int32  api_code,
[System::Runtime::InteropServices::Out] System::Int32  size_of_data,
[System::Runtime::InteropServices::Out] System::String^ %  message 
)
static

This function provides a way to retrieve a string value that corresponds to an API integer value return code.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]api_codeThe API integer value return code.
[in]size_of_dataThis parameter is an Input parameter. This field should indicate how much space you have allocated for a single sample of the data that is being returned (the largest sample). The value parameter can be used to return one or more samples of data. The size_of_data parameter indicates how much space is available to hold one of the samples in the value parameter. If the data being returned for a single sample is larger than the amount of space available for a single sample, as indicated by the size_of_data parameter, then you have not allocated enough space. In this case the API will output an error and will not fill in the value parameter. WARNING: If you tell the API that you have allocated enough space but you really have not, the API will believe you and will fill in the value parameter. Therefore, if there is not enough space, the API will undoubtedly overwrite some important memory and this will eventually lead to a crash. Therefore, you need to make sure that you allocate exactly what you say you are allocating.
[out]messageOn SUCCESS this parameter will contain the message string.
Returns
SUCCESS
API_NOT_ENOUGH_SPACE (Release 3 return code)

Example:

"C#"
int return_code = 0;
int return_code_str = 0;
int[] token = new int[3];
int value;
int size_of_data = 1000;
string status = "//"; // status string is always 6 bytes
string message;
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_One_Newest_Converted_Integer_Value(PACKET_TYPE.Pdss_Payload, "MSID016", "7", DATA_MODE.Real_Time, SENSING.No_Sense, token, out value, out status);
//return code value
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
return_code_str = trek_user_api.Get_API_Return_Code_As_String(return_code, size_of_data, out message);
Console.WriteLine("String Value is {0}.\nThis means: {1}", return_code_str, message);
}
//return code error value
else
{
return_code_str = trek_user_api.Get_API_Return_Code_As_String(return_code, size_of_data, out message);
Console.WriteLine("String Value is {0}.\nThis error means: {1}", return_code_str, message);
}
Console.ReadKey();
â€****************************************************************
Definition: trek_user_api_dotnet.h:735
static int Get_API_Return_Code_As_String([System::Runtime::InteropServices::Out]System::Int32 api_code, [System::Runtime::InteropServices::Out]System::Int32 size_of_data, [System::Runtime::InteropServices::Out]System::String^ %message)
This function provides a way to retrieve a string value that corresponds to an API integer value retu...
Definition: trek_user_api_dotnet.cpp:4862
static int Get_One_Newest_Converted_Integer_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the integer value for the specified parameter from the same packet as another parameter.
Definition: trek_user_api_dotnet.cpp:9418
TREK_USER_API_RETURN_CODES
Definition: trek_user_api_dotnet.h:1680

Longer examples that include this method:
None

◆ Get_Newest_Calibrated_Double_Value()

int trek::trek_user_api::Get_Newest_Calibrated_Double_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] System::UInt32 %  number_samples,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< System::Double >^ %  value,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  status 
)
static

This function provides a way to retrieve one or multiple newest sample(s) for a parameter that when calibrated is a floating point.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]number_samplesThe number of samples that should be returned. On Input this parameter should indicate how many samples are requested. On Output the API will update this parameter to indicate how many samples were actually returned.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
String msid = new String("MSID106".ToCharArray());
String apid = new String("7".ToCharArray());
UInt32 number_samples = 10;
uint ii;
double [] value = new double [number_samples];
string[] status = new string[number_samples];
int return_code;
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_Newest_Calibrated_Double_Value(PACKET_TYPE.Pdss_Payload,msid, apid, DATA_MODE.Real_Time, out number_samples, SENSING.No_Sense, token, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS || return_code == (int)TREK_USER_API_RETURN_CODES.api_TOO_MANY_SAMPLES)
{
// Data is good. If API_TOO_MANY_SAMPLES is returned, you have not
// allocated enough space for all the data that is available.
for (ii = 0; ii < number_samples; ii++)
Console.WriteLine("Success getting information. Value is {1}. Status is {2}.\n", ii, value[ii], status[ii]);
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_Newest_Calibrated_Double_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Double >^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
This function provides a way to retrieve one or multiple newest sample(s) for a parameter that when c...
Definition: trek_user_api_dotnet.cpp:2893

Longer examples that include this method:
None

◆ Get_Newest_Calibrated_String_Value()

int trek::trek_user_api::Get_Newest_Calibrated_String_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] System::UInt32 %  number_samples,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] System::Int32  size_of_data,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  value,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  status 
)
static

This function provides a way to retrieve one or multiple newest sample(s) for a parameter that when calibrated is a string.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]number_samplesThe number of samples that should be returned. On Input this parameter should indicate how many samples are requested. On Output the API will update this parameter to indicate how many samples were actually returned.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in,out]size_of_dataThis field should indicate how much space you have allocated for a single sample of the data that is being returned (the largest sample). The value parameter can be used to return one or more samples of data. The size_of_data parameter indicates how much space is available to hold one of the samples in the value parameter. If the data being returned for a single sample is larger than the amount of space available for a single sample, as indicated by the size_of_data parameter, then you have not allocated enough space. In this case the API will output an error and will not fill in the value parameter. If the return code is TLM_API_LENGTH_ERR, then this value will be reset to the amount of space required to hold the sample. WARNING: If you tell the API that you have allocated enough space but you really have not, the API will believe you and will fill in the value parameter. Therefore, if there is not enough space, the API will undoubtedly overwrite some important memory and this will eventually lead to a crash. Therefore, you need to make sure that you allocate exactly what you say you are allocating.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
String msid = new String("MSID079".ToCharArray());
String apid = new String("7".ToCharArray());
UInt32 number_samples = 10;
int size_of_data = 100;
uint ii;
string [] value = new string [number_samples];
string[] status = new string[number_samples];
int return_code;
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_Newest_Calibrated_String_Value(PACKET_TYPE.Pdss_Payload,msid, apid, DATA_MODE.Real_Time, out number_samples, SENSING.No_Sense, token, size_of_data, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS || return_code == (int)TREK_USER_API_RETURN_CODES.api_TOO_MANY_SAMPLES)
{
// Data is good. If API_TOO_MANY_SAMPLES is returned, you have not
// allocated enough space for all the data that is available.
for (ii = 0; ii < number_samples; ii++)
Console.WriteLine("Success getting information. Value is {1}. Status is {2}.\n", ii, value[ii], status[ii]);
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_Newest_Calibrated_String_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out] System::Int32 size_of_data, [System::Runtime::InteropServices::Out]array< System::String^>^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
This function provides a way to retrieve one or multiple newest sample(s) for a parameter that when c...
Definition: trek_user_api_dotnet.cpp:3081

Longer examples that include this method:
None

◆ Get_Newest_Converted_Double_Value()

int trek::trek_user_api::Get_Newest_Converted_Double_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] System::UInt32 %  number_samples,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< System::Double >^ %  value,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  status 
)
static

This function provides a way to retrieve one or multiple newest sample(s) for a parameter that when converted is an unsigned integer.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]number_samplesThe number of samples that should be returned. On Input this parameter should indicate how many samples are requested. On Output the API will update this parameter to indicate how many samples were actually returned.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
String msid = new String("MSID107".ToCharArray());
String apid = new String("7".ToCharArray());
UInt32 number_samples = 10;
uint ii;
double[] value = new double[number_samples];
string[] status = new string[number_samples];
int return_code;
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_Newest_Converted_Double_Value(PACKET_TYPE.Pdss_Payload, msid, apid, DATA_MODE.Real_Time, out number_samples,SENSING.No_Sense, token, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS || return_code == (int)TREK_USER_API_RETURN_CODES.api_TOO_MANY_SAMPLES)
{
// Data is good. If API_TOO_MANY_SAMPLES is returned, you have not
// allocated enough space for all the data that is available.
for (ii = 0; ii < number_samples; ii++)
Console.WriteLine("Success getting information. Value is {1}. Status is {2}.\n", ii, value[ii], status[ii]);
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_Newest_Converted_Double_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Double >^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
This function provides a way to retrieve one or multiple newest sample(s) for a parameter that when c...
Definition: trek_user_api_dotnet.cpp:2337

Longer examples that include this method:
None

◆ Get_Newest_Converted_Integer_Value()

int trek::trek_user_api::Get_Newest_Converted_Integer_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] System::UInt32 %  number_samples,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< System::Int32 >^ %  value,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  status 
)
static

This function provides a way to retrieve one or multiple newest sample(s) for a parameter that when converted is an integer.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]number_samplesThe number of samples that should be returned. On Input this parameter should indicate how many samples are requested. On Output the API will update this parameter to indicate how many samples were actually returned.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
String msid = new String("MSID107".ToCharArray());
String apid = new String("7".ToCharArray());
UInt32 number_samples = 3;
int [] value = new int [number_samples];
string[] status = new string[number_samples];
int return_code = -1;
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_Newest_Converted_Integer_Value(PACKET_TYPE.Pdss_Payload,msid, apid, DATA_MODE.Real_Time, out number_samples, SENSING.No_Sense, token, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success getting information");
Console.ReadKey();
}
else if (return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success getting information. More Data Available");
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_Newest_Converted_Integer_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
This function provides a way to retrieve one or multiple newest sample(s) for a parameter that when c...
Definition: trek_user_api_dotnet.cpp:1985

Longer examples that include this method:
None

◆ Get_Newest_Converted_String_Value()

int trek::trek_user_api::Get_Newest_Converted_String_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] System::UInt32 %  number_samples,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] System::Int32  size_of_data,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  value,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  status 
)
static

This function provides a way to retrieve one or multiple newest sample(s) for a parameter that when converted is a string.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]number_samplesThe number of samples that should be returned. On Input this parameter should indicate how many samples are requested. On Output the API will update this parameter to indicate how many samples were actually returned.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in,out]size_of_dataThis field should indicate how much space you have allocated for a single sample of the data that is being returned (the largest sample). The value parameter can be used to return one or more samples of data. The size_of_data parameter indicates how much space is available to hold one of the samples in the value parameter. If the data being returned for a single sample is larger than the amount of space available for a single sample, as indicated by the size_of_data parameter, then you have not allocated enough space. In this case the API will output an error and will not fill in the value parameter. If the return code is TLM_API_LENGTH_ERR, then this value will be reset to the amount of space required to hold the sample. WARNING: If you tell the API that you have allocated enough space but you really have not, the API will believe you and will fill in the value parameter. Therefore, if there is not enough space, the API will undoubtedly overwrite some important memory and this will eventually lead to a crash. Therefore, you need to make sure that you allocate exactly what you say you are allocating.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
String msid = new String("MSID127".ToCharArray());
String apid = new String("7".ToCharArray());
UInt32 number_samples = 10;
uint ii;
int size_of_data = 100;
string [] value = new string [number_samples];
string[] status = new string[number_samples];
int return_code;
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_Newest_Converted_String_Value(PACKET_TYPE.Pdss_Payload,msid, apid, DATA_MODE.Real_Time, out number_samples, token, size_of_data, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS || return_code == (int)TREK_USER_API_RETURN_CODES.api_TOO_MANY_SAMPLES)
{
// Data is good. If API_TOO_MANY_SAMPLES is returned, you have not
// allocated enough space for all the data that is available.
for (ii = 0; ii < number_samples; ii++)
Console.WriteLine("Success getting information. Value is {1}. Status is {2}.\n", ii, value[ii], status[ii]);
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_Newest_Converted_String_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out] System::Int32 size_of_data, [System::Runtime::InteropServices::Out]array< System::String^>^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
This function provides a way to retrieve one or multiple newest sample(s) for a parameter that when c...
Definition: trek_user_api_dotnet.cpp:2523

Longer examples that include this method:
None

◆ Get_Newest_Converted_Time_Value()

int trek::trek_user_api::Get_Newest_Converted_Time_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] System::UInt32 %  number_samples,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< Trek_Time >^ %  value,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  status 
)
static

This function provides a way to retrieve one or multiple newest sample(s) for a parameter that when converted is a time.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]number_samplesThe number of samples that should be returned. On Input this parameter should indicate how many samples are requested. On Output the API will update this parameter to indicate how many samples were actually returned.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
String msid = new String("MSID128".ToCharArray());
String apid = new String("7".ToCharArray());
int return_code = 0;
int size_of_data = 100;
uint number_samples = 10;
Trek_Time[] value = new Trek_Time[10];
string[] status = new string[10];
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_Newest_Converted_Time_Value(PACKET_TYPE.Pdss_Payload, msid, apid, DATA_MODE.Real_Time, out number_samples, token, size_of_data, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS || return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
for (int ii = 0; ii < number_samples; ii++)
Console.WriteLine("Value: {0}. Status: {1}\n", value[ii].day_of_month, status[ii]);
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_Newest_Converted_Time_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< Trek_Time >^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
This function provides a way to retrieve one or multiple newest sample(s) for a parameter that when c...
Definition: trek_user_api_dotnet.cpp:2695

Longer examples that include this method:
None

◆ Get_Newest_Converted_Unsigned_Integer_Value()

int trek::trek_user_api::Get_Newest_Converted_Unsigned_Integer_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] System::UInt32 %  number_samples,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< System::UInt32 >^ %  value,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  status 
)
static

This function provides a way to retrieve one or multiple newest sample(s) for a parameter that when converted is an unsigned integer.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]number_samplesThe number of samples that should be returned. On Input this parameter should indicate how many samples are requested. On Output the API will update this parameter to indicate how many samples were actually returned.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
String msid = new String("MSID107".ToCharArray());
String apid = new String("7".ToCharArray());
UInt32 number_samples = 10;
uint ii;
uint [] value = new uint[number_samples];
string[] status = new string[number_samples];
int return_code;
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_Newest_Converted_Unsigned_Integer_Value(PACKET_TYPE.Pdss_Payload, msid, apid, DATA_MODE.Real_Time, out number_samples,SENSING.No_Sense, token, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS || return_code == (int)TREK_USER_API_RETURN_CODES.api_TOO_MANY_SAMPLES)
{
// Data is good. If API_TOO_MANY_SAMPLES is returned, you have not
// allocated enough space for all the data that is available.
for (ii = 0; ii < number_samples; ii++)
Console.WriteLine("Success getting information. Value is {1}. Status is {2}.\n", ii, value[ii], status[ii]);
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_Newest_Converted_Unsigned_Integer_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::UInt32 >^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
This function provides a way to retrieve one or multiple newest sample(s) for a parameter that when c...
Definition: trek_user_api_dotnet.cpp:2161

Longer examples that include this method:
None

◆ Get_Newest_Datazone()

int trek::trek_user_api::Get_Newest_Datazone ( PACKET_TYPE  packet_type,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] System::Int32 %  size_of_data,
[System::Runtime::InteropServices::Out] array< System::Byte >^  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the newest available data zone for the specified packet.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in,out]size_of_dataOn Input, this field should indicate how much space you have allocated for a single sample of the data that is being returned. The value parameter can be used to return one or more samples of data. The size_of_data parameter indicates how much space is available to hold one of the samples in the value parameter. If the data being returned for a single sample is larger than the amount of space available for a single sample, as indicated by the size_of_data parameter, than you have not allocated enough space. In this case the API will output an error and will not fill in the value parameter. WARNING: If you tell the API that you have allocated enough space but you really have not, the API will believe you and will fill in the value parameter. Therefore, if there is not enough space, the API will undoubtedly overwrite some important memory and this will eventually lead to a crash. Therefore, you need to make sure that you allocate exactly what you say you are allocating. On Output, the API will update the size_of_data parameter to indicate the size of the data returned in the value parameter.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_NOT_ENOUGH_SPACE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

String apid = new String("7".ToCharArray());
int return_code=0;
int size_of_data = 10000;
byte [] value = new byte [size_of_data];
string status = "0";
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_Newest_Datazone(PACKET_TYPE.Pdss_Payload, apid, DATA_MODE.Real_Time, token, out size_of_data, value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS || return_code == (int)TREK_USER_API_RETURN_CODES.api_TOO_MANY_SAMPLES)
{
Console.WriteLine("Success: Size of data returned is {0}. Value is {1}. Status is {2}.\n", size_of_data, value, status);
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_Newest_Datazone(PACKET_TYPE packet_type, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]array< System::Byte >^ value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the newest available data zone for the specified packet.
Definition: trek_user_api_dotnet.cpp:5173

Longer examples that include this method:
None

◆ Get_Newest_Raw_Value()

int trek::trek_user_api::Get_Newest_Raw_Value ( PACKET_TYPE  packet_type,
PARAMETER_TYPE  parameter_type,
System::String^  identifier,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] System::UInt32 %  number_samples,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] System::Int32 %  size_of_data,
[System::Runtime::InteropServices::Out] array< array< System::Byte >^>^  value,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  status 
)
static

This function provides a way to retrieve one or multiple samples of the newest raw value for a specified parameter. A parameter can be an entire packet, a subset, or an MSID.

Note
This is a TReK Release 3 ANSI-C compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]parameter_typeOn a TReK System, any data aggregate is considered a parameter. Therefore packets, subsets, and MSIDs are all considered parameters. The parameter type argument identifies what type of parameter is being retrieved. The parameter_type information passed in should be one of the following values: CCSDS_PACKET, EHS_PACKET, SUBSET, or MSID. Please note that when you request to retrieve a CCSDS_PACKET, the API will return a complete CCSDS packet. This does not include the EHS header. You must pass in a parameter type of EHS_PACKET to retrieve the EHS header information.
[in]identifierThe identifier for the parameter. The identifier is based on the parameter_type and should be one of the following:
Parameter Type

Identifier Should Be A(n)

EHS_PACKET

APID

MSID

MSID (Parameter)

CCSDS_PACKET

APID

EXPRESS

Source Function Code

UFO User Assigned ID
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]number_samplesThe number of samples that should be returned. On Input this parameter should indicate how many samples are requested. On Output the API will update this parameter to indicate how many samples were actually returned.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in,out]size_of_dataThis field should indicate how much space you have allocated for a single sample of the data that is being returned (the largest sample). The value parameter can be used to return one or more samples of data. The size_of_data parameter indicates how much space is available to hold one of the samples in the value parameter. If the data being returned for a single sample is larger than the amount of space available for a single sample, as indicated by the size_of_data parameter, then you have not allocated enough space. In this case the API will output an error and will not fill in the value parameter. If the return code is TLM_API_LENGTH_ERR, then this value will be reset to the amount of space required to hold the sample. WARNING: If you tell the API that you have allocated enough space but you really have not, the API will believe you and will fill in the value parameter. Therefore, if there is not enough space, the API will undoubtedly overwrite some important memory and this will eventually lead to a crash. Therefore, you need to make sure that you allocate exactly what you say you are allocating.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_NOT_ENOUGH_SPACE (Release 3 return code)
API_TOO_MANY_SAMPLES (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

string msid = new string("MSID044".ToCharArray());
string apid = new string("7".ToCharArray());
uint number_samples = 3;
string[] status = new string[number_samples];
int return_code = -1;
int[] token = new int[3];
byte[][] value=new byte[3][];
int size_of_data =10;
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
for( int i = 0; i < number_samples; i++)
{
value[i] = new byte[size_of_data];
}
return_code = trek_user_api.Get_Newest_Raw_Value(PACKET_TYPE.Pdss_Payload, PARAMETER_TYPE.Msid,
msid, apid, DATA_MODE.Real_Time,
out number_samples, token,
out size_of_data, value,out status);
//Check return to see id command sent successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success getting information");
}
else if (return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success getting information. More Data Available");
}
else if (return_code == (int)TREK_USER_API_RETURN_CODES.api_TOO_MANY_SAMPLES)
{
Console.WriteLine("Success getting information. Too many samples (Use number_samples to find out how many are valid)");
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_Newest_Raw_Value(PACKET_TYPE packet_type, PARAMETER_TYPE parameter_type, System::String^ identifier, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]System::UInt32 %number_samples, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]array< array< System::Byte >^>^ value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
This function provides a way to retrieve one or multiple samples of the newest raw value for a specif...
Definition: trek_user_api_dotnet.cpp:1789

◆ Get_Next_Calibrated_Double_Value()

int trek::trek_user_api::Get_Next_Calibrated_Double_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] System::UInt32 %  number_samples,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< System::Double >^ %  value,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  status 
)
static

This function provides a way to retrieve one or multiple next sample(s) for a parameter that when calibrated is a floating point.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]number_samplesThe number of samples that should be returned. On Input this parameter should indicate how many samples are requested. On Output the API will update this parameter to indicate how many samples were actually returned.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_TOO_MANY_SAMPLES (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
String msid = new String("MSID106".ToCharArray());
String apid = new String("7".ToCharArray());
UInt32 number_samples = 10;
double [] value = new double[number_samples];
string [] status = new string [number_samples]; ;
int return_code = -1;
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_Next_Calibrated_Double_Value(PACKET_TYPE.Pdss_Payload, msid, apid, DATA_MODE.Real_Time, out number_samples, SENSING.No_Sense, token, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success getting information");
Console.ReadKey();
}
else if (return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success getting information. More Data Available");
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_Next_Calibrated_Double_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Double >^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
This function provides a way to retrieve one or multiple next sample(s) for a parameter that when cal...
Definition: trek_user_api_dotnet.cpp:1357

Longer examples that include this method:
None

◆ Get_Next_Calibrated_String_Value()

int trek::trek_user_api::Get_Next_Calibrated_String_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] System::UInt32 %  number_samples,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] System::Int32  size_of_data,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  value,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  status 
)
static

This function provides a way to retrieve one or multiple next sample(s) for a parameter that when calibrated is a string.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]number_samplesThe number of samples that should be returned. On Input this parameter should indicate how many samples are requested. On Output the API will update this parameter to indicate how many samples were actually returned.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in,out]size_of_dataThis field should indicate how much space you have allocated for a single sample of the data that is being returned (the largest sample). The value parameter can be used to return one or more samples of data. The size_of_data parameter indicates how much space is available to hold one of the samples in the value parameter. If the data being returned for a single sample is larger than the amount of space available for a single sample, as indicated by the size_of_data parameter, then you have not allocated enough space. In this case the API will output an error and will not fill in the value parameter. If the return code is TLM_API_LENGTH_ERR, then this value will be reset to the amount of space required to hold the sample. WARNING: If you tell the API that you have allocated enough space but you really have not, the API will believe you and will fill in the value parameter. Therefore, if there is not enough space, the API will undoubtedly overwrite some important memory and this will eventually lead to a crash. Therefore, you need to make sure that you allocate exactly what you say you are allocating.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
String msid = new String("MSID079".ToCharArray());
String apid = new String("7".ToCharArray());
UInt32 number_samples = 10;
int size_of_data = 100;
string [] value = new string[number_samples];
string [] status = new string [number_samples]; ;
int return_code = -1;
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_Next_Calibrated_String_Value(PACKET_TYPE.Pdss_Payload, msid, apid, DATA_MODE.Real_Time, out number_samples, SENSING.No_Sense, token, size_of_data, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success getting information");
Console.ReadKey();
}
else if (return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success getting information. More Data Available");
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_Next_Calibrated_String_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out] System::Int32 size_of_data, [System::Runtime::InteropServices::Out]array< System::String^>^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
This function provides a way to retrieve one or multiple next sample(s) for a parameter that when cal...
Definition: trek_user_api_dotnet.cpp:1548

Longer examples that include this method:
None

◆ Get_Next_Converted_Double_Value()

int trek::trek_user_api::Get_Next_Converted_Double_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] System::UInt32 %  number_samples,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< System::Double >^ %  value,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  status 
)
static

This function provides a way to retrieve one or multiple next sample(s) for a parameter that when converted is an unsigned integer.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]number_samplesThe number of samples that should be returned. On Input this parameter should indicate how many samples are requested. On Output the API will update this parameter to indicate how many samples were actually returned.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
// Don't forget to include the following file
using trek;
// Don't forget to add the following reference file
trek_telemetry_dotnet_api
String msid = new String("MSID038".ToCharArray());
String apid = new String("7".ToCharArray());
UInt32 number_samples = 10;
String[] status = new String[number_samples];
int return_code = -1;
int[] token = new int[3];
Double [] val = new Double[number_samples];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_Next_Converted_Double_Value(PACKET_TYPE.Pdss_Payload, msid, apid, DATA_MODE.Real_Time, out number_samples, SENSING.No_Sense, token, out val, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success getting information");
Console.ReadKey();
}
else if (return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success getting information. More Data Available");
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_Next_Converted_Double_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Double >^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
This function provides a way to retrieve one or multiple next sample(s) for a parameter that when con...
Definition: trek_user_api_dotnet.cpp:789

Longer examples that include this method:
None

◆ Get_Next_Converted_Integer_Value()

int trek::trek_user_api::Get_Next_Converted_Integer_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] System::UInt32 %  number_samples,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< System::Int32 >^ %  value,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  status 
)
static

This function provides a way to retrieve one or multiple next sample(s) for a parameter that when converted is an unsigned integer.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]number_samplesThe number of samples that should be returned. On Input this parameter should indicate how many samples are requested. On Output the API will update this parameter to indicate how many samples were actually returned.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
// Don't forget to include the following file
using trek;
// Don't forget to add the following reference file
trek_telemetry_dotnet_api
String msid = new String("MSID038".ToCharArray());
String apid = new String("7".ToCharArray());
UInt32 number_samples = 10;
String[] status = new String[number_samples];
int return_code = -1;
int[] token = new int[3];
Int32[] val = new Int32[number_samples];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_Next_Converted_Integer_Value(PACKET_TYPE.Pdss_Payload, msid, apid, DATA_MODE.Real_Time, out number_samples, SENSING.No_Sense, token, out val, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success getting information");
Console.ReadKey();
}
else if (return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success getting information. More Data Available");
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_Next_Converted_Integer_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
This function provides a way to retrieve one or multiple next sample(s) for a parameter that when con...
Definition: trek_user_api_dotnet.cpp:421

Longer examples that include this method:
None

◆ Get_Next_Converted_String_Value()

int trek::trek_user_api::Get_Next_Converted_String_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] System::UInt32 %  number_samples,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] System::Int32  size_of_data,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  value,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  status 
)
static

This function provides a way to retrieve one or multiple next sample(s) for a parameter that when converted is a string.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]number_samplesThe number of samples that should be returned. On Input this parameter should indicate how many samples are requested. On Output the API will update this parameter to indicate how many samples were actually returned.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in,out]size_of_dataThis field should indicate how much space you have allocated for a single sample of the data that is being returned (the largest sample). The value parameter can be used to return one or more samples of data. The size_of_data parameter indicates how much space is available to hold one of the samples in the value parameter. If the data being returned for a single sample is larger than the amount of space available for a single sample, as indicated by the size_of_data parameter, then you have not allocated enough space. In this case the API will output an error and will not fill in the value parameter. If the return code is TLM_API_LENGTH_ERR, then this value will be reset to the amount of space required to hold the sample. WARNING: If you tell the API that you have allocated enough space but you really have not, the API will believe you and will fill in the value parameter. Therefore, if there is not enough space, the API will undoubtedly overwrite some important memory and this will eventually lead to a crash. Therefore, you need to make sure that you allocate exactly what you say you are allocating.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
String msid = new String("MSID127".ToCharArray());
String apid = new String("7".ToCharArray());
UInt32 number_samples = 10;
int size_of_data = 100;
String[] status = new String[number_samples];
int return_code = -1;
int[] token = new int[3];
String[] val = new String[number_samples];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_Next_Converted_String_Value(PACKET_TYPE.Pdss_Payload, msid, apid, DATA_MODE.Real_Time, out number_samples, token, size_of_data, out val, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success getting information");
Console.ReadKey();
}
else if (return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success getting information. More Data Available");
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_Next_Converted_String_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out] System::Int32 size_of_data, [System::Runtime::InteropServices::Out]array< System::String^>^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
This function provides a way to retrieve one or multiple next sample(s) for a parameter that when con...
Definition: trek_user_api_dotnet.cpp:980

Longer examples that include this method:
None

◆ Get_Next_Converted_Time_Value()

int trek::trek_user_api::Get_Next_Converted_Time_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] System::UInt32 %  number_samples,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< Trek_Time >^ %  value,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  status 
)
static

This function provides a way to retrieve one or multiple next sample(s) for a parameter that when converted is a time.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]number_samplesThe number of samples that should be returned. On Input this parameter should indicate how many samples are requested. On Output the API will update this parameter to indicate how many samples were actually returned.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
String msid = new String("MSID128".ToCharArray());
String apid = new String("7".ToCharArray());
int return_code = 0;
int size_of_data = 100;
uint number_samples = 10;
Trek_Time [] value = new Trek_Time [10];
string[] status = new string[10];
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_Next_Converted_Time_Value(PACKET_TYPE.Pdss_Payload, msid, apid, DATA_MODE.Real_Time, out number_samples, token, size_of_data, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS || return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
for (int ii = 0; ii < number_samples; ii++)
Console.WriteLine("Day: {0}. Status: {1}\n", value[ii].day_of_month, status[ii]);
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_Next_Converted_Time_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< Trek_Time >^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
This function provides a way to retrieve one or multiple next sample(s) for a parameter that when con...
Definition: trek_user_api_dotnet.cpp:1154

Longer examples that include this method:
None

◆ Get_Next_Converted_Unsigned_Integer_Value()

int trek::trek_user_api::Get_Next_Converted_Unsigned_Integer_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] System::UInt32 %  number_samples,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< System::UInt32 >^ %  value,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  status 
)
static

Provides a way to retrieve one or multiple next sample(s) for a parameter that when converted is an integer.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe packet type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]number_samplesThe number of samples that should be returned. On Input this parameter should indicate how many samples are requested. On Output the API will update this parameter to indicate how many samples were actually returned.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
// Don't forget to include the following file
using trek;
// Don't forget to add the following reference file
trek_telemetry_dotnet_api
String msid = new String("MSID038".ToCharArray());
String apid = new String("7".ToCharArray());
UInt32 number_samples = 10;
String[] status = new String[number_samples];
int return_code = -1;
int[] token = new int[3];
UInt32[] val = new UInt32[number_samples];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_Next_Converted_Unsigned_Integer_Value(PACKET_TYPE.Pdss_Payload, msid, apid, DATA_MODE.Real_Time, out number_samples, SENSING.No_Sense, token, out val, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success getting information");
Console.ReadKey();
}
else if (return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success getting information. More Data Available");
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_Next_Converted_Unsigned_Integer_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out] System::UInt32 %number_samples, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::UInt32 >^ %value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
Provides a way to retrieve one or multiple next sample(s) for a parameter that when converted is an i...
Definition: trek_user_api_dotnet.cpp:603

Longer examples that include this method:
None

◆ Get_Next_Datazone()

int trek::trek_user_api::Get_Next_Datazone ( PACKET_TYPE  packet_type,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] System::Int32 %  size_of_data,
[System::Runtime::InteropServices::Out] array< System::Byte >^  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the next available data zone for the specified packet.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in,out]size_of_dataOn Input, this field should indicate how much space you have allocated for a single sample of the data that is being returned. The value parameter can be used to return one or more samples of data. The size_of_data parameter indicates how much space is available to hold one of the samples in the value parameter. If the data being returned for a single sample is larger than the amount of space available for a single sample, as indicated by the size_of_data parameter, than you have not allocated enough space. In this case the API will output an error and will not fill in the value parameter. WARNING: If you tell the API that you have allocated enough space but you really have not, the API will believe you and will fill in the value parameter. Therefore, if there is not enough space, the API will undoubtedly overwrite some important memory and this will eventually lead to a crash. Therefore, you need to make sure that you allocate exactly what you say you are allocating. On Output, the API will update the size_of_data parameter to indicate the size of the data returned in the value parameter.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_NOT_ENOUGH_SPACE (Release 3 return code)
API_MORE_DATA_AVAILABLE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

String apid = new String("7".ToCharArray());
int return_code=0;
int size_of_data = 10000;
byte [] value = new byte [size_of_data];
string status = "0";
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_Next_Datazone(PACKET_TYPE.Pdss_Payload, apid, DATA_MODE.Real_Time, token, out size_of_data, value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS || return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success: Size of data returned is {0}. Status is {1}.\n", size_of_data, status);
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_Next_Datazone(PACKET_TYPE packet_type, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]array< System::Byte >^ value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the next available data zone for the specified packet.
Definition: trek_user_api_dotnet.cpp:5313

Longer examples that include this method:
None

◆ Get_Next_Raw_Value()

int trek::trek_user_api::Get_Next_Raw_Value ( PACKET_TYPE  packet_type,
PARAMETER_TYPE  parameter_type,
System::String^  identifier,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] System::UInt32 %  number_samples,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] System::Int32 %  size_of_data,
[System::Runtime::InteropServices::Out] array< array< System::Byte >^>^  value,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  status 
)
static

This function provides a way to retrieve one or multiple samples of the next raw value for a specified parameter. A parameter can be an entire packet, a subset, or an MSID.

Note
This is a TReK Release 3 ANSI-C compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]parameter_typeOn a TReK System, any data aggregate is considered a parameter. Therefore packets, subsets, and MSIDs are all considered parameters. The parameter type argument identifies what type of parameter is being retrieved. The parameter_type information passed in should be one of the following values: CCSDS_PACKET, EHS_PACKET, SUBSET, or MSID. Please note that when you request to retrieve a CCSDS_PACKET, the API will return a complete CCSDS packet. This does not include the EHS header. You must pass in a parameter type of EHS_PACKET to retrieve the EHS header information.
[in]identifierThe identifier for the parameter. The identifier is based on the parameter_type and should be one of the following:
Parameter Type

Identifier Should Be A(n)

EHS_PACKET

APID

MSID

MSID (Parameter)

CCSDS_PACKET

APID

EXPRESS

Source Function Code

UFO User Assigned ID
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]number_samplesThe number of samples that should be returned. On Input this parameter should indicate how many samples are requested. On Output the API will update this parameter to indicate how many samples were actually returned.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in,out]size_of_dataThis field should indicate how much space you have allocated for a single sample of the data that is being returned (the largest sample). The value parameter can be used to return one or more samples of data. The size_of_data parameter indicates how much space is available to hold one of the samples in the value parameter. If the data being returned for a single sample is larger than the amount of space available for a single sample, as indicated by the size_of_data parameter, then you have not allocated enough space. In this case the API will output an error and will not fill in the value parameter. If the return code is TLM_API_LENGTH_ERR, then this value will be reset to the amount of space required to hold the sample. WARNING: If you tell the API that you have allocated enough space but you really have not, the API will believe you and will fill in the value parameter. Therefore, if there is not enough space, the API will undoubtedly overwrite some important memory and this will eventually lead to a crash. Therefore, you need to make sure that you allocate exactly what you say you are allocating.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_NOT_ENOUGH_SPACE (Release 3 return code)
API_TOO_MANY_SAMPLES (Release 3 return code)
API_MORE_DATA_AVAILABLE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
string msid = new string("MSID039".ToCharArray());
string apid = new string("7".ToCharArray());
uint number_samples = 3;
string[] status = new string[3];
int return_code = -1;
int[] token = new int[3];
//int[] val = new int[number_samples];
byte[][] value = new byte[6][];
int size_of_data;
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
size_of_data = 10;
for (int i = 0; i < number_samples; i++)
{
value[i] = new byte[size_of_data];
}
return_code = trek_user_api.Get_Next_Raw_Value(PACKET_TYPE.Pdss_Payload, PARAMETER_TYPE.Msid, msid, apid, DATA_MODE.Real_Time, out number_samples, token, out size_of_data, value, out status);
//Check return to see id command sent successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success getting information");
}
else if (return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success getting information. More Data Available");
}
else if (return_code == (int)TREK_USER_API_RETURN_CODES.api_TOO_MANY_SAMPLES)
{
Console.WriteLine("Success getting information. Too many samples (Use number_samples to find out how many are valid)");
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_Next_Raw_Value(PACKET_TYPE packet_type, PARAMETER_TYPE parameter_type, System::String^ identifier, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]System::UInt32 %number_samples, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]array< array< System::Byte >^>^ value, [System::Runtime::InteropServices::Out]array< System::String^>^ %status)
This function provides a way to retrieve one or multiple samples of the next raw value for a specifie...
Definition: trek_user_api_dotnet.cpp:214

Longer examples that include this method:
None

◆ Get_One_Newest_Calibrated_Double_Value()

int trek::trek_user_api::Get_One_Newest_Calibrated_Double_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] System::Double %  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the newest available calibrated string (enumerator) value for the specified parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_NOT_ENOUGH_SPACE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
String msid = new String("MSID009".ToCharArray());
String apid = new String("7".ToCharArray());
int return_code = -1;
int[] token = new int[3];
string status = "//";
double value;
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_One_Newest_Calibrated_Double_Value(PACKET_TYPE.Pdss_Payload, msid, apid, DATA_MODE.Real_Time,SENSING.No_Sense, token, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success getting information. Value is: {0}. Status is {1}", value, status);
Console.ReadKey();
}
else if (return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success getting information. More Data Available");
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_One_Newest_Calibrated_Double_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Double %value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the newest available calibrated string (enumerator) value for the specified parameter.
Definition: trek_user_api_dotnet.cpp:10257

Longer examples that include this method:
None

◆ Get_One_Newest_Calibrated_String_Value()

int trek::trek_user_api::Get_One_Newest_Calibrated_String_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] System::Int32 %  size_of_data,
[System::Runtime::InteropServices::Out] System::String^ %  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the newest available calibrated string (enumerator) value for the specified parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in,out]size_of_dataOn Input, this field should indicate how much space you have allocated for the data that is being returned (i.e. how much space is available for the value parameter). If the value being returned is larger than the amount of space available, as indicated by the size_of_data parameter, then you have not allocated enough space. In this case the API will output an error and will not fill in the value parameter. WARNING: If you tell the API that you have allocated enough space but you really haven’t, the API will believe you and will fill in the value parameter. Therefore, if there isn’t enough space, the API will undoubtedly overwrite some important memory and this will eventually lead to a crash. Therefore, you need to make sure that you allocate exactly what you say you are allocating. On Output, the API will update the size_of_data parameter to indicate the size of the data returned in the value parameter. Please note that when strings are converted all of the characters are converted based on the length specified in the database. The entire length is copied into the value parameter (not just the NULL character). .
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_NOT_ENOUGH_SPACE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
String msid = new String("MSID079".ToCharArray());
String apid = new String("7".ToCharArray());
int return_code = -1;
int[] token = new int[3];
string status = "0";
string value;
int size_of_data=100;
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_One_Newest_Calibrated_String_Value(PACKET_TYPE.Pdss_Payload, msid, apid, DATA_MODE.Real_Time,SENSING.No_Sense, token, out size_of_data, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success getting information. Value is: {0}. Status is {1}\n", value, status);
Console.ReadKey();
}
else if (return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success getting information. More Data Available");
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_One_Newest_Calibrated_String_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]System::String^ %value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the newest available calibrated string (enumerator) value for the specified parameter.
Definition: trek_user_api_dotnet.cpp:10117

Longer examples that include this method:
None

◆ Get_One_Newest_Converted_Double_Value()

int trek::trek_user_api::Get_One_Newest_Converted_Double_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] System::Double %  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the integer value for the specified parameter from the same packet as another parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_MORE_DATA_AVAILABLE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
String msid = new String("MSID106".ToCharArray());
String apid = new String("7".ToCharArray());
int return_code = -1;
int[] token = new int[3];
String status = "0";
double value;
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_One_Newest_Converted_Double_Value(PACKET_TYPE.Pdss_Payload, msid, apid, DATA_MODE.Real_Time, SENSING.No_Sense, token, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success getting information {0}. Status is {1}", value, status);
Console.ReadKey();
}
else if (return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success getting information. More Data Available");
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_One_Newest_Converted_Double_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Double %value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the integer value for the specified parameter from the same packet as another parameter.
Definition: trek_user_api_dotnet.cpp:9674

Longer examples that include this method:
None

◆ Get_One_Newest_Converted_Integer_Value()

int trek::trek_user_api::Get_One_Newest_Converted_Integer_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] System::Int32 %  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the integer value for the specified parameter from the same packet as another parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_MORE_DATA_AVAILABLE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
String msid = new String("MSID016".ToCharArray());
String apid = new String("7".ToCharArray());
int return_code = -1;
int[] token = new int[3];
String status = "0";
int value;
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_One_Newest_Converted_Integer_Value(PACKET_TYPE.Pdss_Payload, msid, apid, DATA_MODE.Real_Time, SENSING.No_Sense, token, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success getting information {0}, Status is {1}", value, status);
Console.ReadKey();
}
else if (return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success getting information. More Data Available");
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();

Longer examples that include this method:
None

◆ Get_One_Newest_Converted_String_Value()

int trek::trek_user_api::Get_One_Newest_Converted_String_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] System::Int32 %  size_of_data,
[System::Runtime::InteropServices::Out] System::String^ %  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the integer value for the specified parameter from the same packet as another parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in,out]size_of_dataOn Input, this field should indicate how much space you have allocated for the data that is being returned (i.e. how much space is available for the value parameter). If the value being returned is larger than the amount of space available, as indicated by the size_of_data parameter, then you have not allocated enough space. In this case the API will output an error and will not fill in the value parameter. WARNING: If you tell the API that you have allocated enough space but you really haven’t, the API will believe you and will fill in the value parameter. Therefore, if there isn’t enough space, the API will undoubtedly overwrite some important memory and this will eventually lead to a crash. Therefore, you need to make sure that you allocate exactly what you say you are allocating. On Output, the API will update the size_of_data parameter to indicate the size of the data returned in the value parameter. Please note that when strings are converted all of the characters are converted based on the length specified in the database. The entire length is copied into the value parameter (not just the NULL character).
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_MORE_DATA_AVAILABLE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
String msid = new String("MSID001".ToCharArray());
String apid = new String("7".ToCharArray());
int return_code = -1;
int[] token = new int[3];
string status = "0";
string value;
int size_of_data=100;
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_One_Newest_Converted_String_Value(PACKET_TYPE.Pdss_Payload, msid, apid, DATA_MODE.Real_Time,token, out size_of_data, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success getting information {0}. Status is {1}", value, status);
Console.ReadKey();
}
else if (return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success getting information. More Data Available");
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_One_Newest_Converted_String_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]System::String^ %value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the integer value for the specified parameter from the same packet as another parameter.
Definition: trek_user_api_dotnet.cpp:9813

Longer examples that include this method:
None

◆ Get_One_Newest_Converted_Time_String_Value()

int trek::trek_user_api::Get_One_Newest_Converted_Time_String_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] System::Int32 %  size_of_data,
[System::Runtime::InteropServices::Out] System::String^ %  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the newest available time string value for the specified parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in,out]size_of_dataOn Input, this field should indicate how much space you have allocated for the data that is being returned (i.e. how much space is available for the value parameter). If the value being returned is larger than the amount of space available, as indicated by the size_of_data parameter, then you have not allocated enough space. In this case the API will output an error and will not fill in the value parameter. WARNING: If you tell the API that you have allocated enough space but you really haven’t, the API will believe you and will fill in the value parameter. Therefore, if there isn’t enough space, the API will undoubtedly overwrite some important memory and this will eventually lead to a crash. Therefore, you need to make sure that you allocate exactly what you say you are allocating. On Output, the API will update the size_of_data parameter to indicate the size of the data returned in the value parameter. Please note that when strings are converted all of the characters are converted based on the length specified in the database. The entire length is copied into the value parameter (not just the NULL character). .
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_NOT_ENOUGH_SPACE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
String msid = new String("MSID128".ToCharArray());
String apid = new String("7".ToCharArray());
int return_code = 0;
int size_of_data = 100;
string value;
string status="";
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_One_Newest_Converted_Time_String_Value(PACKET_TYPE.Pdss_Payload, msid, apid, DATA_MODE.Real_Time, token, out size_of_data, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS || return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Value is {0}. Status is {1}.\n", value, status);
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_One_Newest_Converted_Time_String_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]System::String^ %value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the newest available time string value for the specified parameter.
Definition: trek_user_api_dotnet.cpp:9961

Longer examples that include this method:
None

◆ Get_One_Newest_Converted_Time_Value()

int trek::trek_user_api::Get_One_Newest_Converted_Time_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] Trek_Time %  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the newest available time string value for the specified parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_NOT_ENOUGH_SPACE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
string msid = new String("MSID128".ToCharArray());
string apid = new String("7".ToCharArray());
int return_code = 0;
Trek_Time value;
string status="";
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_One_Newest_Converted_Time_Value(PACKET_TYPE.Pdss_Payload, msid, apid, DATA_MODE.Real_Time, token, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS || return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Month is {0}. Status is {1}.\n", value.month, status);
Console.WriteLine("Year is {0}. Day is {1}.\n", value.year, value.day_of_month);
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_One_Newest_Converted_Time_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]Trek_Time %value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the newest available time string value for the specified parameter.
Definition: trek_user_api_dotnet.cpp:10383

Longer examples that include this method:
None

◆ Get_One_Newest_Converted_Unsigned_Integer_Value()

int trek::trek_user_api::Get_One_Newest_Converted_Unsigned_Integer_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] System::UInt32 %  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the integer value for the specified parameter from the same packet as another parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_MORE_DATA_AVAILABLE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
String msid = new String("MSID015".ToCharArray());
String apid = new String("7".ToCharArray());
int return_code = -1;
int[] token = new int[3];
String status = "0";
uint value;
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_One_Newest_Converted_Unsigned_Integer_Value(PACKET_TYPE.Pdss_Payload, msid, apid, DATA_MODE.Real_Time, SENSING.No_Sense, token, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success getting information {0}. Status is {1}", value, status);
Console.ReadKey();
}
else if (return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success getting information. More Data Available");
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_One_Newest_Converted_Unsigned_Integer_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::UInt32 %value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the integer value for the specified parameter from the same packet as another parameter.
Definition: trek_user_api_dotnet.cpp:9546

Longer examples that include this method:
None

◆ Get_One_Newest_Raw_Value()

int trek::trek_user_api::Get_One_Newest_Raw_Value ( PACKET_TYPE  packet_type,
PARAMETER_TYPE  parameter_type,
System::String^  identifier,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] System::Int32 %  size_of_data,
[System::Runtime::InteropServices::Out] array< System::Byte >^  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the raw value for the specified parameter from the same packet as another parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]parameter_typeOn a TReK Release 3 System, any data aggregate is considered a parameter. Therefore packets, subsets, and MSIDs are all considered parameters. The parameter type argument identifies what type of parameter is being retrieved. The parameter_type information passed in should be one of the following values: CCSDS_PACKET, EHS_PACKET, SUBSET, or MSID. Please note that when you request to retrieve a CCSDS_PACKET, the API will return a complete CCSDS packet. This does not include the EHS header. You must pass in a parameter type of EHS_PACKET to retrieve the EHS header information.
[in]identifierThe identifier for the parameter. The identifier is based on the parameter_type and should be one of the following:
Parameter Type

Identifier Should Be A(n)

EHS_PACKET

APID

MSID

MSID (Parameter)

CCSDS_PACKET

APID

EXPRESS

Source Function Code

UFO User Assigned ID
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in,out]size_of_dataOn Input, this field should indicate how much space you have allocated for a single sample of the data that is being returned. The value parameter can be used to return one or more samples of data. The size_of_data parameter indicates how much space is available to hold one of the samples in the value parameter. If the data being returned for a single sample is larger than the amount of space available for a single sample, as indicated by the size_of_data parameter, than you have not allocated enough space. In this case the API will output an error and will not fill in the value parameter. WARNING: If you tell the API that you have allocated enough space but you really have not, the API will believe you and will fill in the value parameter. Therefore, if there is not enough space, the API will undoubtedly overwrite some important memory and this will eventually lead to a crash. Therefore, you need to make sure that you allocate exactly what you say you are allocating. On Output, the API will update the size_of_data parameter to indicate the size of the data returned in the value parameter.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
int size_of_data;
byte[] value = new byte[10000];
string status = "//";
int return_code = -1;
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
size_of_data = 10000;
return_code = trek_user_api.Get_One_Newest_Raw_Value(PACKET_TYPE.Pdss_Payload, PARAMETER_TYPE.Ccsds_Packet,"7" , "7", DATA_MODE.Real_Time, token, out size_of_data, value, out status);
//Check return
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success getting information {0}, Status {1}", value, status);
Console.ReadKey();
}
else if (return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success getting information. More Data Available");
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_One_Newest_Raw_Value(PACKET_TYPE packet_type, PARAMETER_TYPE parameter_type, System::String^ identifier, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]array< System::Byte >^ value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the raw value for the specified parameter from the same packet as another parameter.
Definition: trek_user_api_dotnet.cpp:9280

Longer examples that include this method:
None

◆ Get_One_Next_Calibrated_Double_Value()

int trek::trek_user_api::Get_One_Next_Calibrated_Double_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] System::Double %  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the next available calibrated double value for the specified parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
String msid = new String("MSID009".ToCharArray());
String apid = new String("7".ToCharArray());
double value;
string status = "0";
int return_code = -1;
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_One_Next_Calibrated_Double_Value(PACKET_TYPE.Pdss_Payload, msid, apid, DATA_MODE.Real_Time, SENSING.No_Sense, token, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success getting information {0}, Status is {1}\n", value, status);
Console.ReadKey();
}
else if (return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success getting information. More Data Available");
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_One_Next_Calibrated_Double_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Double %value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the next available calibrated double value for the specified parameter.
Definition: trek_user_api_dotnet.cpp:9102

Longer examples that include this method:
None

◆ Get_One_Next_Calibrated_String_Value()

int trek::trek_user_api::Get_One_Next_Calibrated_String_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] System::Int32 %  size_of_data,
[System::Runtime::InteropServices::Out] System::String^ %  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the next available calibrated string (enumerator) value for the specified parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in,out]size_of_dataOn Input, this field should indicate how much space you have allocated for the data that is being returned (i.e. how much space is available for the value parameter). If the value being returned is larger than the amount of space available, as indicated by the size_of_data parameter, then you have not allocated enough space. In this case the API will output an error and will not fill in the value parameter. WARNING: If you tell the API that you have allocated enough space but you really haven’t, the API will believe you and will fill in the value parameter. Therefore, if there isn’t enough space, the API will undoubtedly overwrite some important memory and this will eventually lead to a crash. Therefore, you need to make sure that you allocate exactly what you say you are allocating. On Output, the API will update the size_of_data parameter to indicate the size of the data returned in the value parameter. Please note that when strings are converted all of the characters are converted based on the length specified in the database. The entire length is copied into the value parameter (not just the NULL character).
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_NOT_ENOUGH_SPACE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'>
String msid = new String("MSID079".ToCharArray());
String apid = new String("7".ToCharArray());
int size_of_data = 100;
string value = "0";
string status = "0";
int return_code = -1;
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_One_Next_Calibrated_String_Value(PACKET_TYPE.Pdss_Payload, msid, apid, DATA_MODE.Real_Time, SENSING.No_Sense, token, out size_of_data, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success getting information");
Console.ReadKey();
}
else if (return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success getting information. More Data Available");
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_One_Next_Calibrated_String_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]System::String^ %value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the next available calibrated string (enumerator) value for the specified parameter.
Definition: trek_user_api_dotnet.cpp:8822

Longer examples that include this method:
None

◆ Get_One_Next_Converted_Double_Value()

int trek::trek_user_api::Get_One_Next_Converted_Double_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] System::Double %  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the next available double value for the specified parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_MORE_DATA_AVAILABLE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
String msid = new String("MSID106".ToCharArray());
String apid = new String("7".ToCharArray());
int return_code=0;
double value;
string status = "0";
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_One_Next_Converted_Double_Value(PACKET_TYPE.Pdss_Payload, msid, apid, DATA_MODE.Real_Time, SENSING.No_Sense, token, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS || return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success: Value is {0}. Status is {1}.\n", value, status);
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_One_Next_Converted_Double_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Double %value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the next available double value for the specified parameter.
Definition: trek_user_api_dotnet.cpp:8388

Longer examples that include this method:
None

◆ Get_One_Next_Converted_Integer_Value()

int trek::trek_user_api::Get_One_Next_Converted_Integer_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] System::Int32 %  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the next available integer value for the specified parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_MORE_DATA_AVAILABLE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
String msid = new String("MSID016".ToCharArray());
String apid = new String("7".ToCharArray());
int return_code=0;
int value;
string status = "0";
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_One_Next_Converted_Integer_Value(PACKET_TYPE.Pdss_Payload, msid, apid, DATA_MODE.Real_Time, SENSING.No_Sense, token, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS || return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success: Value returned is {0}. Status is {1}.\n", value, status);
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_One_Next_Converted_Integer_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the next available integer value for the specified parameter.
Definition: trek_user_api_dotnet.cpp:8140

Longer examples that include this method:
None

◆ Get_One_Next_Converted_String_Value()

int trek::trek_user_api::Get_One_Next_Converted_String_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] System::Int32 %  size_of_data,
[System::Runtime::InteropServices::Out] System::String^ %  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the next available string value for the specified parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in,out]size_of_dataOn Input, this field should indicate how much space you have allocated for the data that is being returned (i.e. how much space is available for the value parameter). If the value being returned is larger than the amount of space available, as indicated by the size_of_data parameter, then you have not allocated enough space. In this case the API will output an error and will not fill in the value parameter. WARNING: If you tell the API that you have allocated enough space but you really haven’t, the API will believe you and will fill in the value parameter. Therefore, if there isn’t enough space, the API will undoubtedly overwrite some important memory and this will eventually lead to a crash. Therefore, you need to make sure that you allocate exactly what you say you are allocating. On Output, the API will update the size_of_data parameter to indicate the size of the data returned in the value parameter. Please note that when strings are converted all of the characters are converted based on the length specified in the database. The entire length is copied into the value parameter (not just the NULL character). .
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_NOT_ENOUGH_SPACE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'>
String msid = new String("MSID001".ToCharArray());
String apid = new String("7".ToCharArray());
int return_code=0;
int size_of_data = 100;
string value;
string status = "0";
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_One_Next_Converted_String_Value(PACKET_TYPE.Pdss_Payload, msid, apid, DATA_MODE.Real_Time, token, out size_of_data, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS || return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success: Value is {0}. Status is {1}.\n", value, status);
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_One_Next_Converted_String_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]System::String^ %value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the next available string value for the specified parameter.
Definition: trek_user_api_dotnet.cpp:8523

Longer examples that include this method:
None

◆ Get_One_Next_Converted_Time_String_Value()

int trek::trek_user_api::Get_One_Next_Converted_Time_String_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] System::Int32 %  size_of_data,
[System::Runtime::InteropServices::Out] System::String^ %  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the next available time string value for the specified parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in,out]size_of_dataOn Input, this field should indicate how much space you have allocated for the data that is being returned (i.e. how much space is available for the value parameter). If the value being returned is larger than the amount of space available, as indicated by the size_of_data parameter, then you have not allocated enough space. In this case the API will output an error and will not fill in the value parameter. WARNING: If you tell the API that you have allocated enough space but you really haven’t, the API will believe you and will fill in the value parameter. Therefore, if there isn’t enough space, the API will undoubtedly overwrite some important memory and this will eventually lead to a crash. Therefore, you need to make sure that you allocate exactly what you say you are allocating. On Output, the API will update the size_of_data parameter to indicate the size of the data returned in the value parameter. Please note that when strings are converted all of the characters are converted based on the length specified in the database. The entire length is copied into the value parameter (not just the NULL character). .
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_NOT_ENOUGH_SPACE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
string msid = new String("MSID128".ToCharArray());
string apid = new String("7".ToCharArray());
int size_of_data = 100;
string status = "//";
int return_code = -1;
int[] token = new int[3];
string value;
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_One_Next_Converted_Time_String_Value(PACKET_TYPE.Pdss_Payload, msid, apid, DATA_MODE.Real_Time, token, out size_of_data, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Time: {0}. Status {1}\n", value, status );
Console.ReadKey();
}
else if (return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success getting information. More Data Available");
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_One_Next_Converted_Time_String_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]System::String^ %value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the next available time string value for the specified parameter.
Definition: trek_user_api_dotnet.cpp:8671

Longer examples that include this method:
None

◆ Get_One_Next_Converted_Time_Value()

int trek::trek_user_api::Get_One_Next_Converted_Time_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] Trek_Time %  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the next available time string value for the specified parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_NOT_ENOUGH_SPACE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
String msid = new String("MSID128".ToCharArray());
String apid = new String("7".ToCharArray());
UInt32 number_samples = 10;
string status = "//";
int return_code = -1;
int[] token = new int[3];
Trek_Time value;
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_One_Next_Converted_Time_Value(PACKET_TYPE.Pdss_Payload, msid, apid, DATA_MODE.Real_Time, token, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
for (int ii = 0; ii < number_samples; ii++) ;
Console.WriteLine("Time: {0}. Status {1}\n", value, status );
Console.ReadKey();
}
else if (return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success getting information. More Data Available");
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_One_Next_Converted_Time_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]Trek_Time %value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the next available time string value for the specified parameter.
Definition: trek_user_api_dotnet.cpp:8961

Longer examples that include this method:
None

◆ Get_One_Next_Converted_Unsigned_Integer_Value()

int trek::trek_user_api::Get_One_Next_Converted_Unsigned_Integer_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
System::String^  apid,
DATA_MODE  data_mode,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] System::UInt32 %  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the next available unsigned integer value for the specified parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_MORE_DATA_AVAILABLE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
String msid = new String("MSID015".ToCharArray());
String apid = new String("7".ToCharArray());
int return_code=0;
uint value;
string status = "0";
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
return_code = trek_user_api.Get_One_Next_Converted_Unsigned_Integer_Value(PACKET_TYPE.Pdss_Payload, msid, apid, DATA_MODE.Real_Time, SENSING.No_Sense, token, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS || return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success: Value is {0}. Status is {1}.\n", value, status);
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_One_Next_Converted_Unsigned_Integer_Value(PACKET_TYPE packet_type, System::String^ msid, System::String^ apid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::UInt32 %value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the next available unsigned integer value for the specified parameter.
Definition: trek_user_api_dotnet.cpp:8264

Longer examples that include this method:
None

◆ Get_One_Next_Raw_Value()

int trek::trek_user_api::Get_One_Next_Raw_Value ( PACKET_TYPE  packet_type,
PARAMETER_TYPE  parameter_type,
System::String^  identifier,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] System::Int32 %  size_of_data,
[System::Runtime::InteropServices::Out] array< System::Byte >^  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the newest available raw (unprocessed/binary) value for the specified parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]parameter_typeOn a TReK Release 3 System, any data aggregate is considered a parameter. Therefore packets, subsets, and MSIDs are all considered parameters. The parameter type argument identifies what type of parameter is being retrieved. The parameter_type information passed in should be one of the following values: CCSDS_PACKET, EHS_PACKET, SUBSET, or MSID. Please note that when you request to retrieve a CCSDS_PACKET, the API will return a complete CCSDS packet. This does not include the EHS header. You must pass in a parameter type of EHS_PACKET to retrieve the EHS header information.
[in]identifierThe identifier for the parameter. The identifier is based on the parameter_type and should be one of the following:
Parameter Type

Identifier Should Be A(n)

EHS_PACKET

APID

MSID

MSID (Parameter)

CCSDS_PACKET

APID

EXPRESS

Source Function Code

UFO User Assigned ID
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in,out]size_of_dataOn Input, this field should indicate how much space you have allocated for a single sample of the data that is being returned. The value parameter can be used to return one or more samples of data. The size_of_data parameter indicates how much space is available to hold one of the samples in the value parameter. If the data being returned for a single sample is larger than the amount of space available for a single sample, as indicated by the size_of_data parameter, than you have not allocated enough space. In this case the API will output an error and will not fill in the value parameter. WARNING: If you tell the API that you have allocated enough space but you really have not, the API will believe you and will fill in the value parameter. Therefore, if there is not enough space, the API will undoubtedly overwrite some important memory and this will eventually lead to a crash. Therefore, you need to make sure that you allocate exactly what you say you are allocating. On Output, the API will update the size_of_data parameter to indicate the size of the data returned in the value parameter.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_NOT_ENOUGH_SPACE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
int size_of_data;
byte[] value = new byte[10000];
string status = "//";
int return_code = -1;
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
size_of_data = 10000;
return_code = trek_user_api.Get_One_Next_Raw_Value(PACKET_TYPE.Pdss_Payload, PARAMETER_TYPE.Ccsds_Packet, "7", "7", DATA_MODE.Real_Time, token, out size_of_data, value, out status);
//Check return to see if its successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success getting information {0}, Status {1}", value, status);
Console.ReadKey();
}
else if (return_code == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success getting information. More Data Available");
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_One_Next_Raw_Value(PACKET_TYPE packet_type, PARAMETER_TYPE parameter_type, System::String^ identifier, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]array< System::Byte >^ value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the newest available raw (unprocessed/binary) value for the specified parameter.
Definition: trek_user_api_dotnet.cpp:8005

Longer examples that include this method:
None

◆ Get_One_Same_Packet_Calibrated_Double_Value()

int trek::trek_user_api::Get_One_Same_Packet_Calibrated_Double_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
DATA_MODE  data_mode,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  from_this_pkt_token,
[System::Runtime::InteropServices::Out] System::Double %  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the newest available calibrated double value for the specified parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in]from_this_pkt_tokenThe token returned by a call to another TReK Telemetry API function such as GetOneNewestConvertedInteger or GetNextRawValue. This token is used by TReK to determine which packet to retrieve the parameter specified by the identifier. The from_this_pkt_token value is not changed.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
string apid = new string("7".ToCharArray());
int value = 0;
double second_value;
string status = "//";
int return_code = -1;
int[] token = new int[3];
int[] second_token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
second_token[0] = second_token[1] = second_token[2] = 0;
return_code = trek_user_api.Get_One_Newest_Converted_Integer_Value(PACKET_TYPE.Pdss_Payload, "MSID016", apid, DATA_MODE.Real_Time, SENSING.No_Sense, token, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Value is {0}. Status is {1}\n", value, status);
//now get another value from the same packet
return_code = trek_user_api.Get_One_Same_Packet_Calibrated_Double_Value(PACKET_TYPE.Pdss_Payload, "MSID009", DATA_MODE.Real_Time, SENSING.No_Sense, second_token, token, out second_value, out status);
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Value is {0}\n", second_value);
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_One_Same_Packet_Calibrated_Double_Value(PACKET_TYPE packet_type, System::String^ msid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ from_this_pkt_token, [System::Runtime::InteropServices::Out]System::Double %value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the newest available calibrated double value for the specified parameter.
Definition: trek_user_api_dotnet.cpp:11533

Longer examples that include this method:
None

◆ Get_One_Same_Packet_Calibrated_String_Value()

int trek::trek_user_api::Get_One_Same_Packet_Calibrated_String_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
DATA_MODE  data_mode,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  from_this_pkt_token,
[System::Runtime::InteropServices::Out] System::Int32 %  size_of_data,
[System::Runtime::InteropServices::Out] System::String^ %  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the newest available calibrated string (enumerator) value for the specified parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in,out]size_of_dataOn Input, this field should indicate how much space you have allocated for the data that is being returned (i.e. how much space is available for the value parameter). If the value being returned is larger than the amount of space available, as indicated by the size_of_data parameter, then you have not allocated enough space. In this case the API will output an error and will not fill in the value parameter. WARNING: If you tell the API that you have allocated enough space but you really haven’t, the API will believe you and will fill in the value parameter. Therefore, if there isn’t enough space, the API will undoubtedly overwrite some important memory and this will eventually lead to a crash. Therefore, you need to make sure that you allocate exactly what you say you are allocating. On Output, the API will update the size_of_data parameter to indicate the size of the data returned in the value parameter. Please note that when strings are converted all of the characters are converted based on the length specified in the database. The entire length is copied into the value parameter (not just the NULL character). .
[in]from_this_pkt_tokenThe token returned by a call to another TReK Telemetry API function such as GetOneNewestConvertedInteger or GetNextRawValue. This token is used by TReK to determine which packet to retrieve the parameter specified by the identifier. The from_this_pkt_token value is not changed.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_NOT_ENOUGH_SPACE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
string apid = new string("7".ToCharArray());
int value = 0;
string second_value="//";
string status = "//";
int return_code = -1;
int[] token = new int[3];
int[] second_token = new int[3];
int size_of_data = 100;
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
second_token[0] = second_token[1] = second_token[2] = 0;
return_code = trek_user_api.Get_One_Newest_Converted_Integer_Value(PACKET_TYPE.Pdss_Payload, "MSID016", apid, DATA_MODE.Real_Time, SENSING.No_Sense, token, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Value is {0}. Status is {1}\n", value, status);
//now get another value from the same packet
return_code = trek_user_api.Get_One_Same_Packet_Calibrated_String_Value(PACKET_TYPE.Pdss_Payload, "MSID001", DATA_MODE.Real_Time, SENSING.No_Sense, second_token, token, out size_of_data, out second_value, out status);
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Value is {0}\n", second_value);
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_One_Same_Packet_Calibrated_String_Value(PACKET_TYPE packet_type, System::String^ msid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ from_this_pkt_token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]System::String^ %value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the newest available calibrated string (enumerator) value for the specified parameter.
Definition: trek_user_api_dotnet.cpp:11402

Longer examples that include this method:
None

◆ Get_One_Same_Packet_Converted_Double_Value()

int trek::trek_user_api::Get_One_Same_Packet_Converted_Double_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
DATA_MODE  data_mode,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  from_this_pkt_token,
[System::Runtime::InteropServices::Out] System::Double %  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the double value for the specified parameter from the same packet as another parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in]from_this_pkt_tokenThe token returned by a call to another TReK Telemetry API function such as GetOneNewestConvertedInteger or GetNextRawValue. This token is used by TReK to determine which packet to retrieve the parameter specified by the identifier. The from_this_pkt_token value is not changed.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_MORE_DATA_AVAILABLE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
string apid = new string("7".ToCharArray());
int value = 0;
double second_value;
string status = "//";
int return_code = -1;
int[] token = new int[3];
int[] second_token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
second_token[0] = second_token[1] = second_token[2] = 0;
return_code = trek_user_api.Get_One_Newest_Converted_Integer_Value(PACKET_TYPE.Pdss_Payload, "MSID016", apid, DATA_MODE.Real_Time, SENSING.No_Sense, token, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Value is {0}. Status is {1}\n", value, status);
//now get another value from the same packet
return_code = trek_user_api.Get_One_Same_Packet_Converted_Double_Value(PACKET_TYPE.Pdss_Payload, "MSID106", DATA_MODE.Real_Time, SENSING.No_Sense, second_token, token, out second_value, out status);
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Value is {0}\n", second_value);
Console.ReadKey();
}
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_One_Same_Packet_Converted_Double_Value(PACKET_TYPE packet_type, System::String^ msid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ from_this_pkt_token, [System::Runtime::InteropServices::Out]System::Double %value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the double value for the specified parameter from the same packet as another parameter.
Definition: trek_user_api_dotnet.cpp:10982

Longer examples that include this method:
None

◆ Get_One_Same_Packet_Converted_Integer_Value()

int trek::trek_user_api::Get_One_Same_Packet_Converted_Integer_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
DATA_MODE  data_mode,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  from_this_pkt_token,
[System::Runtime::InteropServices::Out] System::Int32 %  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the integer value for the specified parameter from the same packet as another parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in]from_this_pkt_tokenThe token returned by a call to another TReK Telemetry API function such as GetOneNewestConvertedInteger or GetNextRawValue. This token is used by TReK to determine which packet to retrieve the parameter specified by the identifier. The from_this_pkt_token value is not changed.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_MORE_DATA_AVAILABLE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
string apid = new string("7".ToCharArray());
int value=0;
string status = "//";
int return_code = -1;
int[] token = new int[3];
int[] second_token = new int[3];
byte [] bin_value = new byte [100];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
second_token[0] = second_token[1] = second_token[2] = 0;
return_code = trek_user_api.Get_One_Newest_Converted_Integer_Value(PACKET_TYPE.Pdss_Payload, "MSID016", apid, DATA_MODE.Real_Time, SENSING.No_Sense, token, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Value is {0}. Status is {1}\n", value, status);
//now get another value from the same packet
return_code = trek_user_api.Get_One_Same_Packet_Converted_Integer_Value(PACKET_TYPE.Pdss_Payload, "MSID009", DATA_MODE.Real_Time, SENSING.No_Sense, second_token, token, out value, out status);
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Value is {0}\n", value);
Console.ReadKey();
}
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_One_Same_Packet_Converted_Integer_Value(PACKET_TYPE packet_type, System::String^ msid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ from_this_pkt_token, [System::Runtime::InteropServices::Out]System::Int32 %value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the integer value for the specified parameter from the same packet as another parameter.
Definition: trek_user_api_dotnet.cpp:10730

Longer examples that include this method:
None

◆ Get_One_Same_Packet_Converted_String_Value()

int trek::trek_user_api::Get_One_Same_Packet_Converted_String_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  from_this_pkt_token,
[System::Runtime::InteropServices::Out] System::Int32 %  size_of_data,
[System::Runtime::InteropServices::Out] System::String^ %  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the string value for the specified parameter from the same packet as another parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in]from_this_pkt_tokenThe token returned by a call to another TReK Telemetry API function such as GetOneNewestConvertedInteger or GetNextRawValue. This token is used by TReK to determine which packet to retrieve the parameter specified by the identifier. The from_this_pkt_token value is not changed.
[in,out]size_of_dataOn Input, this field should indicate how much space you have allocated for the data that is being returned (i.e. how much space is available for the value parameter). If the value being returned is larger than the amount of space available, as indicated by the size_of_data parameter, then you have not allocated enough space. In this case the API will output an error and will not fill in the value parameter. WARNING: If you tell the API that you have allocated enough space but you really haven’t, the API will believe you and will fill in the value parameter. Therefore, if there isn’t enough space, the API will undoubtedly overwrite some important memory and this will eventually lead to a crash. Therefore, you need to make sure that you allocate exactly what you say you are allocating. On Output, the API will update the size_of_data parameter to indicate the size of the data returned in the value parameter. Please note that when strings are converted all of the characters are converted based on the length specified in the database. The entire length is copied into the value parameter (not just the NULL character). .
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_MORE_DATA_AVAILABLE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
string apid = new string("7".ToCharArray());
int value = 0;
string second_value;
string status = "//";
int return_code = -1;
int[] token = new int[3];
int[] second_token = new int[3];
int size_of_data = 100;
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
second_token[0] = second_token[1] = second_token[2] = 0;
return_code = trek_user_api.Get_One_Newest_Converted_Integer_Value(PACKET_TYPE.Pdss_Payload, "MSID016", apid, DATA_MODE.Real_Time, SENSING.No_Sense, token, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Value is {0}. Status is {1}\n", value, status);
//now get another value from the same packet
return_code = trek_user_api.Get_One_Same_Packet_Converted_String_Value(PACKET_TYPE.Pdss_Payload, "MSID001", DATA_MODE.Real_Time, second_token, token, out size_of_data, out second_value, out status);
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Value is {0}\n", second_value);
Console.ReadKey();
}
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_One_Same_Packet_Converted_String_Value(PACKET_TYPE packet_type, System::String^ msid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ from_this_pkt_token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]System::String^ %value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the string value for the specified parameter from the same packet as another parameter.
Definition: trek_user_api_dotnet.cpp:11119

Longer examples that include this method:
None

◆ Get_One_Same_Packet_Converted_Time_String_Value()

int trek::trek_user_api::Get_One_Same_Packet_Converted_Time_String_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  from_this_pkt_token,
[System::Runtime::InteropServices::Out] System::Int32 %  size_of_data,
[System::Runtime::InteropServices::Out] System::String^ %  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the time value for the specified parameter from the same packet as another parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in]from_this_pkt_tokenThe token returned by a call to another TReK Telemetry API function such as GetOneNewestConvertedInteger or GetNextRawValue. This token is used by TReK to determine which packet to retrieve the parameter specified by the identifier. The from_this_pkt_token value is not changed.
[in,out]size_of_dataOn Input, this field should indicate how much space you have allocated for the data that is being returned (i.e. how much space is available for the value parameter). If the value being returned is larger than the amount of space available, as indicated by the size_of_data parameter, then you have not allocated enough space. In this case the API will output an error and will not fill in the value parameter. WARNING: If you tell the API that you have allocated enough space but you really haven’t, the API will believe you and will fill in the value parameter. Therefore, if there isn’t enough space, the API will undoubtedly overwrite some important memory and this will eventually lead to a crash. Therefore, you need to make sure that you allocate exactly what you say you are allocating. On Output, the API will update the size_of_data parameter to indicate the size of the data returned in the value parameter. Please note that when strings are converted all of the characters are converted based on the length specified in the database. The entire length is copied into the value parameter (not just the NULL character).
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_MORE_DATA_AVAILABLE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
string apid = new string("7".ToCharArray());
int value = 0;
string second_value="//";
string status = "//";
int return_code = -1;
int[] token = new int[3];
int[] second_token = new int[3];
int size_of_data = 100;
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
second_token[0] = second_token[1] = second_token[2] = 0;
return_code = trek_user_api.Get_One_Newest_Converted_Integer_Value(PACKET_TYPE.Pdss_Payload, "MSID016", apid, DATA_MODE.Real_Time, SENSING.No_Sense, token, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Value is {0}. Status is {1}\n", value, status);
//now get another value from the same packet
return_code = trek_user_api.Get_One_Same_Packet_Converted_Time_String_Value(PACKET_TYPE.Pdss_Payload, "MSID009", DATA_MODE.Real_Time, second_token, token, out size_of_data, out second_value, out status);
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Value is {0}\n", second_value);
Console.ReadKey();
}
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_One_Same_Packet_Converted_Time_String_Value(PACKET_TYPE packet_type, System::String^ msid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ from_this_pkt_token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]System::String^ %value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the time value for the specified parameter from the same packet as another parameter.
Definition: trek_user_api_dotnet.cpp:11258

Longer examples that include this method:
None

◆ Get_One_Same_Packet_Converted_Time_Value()

int trek::trek_user_api::Get_One_Same_Packet_Converted_Time_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  from_this_pkt_token,
[System::Runtime::InteropServices::Out] Trek_Time %  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the newest available time value for the specified parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in]from_this_pkt_tokenThe token returned by a call to another TReK Telemetry API function such as GetOneNewestConvertedInteger or GetNextRawValue. This token is used by TReK to determine which packet to retrieve the parameter specified by the identifier. The from_this_pkt_token value is not changed.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_NOT_ENOUGH_SPACE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
int size_of_data = 100;
string apid = new string("7".ToCharArray());
int value = 0;
Trek_Time time_value;
string status = "//";
int return_code = -1;
int[] token = new int[3];
int[] second_token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
second_token[0] = second_token[1] = second_token[2] = 0;
return_code = trek_user_api.Get_One_Newest_Converted_Integer_Value(PACKET_TYPE.Pdss_Payload, "MSID016", apid, DATA_MODE.Real_Time, SENSING.No_Sense, token, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Value is {0}. Status is {1}\n", value, status);
//now get another value from the same packet
return_code = trek_user_api.Get_One_Same_Packet_Converted_Time_Value(PACKET_TYPE.Pdss_Payload, "MSID128", DATA_MODE.Real_Time, second_token, token, size_of_data, out time_value, out status);
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Day of Month is {0}\n Status: is {1}\n", time_value.day_of_month, status);
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_One_Same_Packet_Converted_Time_Value(PACKET_TYPE packet_type, System::String^ msid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ from_this_pkt_token, [System::Runtime::InteropServices::Out]Trek_Time %value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the newest available time value for the specified parameter.
Definition: trek_user_api_dotnet.cpp:11658

◆ Get_One_Same_Packet_Converted_Unsigned_Integer_Value()

int trek::trek_user_api::Get_One_Same_Packet_Converted_Unsigned_Integer_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
DATA_MODE  data_mode,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  from_this_pkt_token,
[System::Runtime::InteropServices::Out] System::UInt32 %  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the unsigned integer value for the specified parameter from the same packet as another parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in]from_this_pkt_tokenThe token returned by a call to another TReK Telemetry API function such as GetOneNewestConvertedInteger or GetNextRawValue. This token is used by TReK to determine which packet to retrieve the parameter specified by the identifier. The from_this_pkt_token value is not changed.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_MORE_DATA_AVAILABLE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
string apid = new string("7".ToCharArray());
int value = 0;
uint second_value;
string status = "//";
int return_code = -1;
int[] token = new int[3];
int[] second_token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
second_token[0] = second_token[1] = second_token[2] = 0;
return_code = trek_user_api.Get_One_Newest_Converted_Integer_Value(PACKET_TYPE.Pdss_Payload, "MSID016", apid, DATA_MODE.Real_Time, SENSING.No_Sense, token, out value, out status);
//Check return to see if API executed successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Value is {0}. Status is {1}\n", value, status);
//now get another value from the same packet
return_code = trek_user_api.Get_One_Same_Packet_Converted_Unsigned_Integer_Value(PACKET_TYPE.Pdss_Payload, "MSID009", DATA_MODE.Real_Time, SENSING.No_Sense, second_token, token, out second_value, out status);
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Value is {0}\n", second_value);
Console.ReadKey();
}
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_One_Same_Packet_Converted_Unsigned_Integer_Value(PACKET_TYPE packet_type, System::String^ msid, DATA_MODE data_mode, SENSING limit_es_flag, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ from_this_pkt_token, [System::Runtime::InteropServices::Out]System::UInt32 %value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the unsigned integer value for the specified parameter from the same packet as another parameter...
Definition: trek_user_api_dotnet.cpp:10857

Longer examples that include this method:
None

◆ Get_One_Same_Packet_Raw_Value()

int trek::trek_user_api::Get_One_Same_Packet_Raw_Value ( PACKET_TYPE  packet_type,
PARAMETER_TYPE  parameter_type,
System::String^  identifier,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  from_this_pkt_token,
[System::Runtime::InteropServices::Out] System::Int32 %  size_of_data,
[System::Runtime::InteropServices::Out] array< System::Byte >^  value,
[System::Runtime::InteropServices::Out] System::String^ %  status 
)
static

Gets the raw value for the specified parameter from the same packet as another parameter.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]parameter_typeOn a TReK Release 3 System, any data aggregate is considered a parameter. Therefore packets, subsets, and MSIDs are all considered parameters. The parameter type argument identifies what type of parameter is being retrieved. The parameter_type information passed in should be one of the following values: CCSDS_PACKET, EHS_PACKET, SUBSET, or MSID. Please note that when you request to retrieve a CCSDS_PACKET, the API will return a complete CCSDS packet. This does not include the EHS header. You must pass in a parameter type of EHS_PACKET to retrieve the EHS header information.
[in]identifierThe identifier for the parameter. The identifier is based on the parameter_type and should be one of the following:
Parameter Type

Identifier Should Be A(n)

EHS_PACKET

APID

MSID

MSID (Parameter)

CCSDS_PACKET

APID

EXPRESS

Source Function Code

UFO User Assigned ID
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in]from_this_pkt_tokenThe token returned by a call to another TReK Telemetry API function such as GetOneNewestConvertedInteger or GetNextRawValue. This token is used by TReK to determine which packet to retrieve the parameter specified by the identifier. The from_this_pkt_token value is not changed.
[in,out]size_of_dataThis field should indicate how much space you have allocated for a single sample of the data that is being returned (the largest sample). The value parameter can be used to return one or more samples of data. The size_of_data parameter indicates how much space is available to hold one of the samples in the value parameter. If the data being returned for a single sample is larger than the amount of space available for a single sample, as indicated by the size_of_data parameter, then you have not allocated enough space. In this case the API will output an error and will not fill in the value parameter. If the return code is TLM_API_LENGTH_ERR, then this value will be reset to the amount of space required to hold the sample. WARNING: If you tell the API that you have allocated enough space but you really have not, the API will believe you and will fill in the value parameter. Therefore, if there is not enough space, the API will undoubtedly overwrite some important memory and this will eventually lead to a crash. Therefore, you need to make sure that you allocate exactly what you say you are allocating.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_MORE_DATA_AVAILABLE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

'C#'
string apid = new string("7".ToCharArray());
int value;
byte[] bin_value = new byte[3];
string status = "//";
int return_code = -1;
int return_code2 = -1;
int[] token = new int[3];
int[] second_token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
second_token[0] = second_token[1] = second_token[2] = 0;
return_code = trek_user_api.Get_One_Newest_Converted_Integer_Value(PACKET_TYPE.Pdss_Payload, "MSID016", apid, DATA_MODE.Real_Time, SENSING.No_Sense, token, out value, out status);
//Check return
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Value is {0}. Status is {1}\n", value, status);
//Get another value from the same packet
int size_of_data = 100;
return_code2 = trek_user_api.Get_One_Same_Packet_Raw_Value(PACKET_TYPE.Pdss_Payload, PARAMETER_TYPE.Msid, "MSID009", DATA_MODE.Real_Time, second_token, token, out size_of_data, bin_value, out status);
//check return
if (return_code2 == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Value: {0}\n", bin_value);
}
else
Console.WriteLine("Error getting information {0}", return_code2);
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_One_Same_Packet_Raw_Value(PACKET_TYPE packet_type, PARAMETER_TYPE parameter_type, System::String^ identifier, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]array< System::Int32 >^ token, [System::Runtime::InteropServices::Out]array< System::Int32 >^ from_this_pkt_token, [System::Runtime::InteropServices::Out]System::Int32 %size_of_data, [System::Runtime::InteropServices::Out]array< System::Byte >^ value, [System::Runtime::InteropServices::Out]System::String^ %status)
Gets the raw value for the specified parameter from the same packet as another parameter.
Definition: trek_user_api_dotnet.cpp:10586

Longer examples that include this method:
None

◆ Get_Packet_Arrival_Event_Name()

int trek::trek_user_api::Get_Packet_Arrival_Event_Name ( PACKET_TYPE  packet_type,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] System::String^ %  event_name 
)
static

This function gets the event name associated with packet arrival. This string can be used with the WaitForPacketArrival() function. When a packet arrives the WaitForPacketArrival() function releases and you can get new data from the packet.

Note
This is a TReK Release 3 ANSI-C compatible function. This function requires you to use a new function (WaitForPacketArrival()) that was not part of Release 3.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[out]event_nameThis parameter is an Output parameter. The Output will be the Packet Arrival Event Name. Memory is created to hold the Packet Arrival Event Name. No memory is allocated if return code is not SUCCESS. The User is responsible for deallocating the memory.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_INVALID_APID (Release 3 return code)
API_INVALID_DATA_MODE (Release 3 return code)
API_NOT_ENOUGH_SPACE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

int return_code = 0;
uint val = 5000;
string event_name;
return_code = trek_user_api.Get_Packet_Arrival_Event_Name(PACKET_TYPE.Pdss_Payload, "7", DATA_MODE.Real_Time, out event_name);
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
// Have an event name, now wait on it
return_code = trek_user_api.Wait_For_Packet_Arrival(out event_name, out val);
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Event_Name is {0}", event_name);
Console.ReadKey();
}
else
{
Console.WriteLine("Error getting information {0}", return_code);
// handle error (most likely TCA_WAIT_TIMEOUT)
//
Console.ReadKey();
}
event_name = null; // user must free the data
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Wait_For_Packet_Arrival([System::Runtime::InteropServices::Out]System::String^ %event_name, [System::Runtime::InteropServices::Out]System::UInt32 %timeout)
This function gets the event name associated with packet arrival. This string can be used with the Wa...
Definition: trek_user_api_dotnet.cpp:5435
static int Get_Packet_Arrival_Event_Name(PACKET_TYPE packet_type, System::String^ apid, DATA_MODE data_mode, [System::Runtime::InteropServices::Out]System::String^ %event_name)
This function gets the event name associated with packet arrival. This string can be used with the Wa...
Definition: trek_user_api_dotnet.cpp:5054

Longer examples that include this method:
None

◆ Get_Parameter_Information()

int trek::trek_user_api::Get_Parameter_Information ( PACKET_TYPE  packet_type,
System::String^  msid,
DATA_MODE  data_mode,
System::String^  processing_flag,
[System::Runtime::InteropServices::Out] measurement_properties %  meas_prop 
)
static

This function provides a way to retrieve parameter information about a MSID.

Note
This is a TReK Release 3 .NET compatible function.
Parameters
[in]packet_typeThe packet type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe MSID for the parameter.
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in]processing_flagThe processing flag. This should be one of the following: PROCESSING_FLAG_UNPROCESSED, PROCESSING_FLAG_CONVERTED, or PROCESSING_FLAG_CALIBRATED. If the packet_type is GSE, GSE_MERGE, or CDP you can pass any of the processing flags. For all other packet types you should use PROCESSING_FLAG_UNPROCESSED.
[out]meas_propThe measurement properties of the parameter. You must allocate memory for this structure. The Measurement_Properties struct is defined in the trek_user_api.h file.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_INVALID_MSID (Release 3 return code)
API_INVALID_DATA_MODE (Release 3 return code)
API_PARAMETER_NOT_FOUND (Release 3 return code)

Example:

'C#'
int return_code = 0;
String msid = new String("MSID016".ToCharArray());
measurement_properties meas_prop;
return_code = trek_user_api.Get_Parameter_Information(PACKET_TYPE.Pdss_Payload, msid, DATA_MODE.Real_Time, PROCESSING_FLAG.processing_flag_unprocessed, out meas_prop);
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS || return_code == (int)TREK_USER_API_RETURN_CODES.api_TOO_MANY_SAMPLES)
{
Console.WriteLine("Success: Data type is {0}\n", meas_prop.data_type);
Console.ReadKey();
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();
static int Get_Parameter_Information(PACKET_TYPE packet_type, System::String^ msid, DATA_MODE data_mode, System::String^ processing_flag, [System::Runtime::InteropServices::Out]measurement_properties %meas_prop)
This function provides a way to retrieve parameter information about a MSID.
Definition: trek_user_api_dotnet.cpp:4935

Longer examples that include this method:
None

◆ Get_Same_Packet_Calibrated_Double_Value()

int trek::trek_user_api::Get_Same_Packet_Calibrated_Double_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] System::UInt32 %  number_samples,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  from_this_pkt_token,
[System::Runtime::InteropServices::Out] array< System::Double >^ %  value,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  status 
)
static

This function provides a way to retrieve one or multiple samples of a parameter from the same packet as another parameter when the desired parameter is calibrated as a double.

Note
This is a TReK Release 3 ANSI-C compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]number_samplesThe number of samples that should be returned. On Input this parameter should indicate how many samples are requested. On Output the API will update this parameter to indicate how many samples were actually returned.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in]from_this_pkt_tokenThe token returned by a call to another TReK Telemetry API function such as GetOneNewestConvertedInteger or GetNextRawValue. This token is used by TReK to determine which packet to retrieve the parameter specified by the identifier. The from_this_pkt_token value is not changed.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_TOO_MANY_SAMPLES (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

string msid039 = new string("MSID039".ToCharArray());
string msid0106 = new string("MSID106".ToCharArray());
int return_code = 0;
int return_code2 = 0;
int value1 = 0;
string status1 = " ";
double[] value2 = new double[10];
string[] status2 = new string[10];
uint number_samples = 10;
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
int[] from_this_pkt_token = new int[3];
from_this_pkt_token[0] = from_this_pkt_token[1] = from_this_pkt_token[2] = 0;
return_code = trek_user_api.Get_One_Newest_Converted_Integer_Value(PACKET_TYPE.Pdss_Payload, msid039, "7", DATA_MODE.Real_Time, SENSING.No_Sense, from_this_pkt_token, out value1, out status1);
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Value {0}. Status {1}\n", value1, status1);
}
else
{
Console.WriteLine("Error: {0}", return_code);
}
return_code2 = trek_user_api.Get_Same_Packet_Calibrated_Double_Value(PACKET_TYPE.Pdss_Payload, msid0106, DATA_MODE.Real_Time, out number_samples, SENSING.No_Sense, token, from_this_pkt_token, out value2, out status2);
//Check return to see id command sent successfully
if (return_code2 == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS || return_code2 == (int)TREK_USER_API_RETURN_CODES.api_TOO_MANY_SAMPLES)
{
// Data is good. If API_TOO_MANY_SAMPLES is returned, you have not
// allocated enough space for all the data that is available.
for (int ii = 0; ii < number_samples; ii++)
Console.WriteLine("Success: Value {0}. Status {1}\n", ii, value2[ii], status2[ii]);
}
else if (return_code2 == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success getting information. More Data Available");
}
else
Console.WriteLine("Error: {0}", return_code2);
Console.ReadKey();

◆ Get_Same_Packet_Calibrated_String_Value()

int trek::trek_user_api::Get_Same_Packet_Calibrated_String_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] System::UInt32 %  number_samples,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  from_this_pkt_token,
[System::Runtime::InteropServices::Out] System::Int32  size_of_data,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  value,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  status 
)
static

This function provides a way to retrieve one or multiple samples of a parameter from the same packet as another parameter when the desired parameter is calibrated as a character string.

Note
This is a TReK Release 3 ANSI-C compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]number_samplesThe number of samples that should be returned. On Input this parameter should indicate how many samples are requested. On Output the API will update this parameter to indicate how many samples were actually returned.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in,out]size_of_dataThis field should indicate how much space you have allocated for a single sample of the data that is being returned (the largest sample). The value parameter can be used to return one or more samples of data. The size_of_data parameter indicates how much space is available to hold one of the samples in the value parameter. If the data being returned for a single sample is larger than the amount of space available for a single sample, as indicated by the size_of_data parameter, then you have not allocated enough space. In this case the API will output an error and will not fill in the value parameter. If the return code is TLM_API_LENGTH_ERR, then this value will be reset to the amount of space required to hold the sample. WARNING: If you tell the API that you have allocated enough space but you really have not, the API will believe you and will fill in the value parameter. Therefore, if there is not enough space, the API will undoubtedly overwrite some important memory and this will eventually lead to a crash. Therefore, you need to make sure that you allocate exactly what you say you are allocating.
[in]from_this_pkt_tokenThe token returned by a call to another TReK Telemetry API function such as GetOneNewestConvertedInteger or GetNextRawValue. This token is used by TReK to determine which packet to retrieve the parameter specified by the identifier. The from_this_pkt_token value is not changed.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_TOO_MANY_SAMPLES (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

string msid039 = new string("MSID039".ToCharArray());
string msid079 = new string("MSID079".ToCharArray());
int return_code = 0;
int return_code2 = 0;
int value1 = 0;
string status1 = " ";
string[] value2 = new string[10];
string[] status2 = new string[10];
uint number_samples = 10;
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
int[] from_this_pkt_token = new int[3];
from_this_pkt_token[0] = from_this_pkt_token[1] = from_this_pkt_token[2] = 0;
return_code = trek_user_api.Get_One_Newest_Converted_Integer_Value(PACKET_TYPE.Pdss_Payload, msid039, "7", DATA_MODE.Real_Time, SENSING.No_Sense, from_this_pkt_token, out value1, out status1);
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Value {0}. Status {1}\n", value1, status1);
}
else
{
Console.WriteLine("Error: {0}", return_code);
}
int size_of_data = 100;
return_code2 = trek_user_api.Get_Same_Packet_Calibrated_String_Value(PACKET_TYPE.Pdss_Payload, msid079, DATA_MODE.Real_Time, out number_samples, SENSING.No_Sense, token, from_this_pkt_token, size_of_data, out value2, out status2);
//Check return to see id command sent successfully
if (return_code2 == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS || return_code2 == (int)TREK_USER_API_RETURN_CODES.api_TOO_MANY_SAMPLES)
{
// Data is good. If API_TOO_MANY_SAMPLES is returned, you have not
// allocated enough space for all the data that is available.
for (int ii = 0; ii < number_samples; ii++)
Console.WriteLine("Success: Value {0}. Status {1}\n", ii, value2[ii], status2[ii]);
}
else if (return_code2 == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success getting information. More Data Available");
}
else
Console.WriteLine("Error: {0}", return_code2);
Console.ReadKey();

◆ Get_Same_Packet_Converted_Double_Value()

int trek::trek_user_api::Get_Same_Packet_Converted_Double_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] System::UInt32 %  number_samples,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  from_this_pkt_token,
[System::Runtime::InteropServices::Out] array< System::Double >^ %  value,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  status 
)
static

This function provides a way to retrieve one or multiple samples of a parameter from the same packet as another parameter when the desired parameter is converted as a double.

Note
This is a TReK Release 3 ANSI-C compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]number_samplesThe number of samples that should be returned. On Input this parameter should indicate how many samples are requested. On Output the API will update this parameter to indicate how many samples were actually returned.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in]from_this_pkt_tokenThe token returned by a call to another TReK Telemetry API function such as GetOneNewestConvertedInteger or GetNextRawValue. This token is used by TReK to determine which packet to retrieve the parameter specified by the identifier. The from_this_pkt_token value is not changed.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_TOO_MANY_SAMPLES (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

string msid039 = new string("MSID039".ToCharArray());
string msid0106 = new string("MSID106".ToCharArray());
int return_code = 0;
int return_code2 = 0;
int value1 = 0;
string status1 = " ";
double[] value2 = new double[10];
string[] status2 = new string[10];
uint number_samples = 10;
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
int[] from_this_pkt_token = new int[3];
from_this_pkt_token[0] = from_this_pkt_token[1] = from_this_pkt_token[2] = 0;
return_code = trek_user_api.Get_One_Newest_Converted_Integer_Value(PACKET_TYPE.Pdss_Payload, msid039, "7", DATA_MODE.Real_Time, SENSING.No_Sense, from_this_pkt_token, out value1, out status1);
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Value {0}. Status {1}\n", value1, status1);
}
else
{
Console.WriteLine("Error: {0}", return_code);
}
return_code2 = trek_user_api.Get_Same_Packet_Converted_Double_Value(PACKET_TYPE.Pdss_Payload, msid0106, DATA_MODE.Real_Time, out number_samples, SENSING.No_Sense, token, from_this_pkt_token, out value2, out status2);
//Check return to see id command sent successfully
if (return_code2 == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS || return_code2 == (int)TREK_USER_API_RETURN_CODES.api_TOO_MANY_SAMPLES)
{
// Data is good. If API_TOO_MANY_SAMPLES is returned, you have not
// allocated enough space for all the data that is available.
for (int ii = 0; ii < number_samples; ii++)
Console.WriteLine("Success: Value {0}. Status {1}\n", ii, value2[ii], status2[ii]);
}
else if (return_code2 == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success getting information. More Data Available");
}
else
Console.WriteLine("Error: {0}", return_code2);
Console.ReadKey();

◆ Get_Same_Packet_Converted_Integer_Value()

int trek::trek_user_api::Get_Same_Packet_Converted_Integer_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] System::UInt32 %  number_samples,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  from_this_pkt_token,
[System::Runtime::InteropServices::Out] array< System::Int32 >^ %  value,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  status 
)
static

This function provides a way to retrieve one or multiple samples of a parameter from the same packet as another parameter when the desired parameter is converted as an integer.

Note
This is a TReK Release 3 ANSI-C compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]number_samplesThe number of samples that should be returned. On Input this parameter should indicate how many samples are requested. On Output the API will update this parameter to indicate how many samples were actually returned.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in]from_this_pkt_tokenThe token returned by a call to another TReK Telemetry API function such as GetOneNewestConvertedInteger or GetNextRawValue. This token is used by TReK to determine which packet to retrieve the parameter specified by the identifier. The from_this_pkt_token value is not changed
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_TOO_MANY_SAMPLES (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

string msid039 = new string("MSID039".ToCharArray());
string msid0107 = new string("MSID107".ToCharArray());
int return_code = 0;
int return_code2 = 0;
int value1 = 0;
string status1=" ";
int []value2 = new int [10];
string[] status2 = new string[10];
uint number_samples = 10;
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
int[] from_this_pkt_token = new int[3];
from_this_pkt_token[0] =from_this_pkt_token[1] = from_this_pkt_token[2] = 0;
return_code = trek_user_api.Get_One_Newest_Converted_Integer_Value(PACKET_TYPE.Pdss_Payload, msid039, "7", DATA_MODE.Real_Time, SENSING.No_Sense, from_this_pkt_token, out value1, out status1);
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Value {0}. Status {1}\n", value1, status1);
}
else
{
Console.WriteLine("Error: {0}", return_code);
}
return_code2 = trek_user_api.Get_Same_Packet_Converted_Integer_Value(PACKET_TYPE.Pdss_Payload, msid0107, DATA_MODE.Real_Time, out number_samples, SENSING.No_Sense, token, from_this_pkt_token, out value2, out status2);
//Check return to see id command sent successfully
if (return_code2 == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Value {0}. Status {1}\n",value2, status2);
}
else if (return_code2 == (int)TREK_USER_API_RETURN_CODES.api_TOO_MANY_SAMPLES)
{
// Data is good. If API_TOO_MANY_SAMPLES is returned, you have not
// allocated enough space for all the data that is available.
for (int ii = 0; ii < number_samples; ii++)
Console.WriteLine("Value {1}. Status {2}\n", ii, value2[ii], status2[ii]);
}
else if (return_code2 == (int)TREK_USER_API_RETURN_CODES.api_MORE_DATA_AVAILABLE)
{
Console.WriteLine("Success getting information. More Data Available");
}
else
Console.WriteLine("Error: {0}", return_code2);
Console.ReadKey();

◆ Get_Same_Packet_Converted_String_Value()

int trek::trek_user_api::Get_Same_Packet_Converted_String_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] System::UInt32 %  number_samples,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  from_this_pkt_token,
[System::Runtime::InteropServices::Out] System::Int32  size_of_data,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  value,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  status 
)
static

This function provides a way to retrieve one or multiple samples of a parameter from the same packet as another parameter when the desired parameter is converted as a character string.

Note
This is a TReK Release 3 ANSI-C compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]number_samplesThe number of samples that should be returned. On Input this parameter should indicate how many samples are requested. On Output the API will update this parameter to indicate how many samples were actually returned.
[in,out]tokenThe token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in]from_this_pkt_tokenThe token returned by a call to another TReK Telemetry API function such as GetOneNewestConvertedInteger or GetNextRawValue. This token is used by TReK to determine which packet to retrieve the parameter specified by the identifier. The from_this_pkt_token value is not changed.
[in,out]size_of_dataThis field should indicate how much space you have allocated for a single sample of the data that is being returned (the largest sample). The value parameter can be used to return one or more samples of data. The size_of_data parameter indicates how much space is available to hold one of the samples in the value parameter. If the data being returned for a single sample is larger than the amount of space available for a single sample, as indicated by the size_of_data parameter, then you have not allocated enough space. In this case the API will output an error and will not fill in the value parameter. If the return code is TLM_API_LENGTH_ERR, then this value will be reset to the amount of space required to hold the sample. WARNING: If you tell the API that you have allocated enough space but you really have not, the API will believe you and will fill in the value parameter. Therefore, if there is not enough space, the API will undoubtedly overwrite some important memory and this will eventually lead to a crash. Therefore, you need to make sure that you allocate exactly what you say you are allocating.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_TOO_MANY_SAMPLES (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

Longer examples that include this method:
None

◆ Get_Same_Packet_Converted_Time_Value()

int trek::trek_user_api::Get_Same_Packet_Converted_Time_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] System::UInt32 %  number_samples,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  from_this_pkt_token,
[System::Runtime::InteropServices::Out] array< Trek_Time >^ %  value,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  status 
)
static

This function provides a way to retrieve one or multiple samples of a parameter from the same packet as another parameter when the desired parameter is converted as a time value. The time value is returned via a TReK_Time structure. The definition of the TReK_Time structure is located in the trek.h file. The TReK_Time structure contains a variable that is a tm_time structure. The tm_time structure is defined in the C Run-time library.

Note
This is a TReK Release 3 ANSI-C compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]number_samplesThe number of samples that should be returned. On Input this parameter should indicate how many samples are requested. On Output the API will update this parameter to indicate how many samples were actually returned.
[in,out]tokenThe token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in]from_this_pkt_tokenThe token returned by a call to another TReK Telemetry API function such as GetOneNewestConvertedInteger or GetNextRawValue. This token is used by TReK to determine which packet to retrieve the parameter specified by the identifier. The from_this_pkt_token value is not changed.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_TOO_MANY_SAMPLES (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

string msid039 = new string("MSID039".ToCharArray());
string msid128 = new string("MSID128".ToCharArray());
Trek_Time[] t_array = new Trek_Time[2];
string[] status_array = new string[10];
int return_code = 0;
int return_code2 = 0;
int value1 = 0;
string status1 = " ";
uint num_t_samples = 2;
int[] token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
int[] from_this_pkt_token = new int[3];
from_this_pkt_token[0] = from_this_pkt_token[1] = from_this_pkt_token[2] = 0;
return_code = trek_user_api.Get_One_Newest_Converted_Integer_Value(PACKET_TYPE.Pdss_Payload, msid039, "7", DATA_MODE.Real_Time, SENSING.No_Sense, from_this_pkt_token, out value1, out status1);
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Value {0}. Status {1}\n", value1, status1);
}
else
{
Console.WriteLine("Error: {0}", return_code);
}
return_code2 = trek_user_api.Get_Same_Packet_Converted_Time_Value(PACKET_TYPE.Pdss_Payload, msid128, DATA_MODE.Real_Time, out num_t_samples, token, from_this_pkt_token, out t_array, out status_array);
//Check return to see if API executed successfully
if (return_code2 == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Values is {0}:{1}. Status: {2} and {3}.\n", t_array[0].hour, t_array[1].minute, status_array[0], status_array[1]);
}
else
Console.WriteLine("Error getting information {0}", return_code2);
Console.ReadKey();

◆ Get_Same_Packet_Converted_Unsigned_Integer_Value()

int trek::trek_user_api::Get_Same_Packet_Converted_Unsigned_Integer_Value ( PACKET_TYPE  packet_type,
System::String^  msid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] System::UInt32 %  number_samples,
SENSING  limit_es_flag,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  from_this_pkt_token,
[System::Runtime::InteropServices::Out] array< System::UInt32 >^ %  value,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  status 
)
static

This function provides a way to retrieve one or multiple samples of a parameter from the same packet as another parameter when the desired parameter is converted as an unsigned integer.

Note
This is a TReK Release 3 ANSI-C compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]msidThe name of the parameter.
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]number_samplesThe number of samples that should be returned. On Input this parameter should indicate how many samples are requested. On Output the API will update this parameter to indicate how many samples were actually returned.
[in]limit_es_flagThis parameter indicates whether Limit/Expected State Sensing should be performed. The value passed in should be NO_SENSE or SENSE.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in]from_this_pkt_tokenThe token returned by a call to another TReK Telemetry API function such as GetOneNewestConvertedInteger or GetNextRawValue. This token is used by TReK to determine which packet to retrieve the parameter specified by the identifier. The from_this_pkt_token value is not changed
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

Longer examples that include this method:
None

◆ Get_Same_Packet_Raw_Value()

int trek::trek_user_api::Get_Same_Packet_Raw_Value ( PACKET_TYPE  packet_type,
PARAMETER_TYPE  parameter_type,
System::String^  identifier,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] System::UInt32 %  number_samples,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  token,
[System::Runtime::InteropServices::Out] array< System::Int32 >^  from_this_pkt_token,
[System::Runtime::InteropServices::Out] System::Int32 %  size_of_data,
[System::Runtime::InteropServices::Out] array< array< System::Byte >^>^  value,
[System::Runtime::InteropServices::Out] array< System::String^>^ %  status 
)
static

This function provides a way to retrieve one or multiple samples of a parameter as raw (unprocessed) data from the same packet as another parameter. A parameter can be an entire packet, a subset, or an MSID.

Note
This is a TReK Release 3 ANSI-C compatible function.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]parameter_typeOn a TReK System, any data aggregate is considered a parameter. Therefore packets, subsets, and MSIDs are all considered parameters. The parameter type argument identifies what type of parameter is being retrieved. The parameter_type information passed in should be one of the following values: CCSDS_PACKET, EHS_PACKET, SUBSET, or MSID. Please note that when you request to retrieve a CCSDS_PACKET, the API will return a complete CCSDS packet. This does not include the EHS header. You must pass in a parameter type of EHS_PACKET to retrieve the EHS header information.
[in]identifierThe identifier for the parameter. The identifier is based on the parameter_type and should be one of the following:
Parameter Type

Identifier Should Be A(n)

EHS_PACKET

APID

MSID

MSID (Parameter)

CCSDS_PACKET

APID

EXPRESS

Source Function Code

UFO User Assigned ID
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in,out]number_samplesThe number of samples that should be returned. On Input this parameter should indicate how many samples are requested. On Output the API will update this parameter to indicate how many samples were actually returned.
[in,out]tokenThe token. The token is an array of three long integers. It is used by the TReK system to determine whether the data being retrieved is new or stale. There must be a unique token for each unique parameter request. The first time the API function is called each element in the token array should be initialized to zero. The token that is returned by the API will contain updated data and should be saved. This data should not be altered in any way. For each new call after the first call, the token passed in should be the token that was returned by the previous call. Therefore, the token returned from each call should be saved so it can be passed in on the next call.
[in]from_this_pkt_tokenThe token returned by a call to another TReK Telemetry API function such as GetOneNewestConvertedInteger or GetNextRawValue. This token is used by TReK to determine which packet to retrieve the parameter specified by the identifier. The from_this_pkt_token value is not changed.
[in,out]size_of_dataThis field should indicate how much space you have allocated for a single sample of the data that is being returned (the largest sample). The value parameter can be used to return one or more samples of data. The size_of_data parameter indicates how much space is available to hold one of the samples in the value parameter. If the data being returned for a single sample is larger than the amount of space available for a single sample, as indicated by the size_of_data parameter, then you have not allocated enough space. In this case the API will output an error and will not fill in the value parameter. If the return code is TLM_API_LENGTH_ERR, then this value will be reset to the amount of space required to hold the sample. WARNING: If you tell the API that you have allocated enough space but you really have not, the API will believe you and will fill in the value parameter. Therefore, if there is not enough space, the API will undoubtedly overwrite some important memory and this will eventually lead to a crash. Therefore, you need to make sure that you allocate exactly what you say you are allocating.
[out]valueThe data returned. The calling application is responsible for allocating memory to hold the data returned.
[out]statusThe status string. This indicates the status of the data returned. The calling application is responsible for allocating memory to hold the status string that is returned.
Returns
SUCCESS
API_INVALID_PACKET_TYPE(Release 3 return code)
API_NOT_ENOUGH_SPACE(Release 3 return code)
API_TOO_MANY_SAMPLES(Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

string apid = new string("7".ToCharArray());
string msid039 = new string("MSID039".ToCharArray());
int first_value;
byte[][] value = new byte[1000][];
uint number_samples = 10;
string[] status = new string[10];
string first_status="";
int return_code = -1;
int[] token = new int[3];
int[] second_token = new int[3];
token[0] = token[1] = token[2] = 0; // token should always be initialized to 0.
second_token[0] = second_token[1] = second_token[2] = 0;
return_code = trek_user_api.Get_One_Newest_Converted_Integer_Value(PACKET_TYPE.Pdss_Payload, msid039, apid, DATA_MODE.Real_Time, SENSING.No_Sense, token, out first_value, out first_status);
//Check return to see id command sent successfully
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Value is {0}. Status is {1}\n", first_value, first_status);
}
else
Console.WriteLine("Error getting information {0}", return_code);
//now get another value from the same packet
int size_of_data = 1000;
for (int i = 0; i < number_samples; i++)
{
value[i] = new byte[size_of_data];
}
return_code = trek_user_api.Get_Same_Packet_Raw_Value(PACKET_TYPE.Pdss_Payload, PARAMETER_TYPE.Msid, "MSID044", DATA_MODE.Real_Time, out number_samples, second_token, token, out size_of_data, value, out status);
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Values for first two bytes are {0:X} and {1:X}. Status: {2}.\n", value[0], value[1], status);
}
else if (return_code == (int)TREK_USER_API_RETURN_CODES.api_TOO_MANY_SAMPLES)
{
Console.WriteLine("Success getting information. Too many samples (Use number_samples to find out how many are valid)");
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();

Longer examples that include this method:
None

◆ Initialize_Multiple_Parameters()

int trek::trek_user_api::Initialize_Multiple_Parameters ( PACKET_TYPE  packet_type,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] array< multiple_add_struct >^ %  add_struct,
System::Int32  number_parameters 
)
static

This function immediately returns SUCCESS.

Note
This is a TReK Release 3 ANSI-C compatible function. It was used to set up on demand processing. Since all processing in thei version of TReK is on-demad, the function is no longer needed. It immediately returns SUCCESS to all previous written user applications to work without modification.
Parameters
[in]packet_typeValue not used.
[in]data_modeValue not used.
[in]add_structValue not used.
[in]number_parametersValue not used.
Returns
SUCCESS

◆ Set_Monitor_Log_File()

int trek::trek_user_api::Set_Monitor_Log_File ( System::String^  filename)
static

This function sets the filename for writing monitoring messages for archival. The filename should include the full directory path. When the file is created a timestamp is appended to the name and a ".log" extension is added after the timestamp.

Note
This is a TReK Release 3 ANSI-C compatible function.
Parameters
[in]filenameThe filename for writing monitoring messages.
Returns
SUCCESS
TLM_API_NULL_POINTER
TCA_API_NOT_CONNECTED
TCA_WAIT_TIMEOUT

Example:

// Define Input Parameters.
int return_code;
// Set the file for logging
return_code = trek_user_api.Set_Monitor_Log_File("c:\\my_monitor.log");
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Log Set {0}", return_code);
Console.ReadKey();
}
else
{
Console.WriteLine("Error: {0}", return_code);
Console.ReadKey();
}
// Start logging monitoring messages
return_code = trek_user_api.Start_Monitor_Logging();
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Log Started {0}", return_code);
Console.ReadKey();
}
else
{
Console.WriteLine("Error: {0}", return_code);
Console.ReadKey();
}
// Turn off logging
return_code = trek_user_api.Stop_Monitor_Logging();
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Log Stopped {0}", return_code);
Console.ReadKey();
}
else
{
Console.WriteLine("Error: {0}", return_code);
Console.ReadKey();
}
static int Set_Monitor_Log_File(System::String^ filename)
This function sets the filename for writing monitoring messages for archival. The filename should inc...
Definition: trek_user_api_dotnet.cpp:5709

Longer examples that include this method:
None

◆ Start_Monitor_Logging()

int trek::trek_user_api::Start_Monitor_Logging ( )
static

This function starts logging of monitoring messages. Only messages occurring after the function call will be written to the file.

Note
This is a TReK Release 3 ANSI-C compatible function.
Returns
SUCCESS
TLM_API_NULL_POINTER
TCA_API_NOT_CONNECTED
TCA_WAIT_TIMEOUT

Example:

// Define Input Parameters.
int return_code;
// Set the file for logging
return_code = trek_user_api.Set_Monitor_Log_File("c:\\my_monitor.log");
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Log Set {0}", return_code);
Console.ReadKey();
}
else
{
Console.WriteLine("Error: {0}", return_code);
Console.ReadKey();
}
// Start logging monitoring messages
return_code = trek_user_api.Start_Monitor_Logging();
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Log Started {0}", return_code);
Console.ReadKey();
}
else
{
Console.WriteLine("Error: {0}", return_code);
Console.ReadKey();
}
// Turn off logging
return_code = trek_user_api.Stop_Monitor_Logging();
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Log Stopped {0}", return_code);
Console.ReadKey();
}
else
{
Console.WriteLine("Error: {0}", return_code);
Console.ReadKey();
}

Longer examples that include this method:
None

◆ Stop_Monitor_Logging()

int trek::trek_user_api::Stop_Monitor_Logging ( )
static

This function stops logging of monitoring messages.

Note
This is a TReK Release 3 ANSI-C compatible function.
Returns
SUCCESS
TLM_API_NULL_POINTER
TCA_API_NOT_CONNECTED
TCA_WAIT_TIMEOUT

Example:

// Define Input Parameters.
int return_code;
// Set the file for logging
return_code = trek_user_api.Set_Monitor_Log_File("c:\\my_monitor.log");
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Log Set {0}", return_code);
Console.ReadKey();
}
else
{
Console.WriteLine("Error: {0}", return_code);
Console.ReadKey();
}
// Start logging monitoring messages
return_code = trek_user_api.Start_Monitor_Logging();
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Log Started {0}", return_code);
Console.ReadKey();
}
else
{
Console.WriteLine("Error: {0}", return_code);
Console.ReadKey();
}
// Turn off logging
return_code = trek_user_api.Stop_Monitor_Logging();
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Log Stopped {0}", return_code);
Console.ReadKey();
}
else
{
Console.WriteLine("Error: {0}", return_code);
Console.ReadKey();
}

Longer examples that include this method:
None

◆ Unregister_Packet_Arrival_Event()

int trek::trek_user_api::Unregister_Packet_Arrival_Event ( PACKET_TYPE  packet_type,
System::String^  apid,
DATA_MODE  data_mode,
[System::Runtime::InteropServices::Out] System::String^ %  event_name 
)
static

Removes the specified event name associated with packet arrival.

Note
This function was not a part of the TReK Release 3 API. It is provided to make transition to Release 5 easier.
Parameters
[in]packet_typeThe stream type associated with the parameter. This should be one of the following: PDSS_PAYLOAD, PDSS_CORE, GSE, GSE_MERGE, CDP, UDSM, RPSM, SCS, CCSDS, FDP, VCDU, EXPRESS, PRCU, UFO, or IMAQ_ASCII.
[in]apidThe CCSDS application process identifier (i.e. the packet ID). If you pass in an empty string for apid, then the parameter data you have requested will be pulled from the last packet received that contains the parameter. However, if you pass in an apid instead of an empty string, the data requested will be extracted from that particular apid (packet).
[in]data_modeThe data mode. This should be one of the following: REAL_TIME, DUMP1, DUMP2, DUMP3, PLAYBACK1, PLAYBACK2, PLAYBACK3, PLAYBACK4, PLAYBACK5, PLAYBACK6, PLAYBACK7, PLAYBACK8, PLAYBACK9, PLAYBACK10, PLAYBACK11, NONE.
[in]event_nameThe event name that is no longer needed for signalling packet arrival.
Returns
SUCCESS
API_INVALID_PACKET_TYPE (Release 3 return code)
API_INVALID_APID (Release 3 return code)
API_INVALID_DATA_MODE (Release 3 return code)
API_NOT_ENOUGH_SPACE (Release 3 return code)
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR

Example:

// Define Input Parameters.
int return_code = 0;
uint val = 5000;
string event_name;
return_code = trek_user_api.Get_Packet_Arrival_Event_Name(PACKET_TYPE.Pdss_Payload, "7", DATA_MODE.Real_Time, out event_name);
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
// Have an event name, now wait on it
return_code = trek_user_api.Wait_For_Packet_Arrival(out event_name, out val);
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Event_Name is {0}", event_name);
Console.ReadKey();
}
else
{
Console.WriteLine("Error getting information {0}", return_code);
// handle error (most likely TCA_WAIT_TIMEOUT)
//
Console.ReadKey();
}
event_name = null; // user must free the data
}
return_code = trek_user_api.Unregister_Packet_Arrival_Event(PACKET_TYPE.Pdss_Payload, "7", DATA_MODE.Real_Time, out event_name);
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_FAIL)
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();

Longer examples that include this method:
None

◆ Wait_For_Packet_Arrival()

int trek::trek_user_api::Wait_For_Packet_Arrival ( [System::Runtime::InteropServices::Out] System::String^ %  event_name,
[System::Runtime::InteropServices::Out] System::UInt32 %  timeout 
)
static

This function gets the event name associated with packet arrival. This string can be used with the WaitForPacketArrival() function. When a packet arrives the WaitForPacketArrival() function releases and you can get new data from the packet.

Note
This is a TReK Release 3 ANSI-C compatible function. This function requires you to use a new function (WaitForPacketArrival()) that was not part of Release 3.
Parameters
[in]event_nameThe name of the event to wait for. Returned by GetPacketArrivalEventName().
[in]timeoutThe amount of time to wait for the event in milliseonds. A value of 0 will be an infinite wait.
Returns
SUCCESS
TLM_API_INIT_FAILED
TLM_API_TLS_NULL
TCA_API_NOT_CONNECTED
TLM_API_PKT_NAME_LEN_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_DATA_STORE_WAIT_ERR
TLM_API_LENGTH_ERR
TCA_WAIT_TIMEOUT

Example:

int return_code = 0;
uint val = 5000;
string event_name;
return_code = trek_user_api.Get_Packet_Arrival_Event_Name(PACKET_TYPE.Pdss_Payload, "7", DATA_MODE.Real_Time, out event_name);
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
// Have an event name, now wait on it
return_code = trek_user_api.Wait_For_Packet_Arrival(out event_name, out val);
if (return_code == (int)TREK_USER_API_RETURN_CODES.api_SUCCESS)
{
Console.WriteLine("Success: Event_Name is {0}", event_name);
Console.ReadKey();
}
else
{
Console.WriteLine("Error getting information {0}", return_code);
// handle error (most likely TCA_WAIT_TIMEOUT)
//
Console.ReadKey();
}
event_name = null; // user must free the data
}
else
Console.WriteLine("Error getting information {0}", return_code);
Console.ReadKey();

Longer examples that include this method:
None