TeledyneGigEInterface.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /* Copyright (C) 2019 Teledyne DALSA Professional Imaging - All Rights Reserved
  2. * This code is inteded for evaluation purposes only.
  3. *
  4. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  5. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  6. * FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
  7. * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
  8. * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
  9. * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  10. * DEALINGS IN THE SOFTWARE.
  11. */
  12. #pragma once
  13. #ifndef TGI_API
  14. #ifdef TGI_EXPORTS
  15. #define TGI_API __declspec(dllexport)
  16. #else
  17. #define TGI_API __declspec(dllimport)
  18. #endif
  19. #endif
  20. class TGI_API TGI_Device
  21. {
  22. private:
  23. void* deviceHandle;
  24. TGI_Device(TGI_Device const& other);//dont allow copies
  25. public:
  26. TGI_Device();
  27. ~TGI_Device();
  28. bool Cleanup();
  29. const char* GetLastStatus();
  30. bool Connect();
  31. bool Connect( bool readOnly);
  32. bool Connect( const char* serialNumber);
  33. bool Connect( const char* serialNumber, bool readOnly);
  34. void Disconnect();
  35. bool PrepareBuffers( int numFrames);
  36. bool ReleaseBuffers();
  37. bool SnapAsync( int numFrames);
  38. bool SnapAsync( int numFrames, void(*frameCallBack)(int, void*), void* context);
  39. bool GrabAsync( int bufCount);
  40. bool GrabAsync( int bufCount, void(*frameCallBack)(int, void*), void* context);
  41. bool Wait( int msTimeout);
  42. bool IsGrabComplete();
  43. bool Abort();
  44. bool Stop();
  45. bool GetBufferInfo( int bufIndex, unsigned short** dataPtr, int* width, int* height, unsigned int* timestamp);
  46. bool SaveBuffer( const char* filenameNoExt);
  47. bool IsConnected();
  48. bool SetFeature( const char* featureName, const char* value);
  49. bool SetFeature( const char* featureName, __int32 value);
  50. bool SetFeature( const char* featureName, unsigned __int32 value);
  51. bool SetFeature( const char* featureName, __int64 value);
  52. bool SetFeature( const char* featureName, unsigned __int64 value);
  53. bool SetFeature( const char* featureName, float value);
  54. bool SetFeature( const char* featureName, double value);
  55. bool SetFeature( const char* featureName, bool value);
  56. bool GetFeature( const char* featureName, char* value, int valueLength);
  57. bool GetFeature( const char* featureName, __int32& value);
  58. bool GetFeature( const char* featureName, unsigned __int32& value);
  59. bool GetFeature( const char* featureName, __int64& value);
  60. bool GetFeature( const char* featureName, unsigned __int64& value);
  61. bool GetFeature( const char* featureName, float& value);
  62. bool GetFeature( const char* featureName, double& value);
  63. bool GetFeature( const char* featureName, bool& value);
  64. bool GetFeatureCount( int& featureCount);
  65. bool GetFeatureName( int index, char* featureName, int featureNameLength);
  66. bool GetFeatureInfo( const char* featureName, char* infoText, int infoLength);
  67. bool FileList( char* fileNames, int fileNamesLength);
  68. bool FileUpload( const char* localFileName, const char* deviceFileName);
  69. bool FileDownload( const char* localFileName, const char* deviceFileName);
  70. bool FileDelete(const char* deviceFileName);
  71. static int GetSerialNumbers(char* serialnumbers, int serialnumbersLength);
  72. };