5 #ifndef LIBSHARED_AND_STATIC_EXPORT_H 6 #define LIBSHARED_AND_STATIC_EXPORT_H 8 #ifndef AS_CORE_LIBRARY 9 #ifdef LIBSHARED_AND_STATIC_STATIC_DEFINE 10 # define LIBSHARED_AND_STATIC_EXPORT 11 # define LIBSHARED_AND_STATIC_NO_EXPORT 13 # ifndef LIBSHARED_AND_STATIC_EXPORT 14 # ifdef spectrlib_shared_EXPORTS 16 # define LIBSHARED_AND_STATIC_EXPORT __declspec(dllexport) 19 # define LIBSHARED_AND_STATIC_EXPORT __declspec(dllimport) 23 # ifndef LIBSHARED_AND_STATIC_NO_EXPORT 24 # define LIBSHARED_AND_STATIC_NO_EXPORT 28 #ifndef LIBSHARED_AND_STATIC_DEPRECATED 29 # define LIBSHARED_AND_STATIC_DEPRECATED __declspec(deprecated) 30 # define LIBSHARED_AND_STATIC_DEPRECATED_EXPORT LIBSHARED_AND_STATIC_EXPORT __declspec(deprecated) 31 # define LIBSHARED_AND_STATIC_DEPRECATED_NO_EXPORT LIBSHARED_AND_STATIC_NO_EXPORT __declspec(deprecated) 34 #define DEFINE_NO_DEPRECATED 0 35 #if DEFINE_NO_DEPRECATED 36 # define LIBSHARED_AND_STATIC_NO_DEPRECATED 46 typedef unsigned char uint8_t;
47 typedef unsigned short uint16_t;
48 typedef unsigned int uint32_t;
59 #ifndef AS_CORE_LIBRARY 60 LIBSHARED_AND_STATIC_EXPORT
79 #ifndef AS_CORE_LIBRARY 80 LIBSHARED_AND_STATIC_EXPORT
105 #ifndef AS_CORE_LIBRARY 106 LIBSHARED_AND_STATIC_EXPORT
135 #ifndef AS_CORE_LIBRARY 136 LIBSHARED_AND_STATIC_EXPORT
141 #ifndef AS_CORE_LIBRARY 142 LIBSHARED_AND_STATIC_EXPORT
155 #ifndef AS_CORE_LIBRARY 156 LIBSHARED_AND_STATIC_EXPORT
161 #ifndef AS_CORE_LIBRARY 162 LIBSHARED_AND_STATIC_EXPORT
224 int setFrameFormat(uint16_t numOfStartElement, uint16_t numOfEndElement, uint8_t reductionMode, uint16_t *numOfPixelsInFrame, uintptr_t *deviceContextPtr);
226 #ifndef AS_CORE_LIBRARY 227 LIBSHARED_AND_STATIC_EXPORT
263 int setExposure(uint32_t timeOfExposure, uint8_t force, uintptr_t *deviceContextPtr);
265 #ifndef AS_CORE_LIBRARY 266 LIBSHARED_AND_STATIC_EXPORT
315 int setAcquisitionParameters(uint16_t numOfScans, uint16_t numOfBlankScans, uint8_t scanMode, uint32_t timeOfExposure, uintptr_t *deviceContextPtr);
317 #ifndef AS_CORE_LIBRARY 318 LIBSHARED_AND_STATIC_EXPORT
339 int setMultipleParameters(uint16_t numOfScans, uint16_t numOfBlankScans, uint8_t scanMode, uint32_t timeOfExposure, uint8_t enableMode, uint8_t signalFrontMode, uintptr_t *deviceContextPtr);
341 #ifndef AS_CORE_LIBRARY 342 LIBSHARED_AND_STATIC_EXPORT
371 int setExternalTrigger(uint8_t enableMode, uint8_t signalFrontMode, uintptr_t *deviceContextPtr);
373 #ifndef AS_CORE_LIBRARY 374 LIBSHARED_AND_STATIC_EXPORT
415 int setOpticalTrigger(uint8_t enableMode, uint16_t pixel, uint16_t threshold, uintptr_t *deviceContextPtr);
417 #ifndef AS_CORE_LIBRARY 418 LIBSHARED_AND_STATIC_EXPORT
438 #ifndef AS_CORE_LIBRARY 439 LIBSHARED_AND_STATIC_EXPORT
469 int getStatus(uint8_t *statusFlags, uint16_t *framesInMemory, uintptr_t *deviceContextPtr);
471 #ifndef AS_CORE_LIBRARY 472 LIBSHARED_AND_STATIC_EXPORT
491 int getAcquisitionParameters(uint16_t* numOfScans, uint16_t* numOfBlankScans, uint8_t *scanMode, uint32_t* timeOfExposure, uintptr_t *deviceContextPtr);
493 #ifndef AS_CORE_LIBRARY 494 LIBSHARED_AND_STATIC_EXPORT
525 int getFrameFormat(uint16_t *numOfStartElement, uint16_t *numOfEndElement, uint8_t *reductionMode, uint16_t *numOfPixelsInFrame, uintptr_t *deviceContextPtr);
527 #ifndef AS_CORE_LIBRARY 528 LIBSHARED_AND_STATIC_EXPORT
569 int getFrame(uint16_t *framePixelsBuffer, uint16_t numOfFrame, uintptr_t *deviceContextPtr);
571 #ifndef AS_CORE_LIBRARY 572 LIBSHARED_AND_STATIC_EXPORT
596 #ifndef AS_CORE_LIBRARY 597 LIBSHARED_AND_STATIC_EXPORT
621 #ifndef AS_CORE_LIBRARY 622 LIBSHARED_AND_STATIC_EXPORT
662 int readFlash(uint8_t *buffer, uint32_t absoluteOffset, uint32_t bytesToRead, uintptr_t *deviceContextPtr);
664 #ifndef AS_CORE_LIBRARY 665 LIBSHARED_AND_STATIC_EXPORT
708 int writeFlash(uint8_t *buffer, uint32_t absoluteOffset, uint32_t bytesToWrite, uintptr_t *deviceContextPtr);
711 #ifndef AS_CORE_LIBRARY 712 LIBSHARED_AND_STATIC_EXPORT
739 #ifndef AS_CORE_LIBRARY 740 LIBSHARED_AND_STATIC_EXPORT
759 #ifndef SPECTROMETER_ERROR_CODES 760 #define SPECTROMETER_ERROR_CODES 762 #define CONNECT_ERROR_WRONG_ID 500 763 #define CONNECT_ERROR_NOT_FOUND 501 764 #define CONNECT_ERROR_FAILED 502 765 #define DEVICE_NOT_INITIALIZED 503 766 #define WRITING_PROCESS_FAILED 504 767 #define READING_PROCESS_FAILED 505 768 #define WRONG_ANSWER 506 769 #define GET_FRAME_REMAINING_PACKETS_ERROR 507 770 #define NUM_OF_PACKETS_IN_FRAME_ERROR 508 771 #define INPUT_PARAMETER_NOT_INITIALIZED 509 772 #define READ_FLASH_REMAINING_PACKETS_ERROR 510 774 #define CONNECT_ERROR_WRONG_SERIAL_NUMBER 516 776 #define NO_DEVICE_CONTEXT_ERROR 585 779 #ifndef AS_CORE_LIBRARY LIBSHARED_AND_STATIC_EXPORT int disconnectDeviceContext(uintptr_t *deviceContextPtr)
Free a device handle.
LIBSHARED_AND_STATIC_EXPORT uint32_t getDevicesCount()
Returns the number of the connected devices.
LIBSHARED_AND_STATIC_EXPORT int getFrame(uint16_t *framePixelsBuffer, uint16_t numOfFrame, uintptr_t *deviceContextPtr)
Gets frame.
LIBSHARED_AND_STATIC_EXPORT int eraseFlash(uintptr_t *deviceContextPtr)
Erases user flash memory.
LIBSHARED_AND_STATIC_EXPORT int getAcquisitionParameters(uint16_t *numOfScans, uint16_t *numOfBlankScans, uint8_t *scanMode, uint32_t *timeOfExposure, uintptr_t *deviceContextPtr)
Returns the same values as set by setAcquisitionParameters.
LIBSHARED_AND_STATIC_EXPORT int setFrameFormat(uint16_t numOfStartElement, uint16_t numOfEndElement, uint8_t reductionMode, uint16_t *numOfPixelsInFrame, uintptr_t *deviceContextPtr)
Sets frame parameters Note: this function clears the memory and stops the current acquisition...
LIBSHARED_AND_STATIC_EXPORT int setExposure(uint32_t timeOfExposure, uint8_t force, uintptr_t *deviceContextPtr)
Sets exposure parameter.
LIBSHARED_AND_STATIC_EXPORT int triggerAcquisition(uintptr_t *deviceContextPtr)
Start acquisition by software.
LIBSHARED_AND_STATIC_EXPORT int clearMemory(uintptr_t *deviceContextPtr)
Clears memory.
LIBSHARED_AND_STATIC_EXPORT int connectToDeviceByIndex(unsigned int index, uintptr_t *deviceContextPtr)
Connects to the required device by index This function or its analog connectToSingleDeviceBySerial sh...
LIBSHARED_AND_STATIC_EXPORT int connectToDeviceBySerial(const char *const serialNumber, uintptr_t *deviceContextPtr)
Finds the requested device by the provided serial number and connects to it. This function or its ana...
LIBSHARED_AND_STATIC_EXPORT int setExternalTrigger(uint8_t enableMode, uint8_t signalFrontMode, uintptr_t *deviceContextPtr)
Sets the external acquisition trigger.
LIBSHARED_AND_STATIC_EXPORT int getFrameFormat(uint16_t *numOfStartElement, uint16_t *numOfEndElement, uint8_t *reductionMode, uint16_t *numOfPixelsInFrame, uintptr_t *deviceContextPtr)
Returns the same values as set by setFrameFormat.
LIBSHARED_AND_STATIC_EXPORT int setMultipleParameters(uint16_t numOfScans, uint16_t numOfBlankScans, uint8_t scanMode, uint32_t timeOfExposure, uint8_t enableMode, uint8_t signalFrontMode, uintptr_t *deviceContextPtr)
Sets multiple parameters - combination of setAcquisitionParametersOnSingleDevice and setExternalTrigg...
LIBSHARED_AND_STATIC_EXPORT int readFlash(uint8_t *buffer, uint32_t absoluteOffset, uint32_t bytesToRead, uintptr_t *deviceContextPtr)
Reads from user flash memory Reads bytesToRead from user flash memory starting at offset and copies t...
LIBSHARED_AND_STATIC_EXPORT int getStatus(uint8_t *statusFlags, uint16_t *framesInMemory, uintptr_t *deviceContextPtr)
Gets the device status.
LIBSHARED_AND_STATIC_EXPORT int detachDevice(uintptr_t *deviceContextPtr)
Disconnects the device The device will be disconnected from USB, and any interaction with it will not...
LIBSHARED_AND_STATIC_EXPORT int resetDevice(uintptr_t *deviceContextPtr)
Resets all the device parameters to their default values and clears the memory.
LIBSHARED_AND_STATIC_EXPORT DeviceInfo_t * getDevicesInfo()
Obtains the list of all connected devices. Run clearDevicesInfo() with the result of this function to...
LIBSHARED_AND_STATIC_EXPORT void clearDevicesInfo(DeviceInfo_t *devices)
Clears the list of all connected devices obtained by getDevicesInfo() function.
LIBSHARED_AND_STATIC_EXPORT int setOpticalTrigger(uint8_t enableMode, uint16_t pixel, uint16_t threshold, uintptr_t *deviceContextPtr)
Sets the optical atrigger.
LIBSHARED_AND_STATIC_EXPORT int setAcquisitionParameters(uint16_t numOfScans, uint16_t numOfBlankScans, uint8_t scanMode, uint32_t timeOfExposure, uintptr_t *deviceContextPtr)
Sets acquisition parameters.
LIBSHARED_AND_STATIC_EXPORT int writeFlash(uint8_t *buffer, uint32_t absoluteOffset, uint32_t bytesToWrite, uintptr_t *deviceContextPtr)
Writes bytesToWrite bytes from the buffer to the user flash memory starting at offset.