EventGrabber.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. //-----------------------------------------------------------------------------
  2. // Basler pylon SDK
  3. // Copyright (c) 2006-2021 Basler AG
  4. // http://www.baslerweb.com
  5. // Author: Hartmut Nebelung, AH
  6. //-----------------------------------------------------------------------------
  7. /*!
  8. \file
  9. \brief Low Level API: Definition of IEventGrabber interface
  10. */
  11. #ifndef __IEVENTGRABBER_H__
  12. #define __IEVENTGRABBER_H__
  13. #if _MSC_VER > 1000
  14. #pragma once
  15. #endif //_MSC_VER > 1000
  16. #include <pylon/Platform.h>
  17. #ifdef _MSC_VER
  18. # pragma pack(push, PYLON_PACKING)
  19. #endif /* _MSC_VER */
  20. #include <GenICamFwd.h>
  21. #include <pylon/stdinclude.h>
  22. namespace Pylon
  23. {
  24. class EventResult;
  25. class WaitObject;
  26. /*!
  27. \interface IEventGrabber
  28. \ingroup Pylon_LowLevelApi
  29. \brief Low Level API: Interface of an object receiving asynchronous events.
  30. Asynchronous event messages are received from the camera. Internal Buffers are filled
  31. and stored in an output queue. While the output queue contains data the associated
  32. waitobject is signaled.
  33. With RetrieveEvent() the first event message is copied into a user buffer.
  34. */
  35. interface PUBLIC_INTERFACE IEventGrabber
  36. {
  37. /// Open the event grabber
  38. virtual void Open() = 0;
  39. /// Close the event grabber
  40. virtual void Close() = 0;
  41. /// Retrieve whether the event grabber is open
  42. virtual bool IsOpen() const = 0;
  43. /// Retrieve an event message from the output queue
  44. /*!
  45. \return When the event was available true is returned
  46. and the event message is copied into the EventResult.
  47. */
  48. virtual bool RetrieveEvent( EventResult& ) = 0;
  49. /// Return the event object associated with the grabber
  50. /*!
  51. This object get signaled as soon as a event has occurred.
  52. It will be reset when the output queue is empty.
  53. */
  54. virtual WaitObject& GetWaitObject() const = 0;
  55. /// Return the associated event grabber parameters
  56. /*! If no parameters are available, NULL is returned. */
  57. virtual GenApi::INodeMap* GetNodeMap() = 0;
  58. };
  59. }
  60. #ifdef _MSC_VER
  61. # pragma pack(pop)
  62. #endif /* _MSC_VER */
  63. #endif //__IEVENTGRABBER_H__