TReK ANSI-C
5.3.2
All ANSI-C APIs
|
An ANSI C HPEG API. More...
Functions | |
int EXPORT_THIS_HPEG_C_FUNCTION | CleanseHpegApi () |
Removes resources no longer needed by the API. More... | |
int EXPORT_THIS_HPEG_C_FUNCTION | GetHpegStatusValue (const char *requested_value, char *value, unsigned int available_space) |
Get a value for one of the HPEG status items. More... | |
int EXPORT_THIS_HPEG_C_FUNCTION | GetHpegDestinationList (char ***dest_list, unsigned int *num_returned) |
Gets a list of all of the destinations available for HPEG. More... | |
int EXPORT_THIS_HPEG_C_FUNCTION | GetHpegDestinationStatusValue (const char *dest_name, const char *requested_value, char *value, unsigned int available_space) |
Get a value for one of the HPEG destination status items. More... | |
void EXPORT_THIS_HPEG_C_FUNCTION | FreeHpegDestinationList (char **dest_list, unsigned int num_items) |
Frees the memory created in GetHpegDestinationList. More... | |
int EXPORT_THIS_HPEG_C_FUNCTION | GetHpegDtnGatewayList (char ***gw_list, unsigned int *num_returned) |
Gets a list of all of the DTN gateways available for HPEG. More... | |
int EXPORT_THIS_HPEG_C_FUNCTION | GetHpegDtnGatewayStatusValue (const char *gw_name, const char *requested_value, char *value, unsigned int available_space) |
Get a value for one of the HPEG DTN gateway status items. More... | |
void EXPORT_THIS_HPEG_C_FUNCTION | FreeHpegDtnGatewayList (char **gw_list, unsigned int num_items) |
Frees the memory created in GetHpegDtnGatewayList. More... | |
An ANSI C HPEG API.
int EXPORT_THIS_HPEG_C_FUNCTION CleanseHpegApi | ( | ) |
Removes resources no longer needed by the API.
If a program incorporating this API does not exit normally, it is possible for unneeded memory and threads to exist within the TReK HPEG process. Calling this function will search for any unused resources and free them. It is suggested that users of the HPEG API call this function as part of the initialization of the applications incorporating the API.
Example:
void EXPORT_THIS_HPEG_C_FUNCTION FreeHpegDestinationList | ( | char ** | dest_list, |
unsigned int | num_items | ||
) |
Frees the memory created in GetHpegDestinationList.
[in] | dest_list | A list destinations returned from GetHpegDestinationList(). |
[in] | num_items | The number of destinations returned by GetHpegDestinationList(). |
Example:
void EXPORT_THIS_HPEG_C_FUNCTION FreeHpegDtnGatewayList | ( | char ** | gw_list, |
unsigned int | num_items | ||
) |
Frees the memory created in GetHpegDtnGatewayList.
[in] | gw_list | A list of gateways returned from GetHpegDtnGatewayList(). |
[in] | num_items | The number of gateways returned by GetHpegDtnGatewayList(). |
Example:
int EXPORT_THIS_HPEG_C_FUNCTION GetHpegDestinationList | ( | char *** | dest_list, |
unsigned int * | num_returned | ||
) |
Gets a list of all of the destinations available for HPEG.
[out] | dest_list | A list of all destinations available in HPEG. This function will allocate memory and the user of the function is responsible for deleting the memory when no longer needed by calling FreeHpegDestinationList(). |
[out] | num_returned | The number of destinations returned in dest_list. |
Example:
int EXPORT_THIS_HPEG_C_FUNCTION GetHpegDestinationStatusValue | ( | const char * | dest_name, |
const char * | requested_value, | ||
char * | value, | ||
unsigned int | available_space | ||
) |
Get a value for one of the HPEG destination status items.
[in] | dest_name | The name of the destination for which the information is requested. |
[in] | requested_value | One of the values in the table below. |
[out] | value | A valid character array to hold the returned value. The user of this function is responsible for memory allocation. |
[in] | available_space | The number of valid bytes associated with the value parameter. |
Request String | Description |
DestProxyIpAddress | The proxy IP address used to communicate with this destination. Value will either be a valid IP address or blank. A blank value indicates that the session has not been started. |
DestSpaceNodeId | Indicates the space node identifier for this destination. If no space node identifier is associated with the destination, the value will be blank. |
DestStatus | The status for the destination (Active or Inactive). |
DestEnablement | Indicates if communication for the destination is enabled or disabled. |
DestForwardLink | Indicates if the forward link is AOS or LOS. For destinations that don't provide the status it will be listed as N/A (not available). |
DestReturnLink | Indicates if the return link is AOS or LOS. For destinations that don't provide the status it will be listed as N/A (not available). |
DestLocation | String that lists the current location of the payload. |
Example:
int EXPORT_THIS_HPEG_C_FUNCTION GetHpegDtnGatewayList | ( | char *** | gw_list, |
unsigned int * | num_returned | ||
) |
Gets a list of all of the DTN gateways available for HPEG.
[out] | gw_list | A list of all DTN gateways available in HPEG. This function will allocate memory and the user of the function is responsible for deleting the memory when no longer needed by calling FreeHpegDtnGatewayList(). |
[out] | num_returned | The number of DTN gateways returned in gw_list. |
Example:
int EXPORT_THIS_HPEG_C_FUNCTION GetHpegDtnGatewayStatusValue | ( | const char * | dest_name, |
const char * | requested_value, | ||
char * | value, | ||
unsigned int | available_space | ||
) |
Get a value for one of the HPEG DTN gateway status items.
[in] | gw_name | The name of the gateway for which the information is requested. |
[in] | requested_value | One of the values in the table below. |
[out] | value | A valid character array to hold the returned value. The user of this function is responsible for memory allocation. |
[in] | available_space | The number of valid bytes associated with the value parameter. |
HoscDtnNodeNumber | The node number for the HOSC DTN server. If your login does not use DTN this value will be blank. |
HoscDtnNodeIpAddress | The IP address for the HOSC DTN server. If your login does not use DTN this value will be blank. |
HoscDtnNodePort | The port number for HOSC DTN connections. If your login does not use DTN this value will be blank. |
Example:
int EXPORT_THIS_HPEG_C_FUNCTION GetHpegStatusValue | ( | const char * | requested_value, |
char * | value, | ||
unsigned int | available_space | ||
) |
Get a value for one of the HPEG status items.
[in] | requested_value | One of the values in the table below. |
[out] | value | A valid character array to hold the returned value. The user of this function is responsible for memory allocation. |
[in] | available_space | The number of valid bytes associated with the value parameter. |
Request String | Description |
HpegUser | Indicates if the user is enabled for HPEG. Returned value will be either Enabled or Disabled. |
HpegCommanding | Indicates if the POIC is enabled for HPEG. Returned value will be either Enabled or Disabled. |
KuForward | Indicates if the forward link is available for Ku-Band. Returned value will be either AOS or LOS. |
KuReturn | Indicates if the return link is available for Ku-Band. Returned value will be either AOS or LOS. |
Increment | The increment for your current login. |
OperationalMode | The operational support mode for your current login. |
IdleCheck | Indicates if the POIC is checking for inactivity on sessions to your payloads. Returned value will be either Enabled or Disabled. |
GroundNodeId | The ground node identfier associated with your login. If no ground node identifier is associated with the login the value will be blank. |
OnboardProxyIpAddress | The onboard proxy IP address assocatied with your login. |
HoscDtnNodeNumber | Deprecated. Use GetHpegDtnGatewayStatusValue to retrieve this value. |
HoscDtnNodeIpAddress | Deprecated. Use GetHpegDtnGatewayStatusValue to retrieve this value. |
HoscDtnNodePort | Deprecated. Use GetHpegDtnGatewayStatusValue to retrieve this value. |
Example: