I have the following enum defined in C++ API:
typedef enum RESULT_ENUM
{
SUCCESS,
ERR_INVALID_PORT_DEFINITION,
ERR_TOO_MANY_SAMPLES,
ERR_RECORDING_THREAD_ALREADY_RUNNING,
ERR_RECORDING_WITHOUT_APPLY_SETTINGS,
...
}RESULT;
I have a program in C++ that uses the API and creating:
RESULT res;
Then it uses functions from the API to set values inside res
, for example:
res = SetProfile(APP_PROFILE);
res = SetDynamicImageFilter(filterType);
res = StartCalibration();
I want to create a Python program that does the same (literally), using ctypes.
How do I translate RESULT res;
in a pythonic way? How do I make it contain the
desired results from the functions?
EDIT:
Those functions return values that match the RESULT
enumerators. I want to get those enumerators in Python, How can I do that? I'm currently getting numbers corresponding to the enumerators values.