Libraries
trek::TrackItem Class Reference

This class holds all of the responses associated with a single command uplink. Only methods that are expected to be used by user applications are documented. More...

#include <track_item.h>

Public Member Functions

uint32_t GetToken ()
 Returns the token associated with the command uplink. More...
 
const char * GetCommandName ()
 Returns the command name associated with the uplink. More...
 
TrekTimeGetUplinkTime ()
 Returns the time associated with the command uplink. More...
 
uint32_t GetNumberOfResponses ()
 Returns the number of responses available. More...
 
int32_t GetResponse (uint32_t index, struct response_item &item)
 Gets the information about the specified response. More...
 
Constructors, Destructor, and Other Basic Methods
 TrackItem ()
 Default constructor of the class.
 
virtual ~TrackItem ()
 Class destructor. More...
 

Detailed Description

This class holds all of the responses associated with a single command uplink. Only methods that are expected to be used by user applications are documented.

Examples:
cmd_api_cpp/cmd_api_cpp_main.cpp.

Constructor & Destructor Documentation

◆ ~TrackItem()

trek::TrackItem::~TrackItem ( )
virtual

Class destructor.

Removes all resources created with this instance of the class.

Member Function Documentation

◆ GetCommandName()

const char * trek::TrackItem::GetCommandName ( )

Returns the command name associated with the uplink.

Example:

TrackItem item;
printf( "Command is %s\n", item.GetCommandName() );

◆ GetNumberOfResponses()

uint32_t trek::TrackItem::GetNumberOfResponses ( )

Returns the number of responses available.

Example:

TrackItem item;
struct response_item resp_item;
for( uint32_t ii = 0; ii < item.GetNumberOfResponses(); ii++ )
{
item.GetResponse( ii, resp_item );
printf( "Response Name: %s\n, resp_item.name );
}
Examples:
cmd_api_cpp/cmd_api_cpp_main.cpp.

◆ GetResponse()

int32_t trek::TrackItem::GetResponse ( uint32_t  index,
struct response_item &  item 
)

Gets the information about the specified response.

Example:

TrackItem item;
struct response_item resp_item;
for( uint32_t ii = 0; ii < item.GetNumberOfResponses(); ii++ )
{
item.GetResponse( ii, resp_item );
printf( "Response Name: %s\n, resp_item.name );
}
Examples:
cmd_api_cpp/cmd_api_cpp_main.cpp.

◆ GetToken()

uint32_t trek::TrackItem::GetToken ( )

Returns the token associated with the command uplink.

Example:

TrackItem item;
uint32_t token = item.GetToken();

◆ GetUplinkTime()

TrekTime & trek::TrackItem::GetUplinkTime ( )

Returns the time associated with the command uplink.

Example:

TrackItem item;
TrekTime uplink_itme = item.GetUplinkTime();
char time_as_str[50];
uint32_t size_of_output = 50;
if( my_time.GetTime( time_as_str, &size_of_output, true, false ) == SUCCESS )
printf( "Time command was uplinked: %s\n", time_as_str );