Logo
Programmer's Guide Baumer GAPI SDK Reference v2.10.0
bgapi2_genicam.hpp
Go to the documentation of this file.
1 /* Copyright 2014-2018 Baumer Optronic */
2 
3 #ifndef _BGAPI2_HPP__
4 #define _BGAPI2_HPP__
5 
7 #include <ctime>
8 #include "./bgapi2_def.h"
11 
12 
42 namespace BGAPI2 {
43 
44 class System;
45 class Interface;
46 class Device;
47 class DataStream;
48 class Buffer;
49 
54 class BGAPI2_DECL SystemList {
55  public:
56  ~SystemList();
57 
64  static SystemList *GetInstance();
65 
71  static void ReleaseInstance();
72 
81  static SystemList *CreateInstanceFromPath(String producerpath);
82 
92  void Add(System * pSystem);
93 
105  void Refresh();
106 
113  bo_uint64 size();
114 
121  void clear();
122 
131  System* operator[](const String& systemid);
132 
136  class BGAPI2_DECL iterator {
137  public:
138  ~iterator();
145  iterator& operator=(const iterator& _iterator);
146 
153  bo_bool operator!=(const iterator& _right) const;
154 
161  bo_bool operator==(const iterator& _right) const;
162 
168  iterator& operator++();
169 
175  iterator operator++(int);
176 
182  _pairs* operator->();
183 
189  _pairs* operator*();
190 
191  private:
192  iterator();
193  iterator(void* _data);
194  _pairs p;
195  void* pp;
196  friend class SystemList;
197  };
198 
205  iterator begin();
206 
213  iterator end();
214 
222  iterator find(const String& _keyval);
223 
224  protected:
226  static SystemList *ms_pInstance;
228  private:
229  SystemList();
230  SystemList(const SystemList & Obj);
231  tSystemListData *m_pSystemListImpl;
232  friend class System;
233 };
234 
239 class BGAPI2_DECL InterfaceList {
240  public:
241  ~InterfaceList();
250  void Refresh(bo_uint64 iTimeout);
251 
258  bo_uint64 size();
259 
266  void clear();
267 
276  Interface* operator[](const String& ifaceid);
277 
281  class BGAPI2_DECL iterator {
282  public:
283  ~iterator();
290  iterator& operator=(const iterator& _iterator);
291 
298  bo_bool operator!=(const iterator& _right) const;
299 
306  bo_bool operator==(const iterator& _right) const;
307 
313  iterator& operator++();
314 
320  iterator operator++(int);
321 
327  _pairi* operator->();
328 
334  _pairi* operator*();
335 
336  private:
337  iterator();
338  iterator(void* _data);
339  _pairi p;
340  void* pp;
341  friend class InterfaceList;
342  };
343 
350  iterator begin();
351 
358  iterator end();
359 
367  iterator find(const String& _keyval);
368 
369  private:
370  InterfaceList();
371  InterfaceList(const InterfaceList & Obj);
372 
373  void ClearBgapiObjects(System* const pParent);
374  bo_bool UpdateBgapiObjects(System* const pParent, bo_uint64 iTimeout);
375  bo_uint64 NumberOfBgapiObjects(System* const pParent);
376  String GetId(System* const pParent, const bo_uint64 index);
377  Interface* createBgapi2Object(System* const pParent, String id);
378  tInterfaceListData *m_pInterfaceListImpl;
379  friend class System;
380 };
381 
386 class BGAPI2_DECL DeviceList {
387  public:
388  ~DeviceList();
389 
398  void Refresh(bo_uint64 iTimeout);
399 
406  bo_uint64 size();
407 
414  void clear();
415 
424  Device* operator[](const String& devid);
425 
429  class BGAPI2_DECL iterator {
430  public:
431  ~iterator();
438  iterator& operator=(const iterator& _iterator);
439 
446  bo_bool operator!=(const iterator& _right) const;
447 
454  bo_bool operator==(const iterator& _right) const;
455 
461  iterator& operator++();
462 
468  iterator operator++(int);
469 
475  _paird* operator->();
476 
482  _paird* operator*();
483 
484  private:
485  iterator();
486  iterator(void* _data);
487  _paird p;
488  void* pp;
489  friend class DeviceList;
490  };
491 
498  iterator begin();
499 
506  iterator end();
507 
515  iterator find(const String& _keyval);
516 
517  private:
518  DeviceList();
519  DeviceList(const DeviceList & Obj);
520 
521  static bo_bool UpdateBgapiObjects(Interface* const pParent, const bo_uint64 iTimeout);
522  static bo_uint64 NumberOfBgapiObjects(Interface* const pParent);
523  static String GetId(Interface* const pParent, const bo_uint64 index);
524  static Device* createBgapi2Object(Interface* const pParent, String id);
525  tDeviceListData *m_pDeviceListImpl;
526  friend class Interface;
527 };
528 
533 class BGAPI2_DECL DataStreamList {
534  public:
535  ~DataStreamList();
536 
543  void Refresh();
544 
551  bo_uint64 size();
552 
558  void clear();
559 
568  DataStream* operator[](const String& streamid);
569 
573  class BGAPI2_DECL iterator {
574  public:
575  ~iterator();
582  iterator& operator=(const iterator& _iterator);
583 
590  bo_bool operator!=(const iterator& _right) const;
591 
598  bo_bool operator==(const iterator& _right) const;
599 
605  iterator& operator++();
606 
612  iterator operator++(int);
613 
619  _pairds* operator->();
620 
626  _pairds* operator*();
627 
628  private:
629  iterator();
630  iterator(void* _data);
631  _pairds p;
632  void* pp;
633  friend class DataStreamList;
634  };
635 
642  iterator begin();
643 
650  iterator end();
651 
659  iterator find(const String& _keyval);
660 
661  private:
662  DataStreamList();
663  DataStreamList(const DataStreamList & Obj);
664 
665  bo_bool UpdateBgapiObjects();
666  bo_uint64 NumberOfBgapiObjects(Device* const pParent);
667  String GetId(Device* const pParent, const bo_uint64 index);
668  DataStream* createBgapi2Object(Device* const pParent, String id);
669  tDataStreamListData *m_pDataStreamListImpl;
670  friend class Device;
671 };
672 
677 class BGAPI2_DECL BufferList {
678  public:
679  ~BufferList();
680 
690  void Add(Buffer *pBuffer);
691 
701  void* RevokeBuffer(Buffer *pBuffer);
702 
709  void clear();
710 
717  bo_uint64 size();
718 
727  Buffer* operator[](const String& bufid);
728 
735  void FlushInputToOutputQueue();
736 
743  void FlushAllToInputQueue();
744 
751  void FlushUnqueuedToInputQueue();
752 
759  void DiscardOutputBuffers();
760 
767  void DiscardAllBuffers();
768 
776  bo_uint64 GetDeliveredCount();
777 
785  bo_uint64 GetUnderrunCount();
786 
794  bo_uint64 GetAnnouncedCount();
795 
803  bo_uint64 GetQueuedCount();
804 
812  bo_uint64 GetAwaitDeliveryCount();
813 
821  bo_uint64 GetStartedCount();
822 
826  class BGAPI2_DECL iterator {
827  public:
828  ~iterator();
835  iterator& operator=(const iterator& _iterator);
836 
843  bo_bool operator!=(const iterator& _right) const;
844 
851  bo_bool operator==(const iterator& _right) const;
852 
858  iterator& operator++();
859 
865  iterator operator++(int);
866 
872  _pairb* operator->();
873 
879  _pairb* operator*();
880 
881  private:
882  iterator();
883  iterator(void* _data);
884  _pairb p;
885  void* pp;
886  friend class BufferList;
887  };
888 
895  iterator begin();
896 
903  iterator end();
904 
912  iterator find(const String& _keyval);
913 
918  void* GetReserved();
919 
920  private:
921  BufferList();
922  BufferList(const BufferList & Obj);
923  tBufferListData *m_pBufferListImpl;
924  friend class DataStream;
925 };
926 
932 class BGAPI2_DECL Trace {
933  public:
939  static void Enable(bo_bool benable);
940 
947  static void ActivateOutputToFile(bo_bool bactive, String tracefilename);
948 
954  static void ActivateOutputToDebugger(bo_bool bactive);
955 
961  static void ActivateMaskError(bo_bool bactive);
962 
968  static void ActivateMaskWarning(bo_bool bactive);
969 
975  static void ActivateMaskInformation(bo_bool bactive);
976 
982  static void ActivateOutputOptionTimestamp(bo_bool bactive);
983 
989  static void ActivateOutputOptionTimestampDiff(bo_bool bactive);
990 
996  static void ActivateOutputOptionThreadId(bo_bool bactive);
997 
1003  static void ActivateOutputOptionPrefix(bo_bool bactive);
1004 
1005  private:
1006  Trace();
1007  Trace(const Trace & Obj);
1008  ~Trace();
1009 };
1010 
1011 class NodeMap;
1016 class BGAPI2_DECL Node {
1017  public:
1024  String GetInterface();
1025 
1032  String GetToolTip();
1033 
1040  String GetDescription();
1041 
1048  String GetName();
1049 
1056  String GetDisplayName();
1057 
1064  String GetVisibility();
1065 
1074  String GetImposedAccessMode();
1075 
1084  String GetCurrentAccessMode();
1085 
1094  bo_bool IsReadable();
1095 
1104  bo_bool IsWriteable();
1105 
1113  String GetAlias();
1114 
1123  String GetRepresentation();
1124 
1132  String GetUnit();
1133 
1140  bo_bool HasUnit();
1141 
1150  bo_bool GetImplemented();
1151 
1161  bo_bool GetAvailable();
1162 
1173  bo_bool GetLocked();
1174 
1182  bo_int64 GetEventID();
1183 
1190  String GetExtension();
1191 
1202  NodeMap* GetEnumNodeList();
1203 
1214  String GetValue();
1215 
1226  void SetValue(String Value);
1227 
1239  bo_int64 GetInt();
1240 
1252  void SetInt(bo_int64 value);
1253 
1265  bo_int64 GetIntMin();
1266 
1278  bo_int64 GetIntMax();
1279 
1291  bo_int64 GetIntInc();
1292 
1304  bo_double GetDouble();
1305 
1317  void SetDouble(bo_double value);
1318 
1330  bo_double GetDoubleMin();
1331 
1343  bo_double GetDoubleMax();
1344 
1351  bo_bool HasInc();
1352 
1365  bo_double GetDoubleInc();
1366 
1378  bo_uint64 GetDoublePrecision();
1379 
1391  bo_int64 GetMaxStringLength();
1392 
1405  String GetString();
1406 
1419  void SetString(String value);
1420 
1431  void Execute();
1432 
1441  bo_bool IsDone();
1442 
1454  bo_bool GetBool();
1455 
1467  void SetBool(bo_bool value);
1468 
1477  NodeMap* GetNodeTree();
1478 
1487  NodeMap* GetNodeList();
1488 
1497  bo_bool IsSelector();
1498 
1506  NodeMap* GetSelectedNodeList();
1507 
1518  bo_uint64 getLength();
1519 
1530  bo_uint64 getAddress();
1531 
1544  void get(void *pBuffer, bo_uint64 len);
1545 
1558  void set(void *pBuffer, bo_uint64 len);
1559 
1560  private:
1561  Node();
1562  Node(const Node& Obj);
1563 };
1564 
1573 class BGAPI2_DECL NodeMap {
1574  public:
1575  ~NodeMap();
1581  bo_uint64 size();
1582 
1589  bo_bool GetNodePresent(String name);
1590 
1598  Node* operator[](const String& val);
1599 
1607  Node* GetNode(String name);
1608 
1614  bo_uint64 GetNodeCount();
1615 
1623  Node* GetNodeByIndex(bo_uint64 iIndex);
1624 
1628  class BGAPI2_DECL iterator {
1629  public:
1630  ~iterator();
1637  iterator& operator=(const iterator& _iterator);
1638 
1645  bool operator!=(const iterator& _right) const;
1646 
1653  bool operator==(const iterator& _right) const;
1654 
1660  iterator& operator++();
1661 
1667  iterator operator++(int);
1668 
1674  _pairnm* operator->();
1675 
1681  _pairnm operator*();
1682 
1683  private:
1684  iterator();
1685  iterator(void* _data);
1686  _pairnm p;
1687  void* pp;
1688  friend class NodeMap;
1689  };
1695  iterator begin();
1696 
1702  iterator end();
1703 
1710  iterator find(const String& _keyval);
1711 
1712  private:
1713  NodeMap();
1714  NodeMap(const NodeMap & Obj);
1715  friend class Node;
1716 };
1717 
1722 class BGAPI2_DECL INode {
1723  public:
1733  Node* GetNode(String name);
1734 
1742  NodeMap* GetNodeTree();
1743 
1751  NodeMap* GetNodeList();
1752 
1753  protected:
1754  INode();
1755  virtual ~INode();
1757  void* m_pNodeBase;
1759 };
1760 
1764 namespace Events {
1765 
1782 };
1783 
1787 enum PnPType {
1796 };
1797 
1802 class BGAPI2_DECL EventControl {
1803  public:
1810  EventMode GetEventMode();
1811 
1817  void * GetBase();
1818 
1819  protected:
1820  EventControl();
1821  virtual ~EventControl();
1823  void* m_pBase;
1825 };
1826 
1831 class BGAPI2_DECL PnPEvent {
1832  public:
1837  PnPEvent();
1838 
1843  ~PnPEvent();
1844 
1852  String GetSerialNumber();
1853 
1860  PnPType GetPnPType();
1861 
1869  String GetId();
1870 
1871  private:
1872  CEventPnPObj *m_pCEventPnPObjImpl;
1873  friend class InterfaceEventControl;
1874  // friend class CEventPnPObj;
1875 };
1876 
1880 typedef void (BGAPI2CALL *PnPEventHandler)(void * callBackOwner, PnPEvent * pBuffer);
1881 
1886 class BGAPI2_DECL InterfaceEventControl : public EventControl {
1887  public:
1897  void RegisterPnPEvent(EventMode eventMode);
1898 
1907  void UnregisterPnPEvent();
1908 
1920  bo_bool GetPnPEvent(PnPEvent * pPnPEvent, bo_uint64 iTimeout);
1921 
1930  void CancelGetPnPEvent();
1931 
1940  void RegisterPnPEventHandler(void * callBackOwner, PnPEventHandler pFunc);
1941 
1942  protected:
1945 };
1946 
1951 class BGAPI2_DECL DeviceEvent : public INode {
1952  public:
1957  DeviceEvent();
1958 
1963  ~DeviceEvent();
1964 
1972  String GetName();
1973 
1981  String GetDisplayName();
1982 
1990  bo_uint64 GetTimeStamp();
1991 
1999  String GetId();
2000 
2001  private:
2002  CEventDeviceEventObj *m_pCEventDeviceEventObjImpl;
2003  friend class DeviceEventControl;
2004 };
2005 
2009 typedef void (BGAPI2CALL *DeviceEventHandler)(void * callBackOwner, DeviceEvent * pDeviceEvent);
2010 
2015 class BGAPI2_DECL DeviceEventControl : public EventControl {
2016  public:
2026  void RegisterDeviceEvent(EventMode eventMode);
2027 
2036  void UnregisterDeviceEvent();
2037 
2049  bo_bool GetDeviceEvent(DeviceEvent * pDeviceEvent, bo_uint64 iTimeout);
2050 
2059  void CancelGetDeviceEvent();
2060 
2069  void RegisterDeviceEventHandler(void * callBackOwner, DeviceEventHandler pFunc);
2070 
2071  protected:
2073  ~DeviceEventControl();
2074 };
2075 
2079 typedef void (BGAPI2CALL *NewBufferEventHandler)(void * callBackOwner, Buffer * pBuffer);
2080 
2085 class BGAPI2_DECL DataStreamEventControl : public EventControl {
2086  public:
2096  void RegisterNewBufferEvent(EventMode eventMode);
2097 
2107  void UnregisterNewBufferEvent();
2108 
2120  Buffer* GetFilledBuffer(bo_uint64 iTimeout);
2121 
2129  void CancelGetFilledBuffer();
2130 
2140  void RegisterNewBufferEventHandler(void * callBackOwner, NewBufferEventHandler pFunc);
2141 
2142  protected:
2145 };
2146 
2147 } // namespace Events
2148 
2153 class BGAPI2_DECL Buffer : public INode, public Events::EventControl {
2154  public:
2159  Buffer();
2160 
2166  Buffer(void * pUserObj);
2167 
2177  Buffer(void *pUserBuffer, bo_uint64 uUserBufferSize, void *pUserObj);
2178 
2183  ~Buffer();
2184 
2191  String GetID();
2192 
2202  void QueueBuffer();
2203 
2212  void* GetMemPtr();
2213 
2222  bo_uint64 GetMemSize();
2223 
2231  void* GetUserObj();
2232 
2245  bo_uint64 GetTimestamp();
2246 
2254  bo_uint64 GetHostTimestamp();
2255 
2266  bo_bool GetNewData();
2267 
2278  bo_bool GetIsQueued();
2279 
2291  bo_bool GetIsAcquiring();
2292 
2303  bo_bool GetIsIncomplete();
2304 
2313  String GetTLType();
2314 
2323  bo_uint64 GetSizeFilled();
2324 
2333  bo_uint64 GetWidth();
2334 
2343  bo_uint64 GetHeight();
2344 
2353  bo_uint64 GetXOffset();
2354 
2363  bo_uint64 GetYOffset();
2364 
2374  bo_uint64 GetXPadding();
2375 
2384  bo_uint64 GetYPadding();
2385 
2394  bo_uint64 GetFrameID();
2395 
2402  bo_bool GetImagePresent();
2403 
2409  bo_uint64 GetImageOffset();
2410 
2419  String GetPayloadType();
2420 
2429  String GetPixelFormat();
2430 
2439  bo_uint64 GetDeliveredImageHeight();
2440 
2449  bo_uint64 GetDeliveredChunkPayloadSize();
2450 
2458  bo_bool GetContainsChunk();
2459 
2469  bo_uint64 GetChunkLayoutID();
2470 
2478  NodeMap* GetChunkNodeList();
2479 
2488  String GetFileName();
2489 
2495  DataStream* GetParent();
2496 
2501  void * GetReserved();
2502 
2503  private:
2504  tBufferData *m_pBufferImpl;
2505  friend class BufferList;
2506  friend class DataStream;
2507 };
2508 
2513 class BGAPI2_DECL DataStream : public INode, public Events::DataStreamEventControl {
2514  public:
2522  void Open();
2523 
2530  void Close();
2531 
2538  bo_bool IsOpen();
2539 
2548  BufferList* GetBufferList();
2549 
2556  String GetID();
2557 
2566  String GetTLType();
2567 
2576  bo_bool GetDefinesPayloadSize();
2577 
2587  bo_uint64 GetPayloadSize();
2588 
2597  bo_bool GetIsGrabbing();
2598 
2608  void StartAcquisition(bo_uint64 iNumToAcquire);
2609 
2617  void StartAcquisitionContinuous();
2618 
2626  void StopAcquisition();
2627 
2635  void AbortAcquisition();
2636 
2647  Buffer* GetBufferByIndex(bo_uint iIndex);
2648 
2654  Device* GetParent();
2655 
2660  void * GetReserved();
2661 
2662  private:
2663  DataStream();
2664  DataStream(const DataStream &Obj);
2665  DataStream(String id, void * pReserved);
2666  ~DataStream();
2667  BufferList mBufferList;
2668  tDataStreamData *m_pDataStreamImpl;
2669  friend class DataStreamList;
2670  friend class BufferList;
2671  friend class Buffer;
2672 };
2673 
2678 class BGAPI2_DECL Device : public INode, public Events::DeviceEventControl {
2679  public:
2689  void Open();
2690 
2700  void OpenExclusive();
2701 
2711  void OpenReadOnly();
2712 
2719  void Close();
2720 
2727  bo_bool IsOpen();
2728 
2737  void StartStacking(bo_bool bReplaceMode);
2738 
2747  void WriteStack();
2748 
2757  void CancelStack();
2758 
2766  DataStreamList* GetDataStreams();
2767 
2774  String GetID();
2775 
2783  String GetVendor();
2784 
2792  String GetModel();
2793 
2800  String GetSerialNumber();
2801 
2809  String GetTLType();
2810 
2819  String GetDisplayName();
2820 
2839  String GetAccessStatus();
2840 
2851  bo_uint64 GetPayloadSize();
2852 
2865  Node* GetRemoteNode(String name);
2866 
2877  NodeMap* GetRemoteNodeTree();
2878 
2888  NodeMap* GetRemoteNodeList();
2889 
2899  String GetRemoteConfigurationFile();
2900 
2910  void SetRemoteConfigurationFile(String sConfigFile);
2911 
2922  bo_bool IsUpdateModeAvailable();
2923 
2934  bo_bool IsUpdateModeActive();
2935 
2950  void SetUpdateMode(bool bActive, String pcCustomKey);
2951 
2965  Node* GetUpdateNode(String name);
2966 
2978  NodeMap* GetUpdateNodeTree();
2979 
2990  NodeMap* GetUpdateNodeList();
2991 
3002  String GetUpdateConfigurationFile();
3003 
3009  Interface* GetParent();
3010 
3015  void * GetReserved();
3016 
3017  private:
3018  Device();
3019  Device(const Device &Obj);
3020  Device(String id, void * pReserved);
3021  ~Device();
3022  DataStreamList mDataStreamList;
3023  tDeviceData *m_pDeviceImpl;
3024  friend class DeviceList;
3025  friend class DataStreamList;
3026  friend class DataStream;
3027 };
3028 
3033 class BGAPI2_DECL Interface : public INode, public Events::InterfaceEventControl {
3034  public:
3043  void Open();
3044 
3051  void Close();
3052 
3059  bo_bool IsOpen();
3060 
3068  DeviceList* GetDevices();
3069 
3076  String GetID();
3077 
3085  String GetDisplayName();
3086 
3094  String GetTLType();
3095 
3101  System* GetParent();
3102 
3103  private:
3104  Interface();
3105  Interface(const Interface &Obj);
3106  Interface(String id, void *pReserved);
3107  ~Interface();
3108  DeviceList mDeviceList;
3109  tInterfaceData *m_pInterfaceImpl;
3110  friend class InterfaceList;
3111  friend class DeviceList;
3112  friend class Device;
3113 };
3114 
3119 class BGAPI2_DECL System : public INode, public Events::EventControl {
3120  public:
3126  System(String filepath);
3127 
3132  ~System();
3133 
3141  void Open();
3142 
3149  void Close();
3150 
3157  bo_bool IsOpen();
3158 
3166  InterfaceList* GetInterfaces();
3167 
3175  String GetID();
3176 
3184  String GetVendor();
3185 
3193  String GetModel();
3194 
3202  String GetVersion();
3203 
3211  String GetTLType();
3212 
3220  String GetFileName();
3221 
3229  String GetPathName();
3230 
3238  String GetDisplayName();
3239 
3244  void* GetReserved();
3245 
3246  private:
3247  System();
3248  tSystemData *m_pSystemImpl;
3249  InterfaceList mInterfaceList;
3250  friend class SystemList;
3251  friend class InterfaceList;
3252  friend class Interface;
3253 };
3254 
3255 class ImageProcessor;
3260 class BGAPI2_DECL Image : public INode {
3261  public:
3267  bo_uint GetWidth();
3268 
3274  bo_uint GetHeight();
3275 
3281  String GetPixelformat();
3282 
3288  void* GetBuffer();
3289 
3297  bo_uint64 GetTransformBufferLength(String sPixelFormat);
3298 
3309  void GetHistogram(bo_tHistRecords tHistogram, bo_uint offsetx, bo_uint offsety, bo_uint width, bo_uint height);
3310 
3317  void GetHistogram(bo_tHistRecords tHistogram);
3318 
3323  void Release();
3324 
3335  void Init(bo_uint width, bo_uint height, String sPixelFormat, void* pBuffer, bo_uint64 uBufferSize);
3336 
3337  private:
3338  Image(void * pReserved);
3339  ~Image();
3340  tImageData *m_pImageImpl;
3341  friend class ImageProcessor;
3342  friend class Polarizer;
3343 };
3344 
3352 class BGAPI2_DECL ImageProcessor : public INode {
3353  public:
3358  ImageProcessor();
3359 
3364  ~ImageProcessor();
3365 
3372  String GetVersion();
3373 
3379  Image* CreateImage();
3380 
3392  Image* CreateImage(bo_uint width, bo_uint height, String pixelformat, void* pBuffer, bo_uint64 uBufferSize);
3393 
3401  Image* CreateTransformedImage(Image* pInputImage, const char* szDestinationPixelformat);
3402 
3412  void TransformImageToBuffer(Image* pInputImage, const char* szDestinationPixelformat, void* pBuffer,
3413  bo_uint64 uBufferSize);
3414 
3415  private:
3416  ImageProcessor(const ImageProcessor &Obj);
3417 
3418  tImageProcessorData *m_pImageProcessorImpl;
3419 };
3420 
3421 
3426 class BGAPI2_DECL Polarizer {
3427  public:
3431  Polarizer();
3432 
3436  ~Polarizer();
3437 
3446  void Initialize(BGAPI2::Buffer* buffer);
3447 
3460  void ReadCalibrationData(BGAPI2::Device* device);
3461 
3470  void EnableInterpolation(bo_bool interpolate);
3471 
3475  enum Formats {
3485  ReflectionMax
3486  };
3487 
3499  void Enable(Formats format, bo_bool enable);
3500 
3517  void Get(Formats format, BGAPI2::Image *image);
3518 
3522  class BGAPI2_DECL formatlist {
3523  public:
3524  formatlist();
3525  ~formatlist();
3526  bo_uint64 size();
3527 
3531  class BGAPI2_DECL const_iterator {
3532  public:
3539  bo_bool operator==(const const_iterator& right) const;
3540 
3547  bo_bool operator!=(const const_iterator& right) const;
3548 
3554  const_iterator operator++();
3555 
3561  const_iterator operator++(int dummy);
3562 
3568  const Formats& operator*();
3569 
3575  const Formats* operator->();
3576 
3577  private:
3578  explicit const_iterator(const Formats* ptr);
3579  friend class formatlist;
3580 
3581  const Formats* p;
3582  };
3583 
3590  const_iterator begin() const;
3591 
3598  const_iterator end() const;
3599 
3600  private:
3601  const Formats* list;
3602  };
3603 
3614  String GetFormatString(Formats format);
3615 
3616 
3626  void SetMaxThreads(bo_uint number);
3627 
3628  private:
3629  void *m_pPolarizerImpl;
3630 };
3631 
3635 namespace Exceptions {
3636 
3641 class BGAPI2_DECL IException {
3642  public:
3643  virtual ~IException() {}
3649  virtual String GetErrorDescription() = 0;
3650 
3656  virtual String GetFunctionName() = 0;
3657 
3663  virtual String GetType() = 0;
3664 };
3665 
3670 class BGAPI2_DECL ErrorException : virtual public IException {
3671  public:
3672  virtual ~ErrorException() {}
3673 };
3674 
3679 class BGAPI2_DECL NotInitializedException : virtual public IException {
3680  public:
3681  virtual ~NotInitializedException() {}
3682 };
3683 
3688 class BGAPI2_DECL NotImplementedException : virtual public IException {
3689  public:
3690  virtual ~NotImplementedException() {}
3691 };
3692 
3697 class BGAPI2_DECL ResourceInUseException : virtual public IException {
3698  public:
3699  virtual ~ResourceInUseException() {}
3700 };
3701 
3706 class BGAPI2_DECL AccessDeniedException : virtual public IException {
3707  public:
3708  virtual ~AccessDeniedException() {}
3709 };
3710 
3715 class BGAPI2_DECL InvalidHandleException : virtual public IException {
3716  public:
3717  virtual ~InvalidHandleException() {}
3718 };
3719 
3724 class BGAPI2_DECL NoDataException : virtual public IException {
3725  public:
3726  virtual ~NoDataException() {}
3727 };
3728 
3733 class BGAPI2_DECL InvalidParameterException : virtual public IException {
3734  public:
3735  virtual ~InvalidParameterException() {}
3736 };
3737 
3743 class BGAPI2_DECL AbortException : virtual public IException {
3744  public:
3745  virtual ~AbortException() {}
3746 };
3747 
3752 class BGAPI2_DECL InvalidBufferException : virtual public IException {
3753  public:
3754  virtual ~InvalidBufferException() {}
3755 };
3756 
3761 class BGAPI2_DECL NotAvailableException : virtual public IException {
3762  public:
3763  virtual ~NotAvailableException() {}
3764 };
3765 
3770 class BGAPI2_DECL ObjectInvalidException : virtual public IException {
3771  public:
3772  virtual ~ObjectInvalidException() {}
3773 };
3774 
3779 class BGAPI2_DECL LowLevelException : virtual public IException {
3780  public:
3781  virtual ~LowLevelException() {}
3782 };
3783 
3784 } // namespace Exceptions
3785 
3786 } // namespace BGAPI2
3787 
3788 #endif // _BGAPI2_HPP__
void(BGAPI2CALL * NewBufferEventHandler)(void *callBackOwner, Buffer *pBuffer)
Function pointer for buffer notification, which points to a user defined handler. ...
Exception thrown by deeper software layers like GenTL producer.
The class DeviceEventControl provides access to standard events transmitted from the device...
This EventMode allows the retrieval of occurred events by a previously registered callback function...
Invalid buffer is used. The used Buffer object is not valid.
The class PnPEvent represented a plug&#39;n play event and provides access to the event information...
The class Interface represents a physical interface, e.g. GEV or a logical interface, such as USB and belongs to the BGAPI2 main classes.
This class realizes the data access to the memory. It contains information about the received data (e...
This class provides a iterator that can read or modify any element in the list.
This class is used to discover and list device objects.
Formats
An enumeration containing the string representation of the possible polarization formats.
The class Image provides the ability of image transformation. This class belongs to the additional cl...
This class provides an iterator that can read or modify any object of the list.
This EventMode allows the retrieval of occurred events by a function call of the corresponding get fu...
The requested function/feature is not implemented.
This class provides a iterator that can read or modify any element in the list.
The referenced object is not a valid object of BGAPI2.
This class represents an device event which was received from the host. Use this class to get event i...
This class is responable for the exception handling and represents the parent class of all exception ...
This class is used to discover and list data stream objects.
An operation has been aborted before it could be completed.
The class EventControl provided access to custom events as well as the event mode.
The class Device is used to retrieve information (e.g. model, manufacturer, access modes) of the devi...
The requested operation is not allowed/possible, e.g. lose the connection to the device.
The class Node represent one feature from the provided node list based on the underlying XML definiti...
The class DataStreamEventControl provides the new buffer event which is used for fetching images...
The requested resource or information is not available at a given time in a current state...
The class InterfaceEventControl provides access to interface specific events, e.g. plug&#39;n play event.
void(BGAPI2CALL * PnPEventHandler)(void *callBackOwner, PnPEvent *pBuffer)
Function pointer for pnp event notification, which points to a user defined handler.
The global namespace of Baumer GAPI SDK 2.
Definition: bgapi2_def.h:11
Provides functionality to calculate several different formats out of the raw polarized camera data...
This class provides a iterator that can read or modify any element in the list.
EventMode
Enumeration, which defines kinds of event modes.
Represents a device add PnP event.
The class System is the abstraction of a Producer and belongs to the BGAPI2 main classes.
This class is used to search and list system objects and may be instantiated only once...
This class represents a physical data stream from the device and it is responsible for the buffer han...
The requested object is not initialized/opened.
This class is used for discovery and listing of buffer objects.
This class provides a iterator that can read or modify any element in the list.
This class provides a iterator that can read or modify any element in the list.
The task of the class ImageProcessor are the creation of image objects and the transformation of pixe...
This class is used to search and list interface objects.
void(BGAPI2CALL * DeviceEventHandler)(void *callBackOwner, DeviceEvent *pDeviceEvent)
Function pointer for device event notification, which points to a user defined handler.
An event contains no event data.
This class provides a iterator that can read or modify any element in the list.
The requested object is already used.
The class Trace offers the possibility to monitor the program flow and detect errors. This class belongs to the additional classes.
General purpose exception.
This class provides an iterator that can read or modify any element in the list.
(Given handle does not support the operation.)
The class NodeMap represents a collection of Node objects based on the underlying XML definition file...
Represents a device removed PnP event.
One of the parameter given was not valid or out of range.
The class INode act as base for of the main classes and provided the access to the node objects (feat...
Event handling is disabled. No events can be retrieved.
PnPType
Enumeration, which defines kinds of PnP events.
bgapi: BGAPI::Camera Class Reference

Jan, 14 2020
Baumer Optronic GmbH, Badstrasse 30, 01454 D-Radeberg, Tel:+49-3528-4386-0, Fax:+49-3528-4386-86, Email:support.cameras@baumer.com