Harlequin RIP SDK

Utility functions for manipulating HVD elements. More...

#include "std.h"
#include "rrevents.h"
#include "hvdlib.h"

Functions

void HVD_id_from_hex (const uint8 hex_id[16 *2], uint8 id[16])
 Calculate a raw eHVD element ID from its hexadecimal representation. More...
 
void HVD_id_to_hex (const uint8 id[16], uint8 hex_id[16 *2+1])
 Convert the raw form of an element ID to a hexadecimal string. More...
 
HqnResult HVD_result_translate (HVD_result result)
 Convert an HVD result to an HqnResult success or error code. More...
 

Detailed Description

Utility functions for manipulating HVD elements.

Function Documentation

◆ HVD_id_from_hex()

void HVD_id_from_hex ( const uint8  hex_id[16 *2],
uint8  id[16] 
)

Calculate a raw eHVD element ID from its hexadecimal representation.

Parameters
[in]hex_idThe hex representation of an eHVD element ID. This must be RR_ELEMENT_ID_LENGTH * 2 bytes long.
[out]idOverwritten with the binary representation of an eHVD element ID. This must have space for RR_ELEMENT_ID_LENGTH bytes.

◆ HVD_id_to_hex()

void HVD_id_to_hex ( const uint8  id[16],
uint8  hex_id[16 *2+1] 
)

Convert the raw form of an element ID to a hexadecimal string.

Parameters
[in]idThe binary element ID. This must have be RR_ELEMENT_ID_LENGTH bytes long.
[out]hex_idOverwritten with the hexadecimal string equivalent of the element ID. This must be RR_ELEMENT_ID_LENGTH * 2 + 1 bytes long. A terminating NUL is written at the end of the hexadecimal string.

◆ HVD_result_translate()

HqnResult HVD_result_translate ( HVD_result  result)

Convert an HVD result to an HqnResult success or error code.

Parameters
[in]resultThe result from an HVD
Returns
A well-formed HqnResult error code.

Any HVD_result less than or equal to HVD_SUCCESS is translated to HQN_RESULT_SUCCESS (0).

Any HVD_result greater than or equal to MON_CLASS_ERROR is left as-is.

Other HVD_result error codes are translated to MON_CLASS_ERROR values.