TReK .NET Framework  5.3.3
Telemetry/Command API
trek_user_api.h File Reference

The ANSI C version of the TReK Release API (trek_user_api). More...

#include <time.h>
#include "trek_error.h"

Macros

#define API_INVALID_PACKET_TYPE   35001
 The packet type is not one of the allowed types: PDSS_PAYLOAD, GSE, CCSDS, SCS, PRCU, EXPRESS, GSE_MERGE, UFO, PDSS_CORE.
 
#define API_INVALID_PARAMETER_TYPE   35002
 The parameter type is not of of the allowed types: EHS_PACKET, CCSDS_PACKET, MSID, EXPRESS, or UFO.
 
#define API_INVALID_MSID   35004
 The parameter name is not valid.
 
#define API_INVALID_DATA_MODE   35005
 The data mode is not one of the allowed modes.
 
#define API_INVALID_APID   35006
 The APID is outside of the allowed range.
 
#define API_TOO_MANY_SAMPLES   35007
 Not considered an error. Returned if the number of samples available is less than the number of samples requested.
 
#define API_PARAMETER_NOT_FOUND   35008
 Parameter not found. Check the spelling of the parameter name. Also check that the packet type and data mode are correct.
 
#define API_NO_DATA_AVAILABLE   35010
 Returned if there is no data available. This can occur when a packet has been initialized, but the TReK system has not yet received any packets of data containing the parameter.
 
#define API_NO_NEW_DATA   35012
 Returned if there is no new data available.
 
#define API_CALIBRATION_NOT_DEFINED   35013
 Calibration is not defined for this parameter.
 
#define API_INCORRECT_DATATYPE   35014
 Returned if the data to be returned is not the correct datatype. For example, if using GetOne...IntegerValue() and data was actually a string then this error would be returned because this function only returns integer data.
 
#define API_NOT_ENOUGH_SPACE   35016
 The memory allocated for the returned value is not large enough. Check the returned size of data to see what is the minimum needed.
 
#define API_INVALID_LIMIT_ES_FLAG   35020
 The limit/expected state (LES) flag must be 0 (No LES sensing) or 1 (Check for LES errors)
 
#define API_MEMORY_ERROR   35022
 General memory error. Could indicate a problem with data definition.
 
#define API_DATA_SIZE_ERROR   35023
 Error associated with data size. Check metadata definition for accuracy.
 
#define API_MORE_DATA_AVAILABLE   35024
 Returned if there is more data available for this parameter. This indicates that another GetNext... call can be made to retrieve new data.
 
#define API_WAIT_FAILED   35029
 The API failed while waiting for TReK to return data. If you see this error, please contact the TReK help desk.
 
#define API_WAIT_ABANDONED   35030
 The API abandoned waiting for TReK to return data. If you see this error, please contact the TReK help desk.
 
#define API_WAIT_TIMEOUT   35031
 The API timed out while waiting for TReK to return data. This error could indicate that your computer is unable to process the amount of data being requested.
 
#define API_ERROR_ATTACHING_THREAD   35032
 Not used anymore.
 
#define API_UNKNOWN_RETURN_CODE   35033
 Not used anymore. The 'unknown' return code is passed back for help in understanding problems.
 

Functions

Raw/Unprocessed Data API Functions

This section addresses functions that can be used to retreive raw data. There are functions to retrieve raw data for an entire packet, a subset, or an MSID.

int EXPORT_THIS_ANSI_C_FUNCTION GetOneNewestRawValue (int packet_type, int parameter_type, const char *identifier, const char *apid, int data_mode, long *token, long *size_of_data, unsigned char *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetOneNextRawValue (int packet_type, int parameter_type, const char *identifier, const char *apid, int data_mode, long *token, long *size_of_data, unsigned char *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetOneSamePacketRawValue (int packet_type, int parameter_type, const char *identifier, int data_mode, long *token, long *from_this_pkt_token, long *size_of_data, unsigned char *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetNewestRawValue (int packet_type, int parameter_type, const char *identifier, const char *apid, int data_mode, unsigned long *number_samples, long *token, long *size_of_data, unsigned char **value, char **status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetNextRawValue (int packet_type, int parameter_type, const char *identifier, const char *apid, int data_mode, unsigned long *number_samples, long *token, long *size_of_data, unsigned char **value, char **status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetSamePacketRawValue (int packet_type, int parameter_type, const char *identifier, int data_mode, unsigned long *number_samples, long *token, long *from_this_pkt_token, long *size_of_data, unsigned char **value, char **status)
 
Converted Data API Functions

This section addresses functions that can be used to retrieve converted data. Each function is designed to retrieve data of a particular data type.

int EXPORT_THIS_ANSI_C_FUNCTION GetOneNewestConvertedIntegerValue (int packet_type, const char *msid, const char *apid, int data_mode, int limit_es_flag, long *token, long *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetOneNewestConvertedUnsignedIntegerValue (int packet_type, const char *msid, const char *apid, int data_mode, int limit_es_flag, long *token, unsigned long *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetOneNewestConvertedDoubleValue (int packet_type, const char *msid, const char *apid, int data_mode, int limit_es_flag, long *token, double *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetOneNewestConvertedStringValue (int packet_type, const char *msid, const char *apid, int data_mode, long *token, long *size_of_data, char *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetOneNewestConvertedTimeValue (int packet_type, const char *msid, const char *apid, int data_mode, long *token, TReK_Time *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetOneNewestConvertedTimeStringValue (int packet_type, const char *msid, const char *apid, int data_mode, long *token, long *size_of_data, char *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetOneNextConvertedIntegerValue (int packet_type, const char *msid, const char *apid, int data_mode, int limit_es_flag, long *token, long *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetOneNextConvertedUnsignedIntegerValue (int packet_type, const char *msid, const char *apid, int data_mode, int limit_es_flag, long *token, unsigned long *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetOneNextConvertedDoubleValue (int packet_type, const char *msid, const char *apid, int data_mode, int limit_es_flag, long *token, double *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetOneNextConvertedStringValue (int packet_type, const char *msid, const char *apid, int data_mode, long *token, long *size_of_data, char *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetOneNextConvertedTimeValue (int packet_type, const char *msid, const char *apid, int data_mode, long *token, TReK_Time *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetOneNextConvertedTimeStringValue (int packet_type, const char *msid, const char *apid, int data_mode, long *token, long *size_of_data, char *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetOneSamePacketConvertedIntegerValue (int packet_type, const char *msid, int data_mode, int limit_es_flag, long *token, long *from_this_pkt_token, long *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetOneSamePacketConvertedUnsignedIntegerValue (int packet_type, const char *msid, int data_mode, int limit_es_flag, long *token, long *from_this_pkt_token, unsigned long *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetOneSamePacketConvertedDoubleValue (int packet_type, const char *msid, int data_mode, int limit_es_flag, long *token, long *from_this_pkt_token, double *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetOneSamePacketConvertedStringValue (int packet_type, const char *msid, int data_mode, long *token, long *from_this_pkt_token, long *size_of_data, char *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetOneSamePacketConvertedTimeValue (int packet_type, const char *msid, int data_mode, long *token, long *from_this_pkt_token, TReK_Time *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetOneSamePacketConvertedTimeStringValue (int packet_type, const char *msid, int data_mode, long *token, long *from_this_pkt_token, long *size_of_data, char *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetNewestConvertedIntegerValue (int packet_type, const char *msid, const char *apid, int data_mode, unsigned long *number_samples, int limit_es_flag, long *token, long *value, char **status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetNewestConvertedUnsignedIntegerValue (int packet_type, const char *msid, const char *apid, int data_mode, unsigned long *number_samples, int limit_es_flag, long *token, unsigned long *value, char **status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetNewestConvertedDoubleValue (int packet_type, const char *msid, const char *apid, int data_mode, unsigned long *number_samples, int limit_es_flag, long *token, double *value, char **status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetNewestConvertedStringValue (int packet_type, const char *msid, const char *apid, int data_mode, unsigned long *number_samples, long *token, long *size_of_data, char **value, char **status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetNewestConvertedTimeValue (int packet_type, const char *msid, const char *apid, int data_mode, unsigned long *number_samples, long *token, TReK_Time *value, char **status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetNextConvertedIntegerValue (int packet_type, const char *msid, const char *apid, int data_mode, unsigned long *number_samples, int limit_es_flag, long *token, long *value, char **status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetNextConvertedUnsignedIntegerValue (int packet_type, const char *msid, const char *apid, int data_mode, unsigned long *number_samples, int limit_es_flag, long *token, unsigned long *value, char **status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetNextConvertedDoubleValue (int packet_type, const char *msid, const char *apid, int data_mode, unsigned long *number_samples, int limit_es_flag, long *token, double *value, char **status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetNextConvertedStringValue (int packet_type, const char *msid, const char *apid, int data_mode, unsigned long *number_samples, long *token, long *size_of_data, char **value, char **status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetNextConvertedTimeValue (int packet_type, const char *msid, const char *apid, int data_mode, unsigned long *number_samples, long *token, TReK_Time *value, char **status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetSamePacketConvertedIntegerValue (int packet_type, const char *msid, int data_mode, unsigned long *number_samples, int limit_es_flag, long *token, long *from_this_pkt_token, long *value, char **status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetSamePacketConvertedUnsignedIntegerValue (int packet_type, const char *msid, int data_mode, unsigned long *number_samples, int limit_es_flag, long *token, long *from_this_pkt_token, unsigned long *value, char **status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetSamePacketConvertedDoubleValue (int packet_type, const char *msid, int data_mode, unsigned long *number_samples, int limit_es_flag, long *token, long *from_this_pkt_token, double *value, char **status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetSamePacketConvertedStringValue (int packet_type, const char *msid, int data_mode, unsigned long *number_samples, long *token, long *from_this_pkt_token, long *size_of_data, char **value, char **status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetSamePacketConvertedTimeValue (int packet_type, const char *msid, int data_mode, unsigned long *number_samples, long *token, long *from_this_pkt_token, TReK_Time *value, char **status)
 
Calibrated Data API Functions

This section addresses functions that can be used to retrieve converted data. Each function is designed to retrieve data of a particular data type.

int EXPORT_THIS_ANSI_C_FUNCTION GetOneNewestCalibratedDoubleValue (int packet_type, const char *msid, const char *apid, int data_mode, int limit_es_flag, long *token, double *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetOneNewestCalibratedStringValue (int packet_type, const char *msid, const char *apid, int data_mode, int limit_es_flag, long *token, long *size_of_data, char *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetOneNextCalibratedDoubleValue (int packet_type, const char *msid, const char *apid, int data_mode, int limit_es_flag, long *token, double *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetOneNextCalibratedStringValue (int packet_type, const char *msid, const char *apid, int data_mode, int limit_es_flag, long *token, long *size_of_data, char *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetOneSamePacketCalibratedDoubleValue (int packet_type, const char *msid, int data_mode, int limit_es_flag, long *token, long *from_this_pkt_token, double *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetOneSamePacketCalibratedStringValue (int packet_type, const char *msid, int data_mode, int limit_es_flag, long *token, long *from_this_pkt_token, long *size_of_data, char *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetNewestCalibratedDoubleValue (int packet_type, const char *msid, const char *apid, int data_mode, unsigned long *number_samples, int limit_es_flag, long *token, double *value, char **status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetNewestCalibratedStringValue (int packet_type, const char *msid, const char *apid, int data_mode, unsigned long *number_samples, int limit_es_flag, long *token, long *size_of_data, char **value, char **status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetNextCalibratedDoubleValue (int packet_type, const char *msid, const char *apid, int data_mode, unsigned long *number_samples, int limit_es_flag, long *token, double *value, char **status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetNextCalibratedStringValue (int packet_type, const char *msid, const char *apid, int data_mode, unsigned long *number_samples, int limit_es_flag, long *token, long *size_of_data, char **value, char **status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetSamePacketCalibratedDoubleValue (int packet_type, const char *msid, int data_mode, unsigned long *number_samples, int limit_es_flag, long *token, long *from_this_pkt_token, double *value, char **status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetSamePacketCalibratedStringValue (int packet_type, const char *msid, int data_mode, unsigned long *number_samples, int limit_es_flag, long *token, long *from_this_pkt_token, long *size_of_data, char **value, char **status)
 
General API Functions

These functions do not fit in the other categories.

int EXPORT_THIS_ANSI_C_FUNCTION GetAPIReturnCodeAsString (int api_code, long size_of_data, char *message)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetPacketArrivalEventName (int packet_type, const char *apid, int data_mode, char **event_name)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetParameterInformation (int packet_type, const char *msid, int data_mode, const char *processing_flag, Measurement_Properties *meas_prop)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetNewestDatazone (int packet_type, const char *apid, int data_mode, long *token, long *size_of_data, unsigned char *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetNextDatazone (int packet_type, const char *apid, int data_mode, long *token, long *size_of_data, unsigned char *value, char *status)
 
int EXPORT_THIS_ANSI_C_FUNCTION WaitForPacketArrival (const char *event_name, unsigned int timeout)
 
int EXPORT_THIS_ANSI_C_FUNCTION UnregisterPacketArrivalEvent (int packet_type, const char *apid, int data_mode, const char *event_name)
 
int EXPORT_THIS_ANSI_C_FUNCTION InitializeMultipleParameters (int packet_type, int data_mode, Multiple_Add_Struct *add_struct, unsigned long number_parameters)
 
int EXPORT_THIS_ANSI_C_FUNCTION GetOverallStatus (int packet_type, const char *msid, int data_mode, const long *token, unsigned long *overall_status)
 
int EXPORT_THIS_ANSI_C_FUNCTION SetMonitorLogFile (const char *filename)
 
int EXPORT_THIS_ANSI_C_FUNCTION StartMonitorLogging ()
 
int EXPORT_THIS_ANSI_C_FUNCTION StopMonitorLogging ()
 

Detailed Description

The ANSI C version of the TReK Release API (trek_user_api).