123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- /* Copyright (C) 2019 Teledyne DALSA Professional Imaging - All Rights Reserved
- * This code is inteded for evaluation purposes only.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
- * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
- #pragma once
- #ifndef TGI_API
- #ifdef TGI_EXPORTS
- #define TGI_API __declspec(dllexport)
- #else
- #define TGI_API __declspec(dllimport)
- #endif
- #endif
- class TGI_API TGI_Device
- {
- private:
- void* deviceHandle;
- TGI_Device(TGI_Device const& other);//dont allow copies
- public:
- TGI_Device();
- ~TGI_Device();
- bool Cleanup();
- const char* GetLastStatus();
- bool Connect();
- bool Connect( bool readOnly);
- bool Connect( const char* serialNumber);
- bool Connect( const char* serialNumber, bool readOnly);
- void Disconnect();
- bool PrepareBuffers( int numFrames);
- bool ReleaseBuffers();
- bool SnapAsync( int numFrames);
- bool SnapAsync( int numFrames, void(*frameCallBack)(int, void*), void* context);
- bool GrabAsync( int bufCount);
- bool GrabAsync( int bufCount, void(*frameCallBack)(int, void*), void* context);
- bool Wait( int msTimeout);
- bool IsGrabComplete();
- bool Abort();
- bool Stop();
- bool GetBufferInfo( int bufIndex, unsigned short** dataPtr, int* width, int* height, unsigned int* timestamp);
- bool SaveBuffer( const char* filenameNoExt);
- bool IsConnected();
- bool SetFeature( const char* featureName, const char* value);
- bool SetFeature( const char* featureName, __int32 value);
- bool SetFeature( const char* featureName, unsigned __int32 value);
- bool SetFeature( const char* featureName, __int64 value);
- bool SetFeature( const char* featureName, unsigned __int64 value);
- bool SetFeature( const char* featureName, float value);
- bool SetFeature( const char* featureName, double value);
- bool SetFeature( const char* featureName, bool value);
- bool GetFeature( const char* featureName, char* value, int valueLength);
- bool GetFeature( const char* featureName, __int32& value);
- bool GetFeature( const char* featureName, unsigned __int32& value);
- bool GetFeature( const char* featureName, __int64& value);
- bool GetFeature( const char* featureName, unsigned __int64& value);
- bool GetFeature( const char* featureName, float& value);
- bool GetFeature( const char* featureName, double& value);
- bool GetFeature( const char* featureName, bool& value);
- bool GetFeatureCount( int& featureCount);
- bool GetFeatureName( int index, char* featureName, int featureNameLength);
- bool GetFeatureInfo( const char* featureName, char* infoText, int infoLength);
- bool FileList( char* fileNames, int fileNamesLength);
- bool FileUpload( const char* localFileName, const char* deviceFileName);
- bool FileDownload( const char* localFileName, const char* deviceFileName);
- bool FileDelete(const char* deviceFileName);
- static int GetSerialNumbers(char* serialnumbers, int serialnumbersLength);
- };
|