TReK C++  5.3.3
Telemetry/Command API
trek::CommandResponse Class Reference

This class holds all of the responses associated with a single command uplink. More...

#include <command_response.h>

Public Member Functions

Constructors, Destructor, and Other Basic Methods
 CommandResponse ()
 Default constructor of the class.
 
virtual ~CommandResponse ()
 Class destructor. More...
 
int32_t GetErrorDetails (uint32_t error, response_info *resp_info_ptr)
 Copies the details about an error. More...
 

Detailed Description

This class holds all of the responses associated with a single command uplink.

Examples
cmd_api_cpp/cmd_api_cpp_main.cpp.

Constructor & Destructor Documentation

◆ ~CommandResponse()

trek::CommandResponse::~CommandResponse ( )
virtual

Class destructor.

Removes all resources created with this instance of the class.

Member Function Documentation

◆ GetErrorDetails()

int32_t trek::CommandResponse::GetErrorDetails ( uint32_t  error,
response_info *  resp_info_ptr 
)

Copies the details about an error.

If the error value is found, the information about the error is copied.

Parameters
[in]errorThe error number to find
[out]resp_info_ptrMemory to hold results
Returns
SUCCESS
CMD_API_DOES_NOT_EXIST

Example:

CommandResponse response;
response_info resp_info
response.GetErrorDetails( 10, &resp_info );
if( ret_value == SUCCESS )
printf( "Error: %s\n", resp_info.info );
track.Update( item );
This class holds all of the responses associated with a single command uplink.
Definition: command_response.h:28
int32_t GetErrorDetails(uint32_t error, response_info *resp_info_ptr)
Copies the details about an error.
Definition: command_response.cpp:81
#define SUCCESS
The function completed successfully.
Definition: trek_error.h:8