#include <windows.h>
#include "MiniscopeDevice.h"
Classes | |
| struct | S_DEVICE_DLL_INTERFACE |
| Holds Dll interface version. More... | |
Defines | |
| #define | DECLARE_FN(type, fn,...) |
| Declare function or consistent function + function pointer set depending on _EXPORTING. | |
Typedefs | |
| typedef void __stdcall(* | CALLBACK_LOG )(void *cookie, char *szText) |
| Called to generate log in parent application. | |
| typedef void __stdcall(* | CALLBACK_CONNECT )(void *cookie, int state, char *szMsgText) |
| Called on connection/disconnection of device. | |
| typedef void __stdcall(* | CALLBACK_DATA )(void *cookie, void *buffer, unsigned int buffersize) |
| Called to pass data (samples) to parent application. | |
| typedef void __stdcall(* | CALLBACK_TRIGGER )(void *cookie) |
| Callback function type called when device triggers. | |
Enumerations | |
| enum | { DLL_INTERFACE_MAJOR_VERSION = 0 } |
| Dll interface version, used to dismiss outdated libraries. | |
| enum | { DLL_INTERFACE_MINOR_VERSION = 3 } |
| Dll interface version, used to dismiss outdated libraries. | |
| enum | E_CONNECTION_STATE { DEVICE_DISCONNECTED = 0, DEVICE_CONNECTING, DEVICE_CONNECTED, DEVICE_DISCONNECTING } |
| State of connection between PC and data acquisition device. | |
Functions | |
| DECLARE_FN (void, GetMiniscopeInterfaceDescription, struct S_DEVICE_DLL_INTERFACE *) | |
| Get dll interface version to check for compatibility. | |
| DECLARE_FN (int, GetMiniscopeSettings, struct S_SCOPE_SETTINGS *) | |
| Get initial settings, either default or from config file/registry/etc. | |
| DECLARE_FN (int, SaveMiniscopeSettings, struct S_SCOPE_SETTINGS *) | |
| Save settings to config file/registry/etc. | |
| DECLARE_FN (void, SetCallbacks, void *cookie, CALLBACK_LOG lpLog, CALLBACK_CONNECT lpConnect, CALLBACK_DATA lpData, CALLBACK_TRIGGER lpTrigger) | |
| Set dll callbacks (to i.e. send new data from dll to main application). | |
| DECLARE_FN (void, GetDeviceCapabilities, struct S_SCOPE_CAPABILITIES **caps) | |
| Get detailed info about device capabilities. | |
| DECLARE_FN (void, ShowSettings, HANDLE parent) | |
| Show dll specific settings window. | |
| DECLARE_FN (int, SetSensitivity, int iId) | |
| Set senstivity of device. | |
| DECLARE_FN (int, SetSamplingPeriod, int iId) | |
| Set device sampling speed. | |
| DECLARE_FN (int, SetTriggerSource, int iId) | |
| Select source of trigger for device. | |
| DECLARE_FN (int, SetTriggerLevel, int level) | |
| Set trigger level (-100%...+100% of FS). | |
| DECLARE_FN (int, SetAcqMode, int mode) | |
| DECLARE_FN (int, SetCouplingType, int iId) | |
| Set type of coupling (AC/DC/..) for device. | |
| DECLARE_FN (int, SetBufferSize, int iId) | |
| Set device acquisition buffer size. | |
| DECLARE_FN (int, SetOffset, float fOffset) | |
| Set device analog front end offset. | |
| DECLARE_FN (int, Connect, void) | |
| Connect to device. | |
| DECLARE_FN (int, Disconnect, void) | |
| Disconnect from device. | |
| DECLARE_FN (int, AcquireStart, void) | |
| DECLARE_FN (int, AcquireStop, void) | |
| DECLARE_FN (int, ManualTrigger, void) | |
| Request immediate triggering. | |
| DECLARE_FN (int, StoreCalibration, int range, int offset, float gain) | |
| Store calibration data (zero offset and sensitivity coefficient) for specified sensitivity range. | |
| DECLARE_FN (int, GetCalibration, int range, int *const offset, float *const gain) | |
| Get calibration data for specified sensitivity range. | |
| #define DECLARE_FN | ( | type, | |||
| fn, | |||||
| ... | ) |
Value:
__declspec(dllimport) type __stdcall fn(__VA_ARGS__); \
typedef type __stdcall (*pf##fn)(__VA_ARGS__)
| typedef void __stdcall(* CALLBACK_CONNECT)(void *cookie, int state, char *szMsgText) |
Called on connection/disconnection of device.
| cookie | Holds internal data of callee (upper layer) | |
| state | Current state of device ( |
| szMsgText | Additional text (if applicable) |
| typedef void __stdcall(* CALLBACK_DATA)(void *cookie, void *buffer, unsigned int buffersize) |
Called to pass data (samples) to parent application.
| cookie | Holds internal data of callee (upper layer) | |
| buffer | Pointer to samples buffer. Buffer should be allocated and released by library | |
| buffersize | Size in bytes of buffer (or it's part that holds valid data) |
| typedef void __stdcall(* CALLBACK_LOG)(void *cookie, char *szText) |
Called to generate log in parent application.
| cookie | Holds internal data of callee (upper layer) | |
| szText | Text to add to log |
| typedef void __stdcall(* CALLBACK_TRIGGER)(void *cookie) |
Callback function type called when device triggers.
| cookie | Holds internal data of callee (upper layer) |
1.5.9