![]() |
Hermes SDK 1.0.1A
|
Functions | |
HermesReturn | HermesConstr (Hermes_H *Hermes_in, CameraMode m, char *Device_ID) |
HermesReturn | HermesDestr (Hermes_H Hermes) |
void | PrintErrorCode (FILE *fout, const char *FunName, HermesReturn retcode) |
Functions to construct and destruct Hermes objects, and for error handling.
HermesReturn HermesConstr | ( | Hermes_H * | Hermes_in, |
CameraMode | m, | ||
char * | Device_ID | ||
) |
Constructor.
It allocates a memory block to contain all the information and buffers required by the Hermes. If multiple devices are connected to the computer, a unique camera ID should be provided to correctly identify the camera. The camera ID can be found in the camera documentation (9 numbers and a letter) and a list of connected device is printed on the screen upon calling this function. An empty string is accepted too. In this case, the first device on the list will be connected.
Hermes_in | Pointer to Hermes handle |
m | Camera Working mode |
Device_ID | Unique ID to identify the connected device |
HermesReturn HermesDestr | ( | Hermes_H | Hermes | ) |
Destructor.
It deallocates the memory block which contains all the information and buffers required by the Hermes. WARNING the user must call the destructor before the end of the program to avoid memory leaks.
Hermes | Hermes handle |
void PrintErrorCode | ( | FILE * | fout, |
const char * | FunName, | ||
HermesReturn | retcode | ||
) |
Print an error message.
All the SDK functions return an error code to inform the user whether the issued command was successfully executed or not. The result of the execution of a function can be redirect to a text file by providing a valid file pointer.
fout | Output text file |
FunName | Additional text to define the warning/error. Usually the name of the calling function is provided. |
retcode | Error code returned by a SDK command |