Wrapper in Python linking to .dll and simple test script
Budget: £20 – £250 GBP
We have a device which works on Windows with a .dll. By calling the functions in the .dll, we can control the device and get data from it.
We want to create a wrapper in Python so Python programmers can use the device easily. Below is an extract from the .h file for the .dll showing the functions that we want the wrapper to call.
FT_HANDLE SENSOR_DLL usb_initialize(char * snum);
int SENSOR_DLL usb_deinit(FT_HANDLE ftHandle);
int SENSOR_DLL usb_dll_revision(unsigned int *revision);
int SENSOR_DLL usb_read_image(FT_HANDLE ftHandle, IMAGE_PACKET_T *buff, unsigned int timeout);
int SENSOR_DLL usb_set_gain(FT_HANDLE ftHandle, GAIN_STATE data);
int SENSOR_DLL usb_set_trig_mode(FT_HANDLE ftHandle, TRIG_MODE mode);
int SENSOR_DLL usb_set_interval(FT_HANDLE ftHandle, uint32_t data);
Once you've made the wrapper, we'd like you to make a Python script which calls the Python wrapper versions of these calls in this order
usb_initialize
usb_set_interval
usb_read_image
usb_deinit
and writes the data from usb_read_image onto the terminal window as text.
I'll need to do a Zoom video call so you can show me how to use it. I haven't done Python programming before. I have installed Python already so the call should take under 30 mins I hope!
We want to create a wrapper in Python so Python programmers can use the device easily. Below is an extract from the .h file for the .dll showing the functions that we want the wrapper to call.
FT_HANDLE SENSOR_DLL usb_initialize(char * snum);
int SENSOR_DLL usb_deinit(FT_HANDLE ftHandle);
int SENSOR_DLL usb_dll_revision(unsigned int *revision);
int SENSOR_DLL usb_read_image(FT_HANDLE ftHandle, IMAGE_PACKET_T *buff, unsigned int timeout);
int SENSOR_DLL usb_set_gain(FT_HANDLE ftHandle, GAIN_STATE data);
int SENSOR_DLL usb_set_trig_mode(FT_HANDLE ftHandle, TRIG_MODE mode);
int SENSOR_DLL usb_set_interval(FT_HANDLE ftHandle, uint32_t data);
Once you've made the wrapper, we'd like you to make a Python script which calls the Python wrapper versions of these calls in this order
usb_initialize
usb_set_interval
usb_read_image
usb_deinit
and writes the data from usb_read_image onto the terminal window as text.
I'll need to do a Zoom video call so you can show me how to use it. I haven't done Python programming before. I have installed Python already so the call should take under 30 mins I hope!