_UsbEventParams.h 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. //-----------------------------------------------------------------------------
  2. // Copyright (c) 2004-2021 Basler AG
  3. // Section: Vision Components
  4. // Project: GenApi
  5. //-----------------------------------------------------------------------------
  6. /*!
  7. \file
  8. \brief Interface to the PylonUsb Event Grabber parameters
  9. */
  10. //-----------------------------------------------------------------------------
  11. // This file is generated automatically
  12. // Do not modify!
  13. //-----------------------------------------------------------------------------
  14. #ifndef Basler_UsbEventParams_PARAMS_H
  15. #define Basler_UsbEventParams_PARAMS_H
  16. #include <GenApi/IEnumerationT.h>
  17. #include <GenApi/NodeMapRef.h>
  18. #include <GenApi/DLLLoad.h>
  19. // common node types
  20. #include <GenApi/IBoolean.h>
  21. #include <GenApi/ICategory.h>
  22. #include <GenApi/ICommand.h>
  23. #include <GenApi/IEnumeration.h>
  24. #include <GenApi/IEnumEntry.h>
  25. #include <GenApi/IFloat.h>
  26. #include <GenApi/IInteger.h>
  27. #include <GenApi/IString.h>
  28. #include <GenApi/IRegister.h>
  29. #ifdef __GNUC__
  30. # undef GCC_VERSION
  31. # define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
  32. # undef GCC_DIAGNOSTIC_AWARE
  33. # define GCC_DIAGNOSTIC_AWARE (GCC_VERSION >= 40200)
  34. # undef GCC_DIAGNOSTIC_PUSH_POP_AWARE
  35. # define GCC_DIAGNOSTIC_PUSH_POP_AWARE (GCC_VERSION >= 40600)
  36. #else
  37. # undef GCC_DIAGNOSTIC_AWARE
  38. # define GCC_DIAGNOSTIC_AWARE 0
  39. #endif
  40. #ifdef __GNUC__
  41. // GCC_DIAGNOSTIC_AWARE ensures that the internal deprecated warnings can be ignored by gcc.
  42. // As a result older gcc will not generate warnings about really used deprecated features.
  43. # if GCC_DIAGNOSTIC_AWARE
  44. # define GENAPI_DEPRECATED_FEATURE __attribute__((deprecated))
  45. # else
  46. # define GENAPI_DEPRECATED_FEATURE
  47. # endif
  48. #elif defined(_MSC_VER)
  49. # define GENAPI_DEPRECATED_FEATURE __declspec(deprecated)
  50. #else
  51. # define GENAPI_DEPRECATED_FEATURE
  52. #endif
  53. #if GCC_DIAGNOSTIC_AWARE
  54. # if GCC_DIAGNOSTIC_PUSH_POP_AWARE
  55. # pragma GCC diagnostic push
  56. # endif
  57. # pragma GCC diagnostic ignored "-Wdeprecated-declarations"
  58. #endif
  59. //! The namespace containing the device's control interface and related enumeration types
  60. namespace Basler_UsbEventParams
  61. {
  62. //**************************************************************************************************
  63. // Enumerations
  64. //**************************************************************************************************
  65. //! Valid values for Status
  66. enum StatusEnums
  67. {
  68. Status_Closed, //!<The low level event grabber is closed.
  69. Status_Open //!<The low level event grabber is open.
  70. };
  71. //**************************************************************************************************
  72. // Parameter class
  73. //**************************************************************************************************
  74. //! Interface to the PylonUsb Event Grabber parameters
  75. class CUsbEventParams_Params
  76. {
  77. //----------------------------------------------------------------------------------------------------------------
  78. // Implementation
  79. //----------------------------------------------------------------------------------------------------------------
  80. protected:
  81. // If you want to show the following methods in the help file
  82. // add the string HIDE_CLASS_METHODS to the ENABLED_SECTIONS tag in the doxygen file
  83. //! \cond HIDE_CLASS_METHODS
  84. //! Constructor
  85. CUsbEventParams_Params( void );
  86. //! Destructor
  87. ~CUsbEventParams_Params( void );
  88. //! Initializes the references
  89. void _Initialize( GENAPI_NAMESPACE::INodeMap* );
  90. //! Return the vendor of the camera
  91. const char* _GetVendorName( void );
  92. //! Returns the camera model name
  93. const char* _GetModelName( void );
  94. //! \endcond
  95. //----------------------------------------------------------------------------------------------------------------
  96. // References to features
  97. //----------------------------------------------------------------------------------------------------------------
  98. public:
  99. //! \name Root - USB event grabber parameters.
  100. //@{
  101. /*!
  102. \brief Number of buffers to be used.
  103. Number of Buffers that are going to be used receiving events.
  104. \b Visibility = Expert
  105. */
  106. GENAPI_NAMESPACE::IInteger& NumBuffer;
  107. //@}
  108. //! \name Root - USB event grabber parameters.
  109. //@{
  110. /*!
  111. \brief Maximum number of USB request blocks (URBs) to be enqueued simultaneously.
  112. \b Visibility = Guru
  113. */
  114. GENAPI_NAMESPACE::IInteger& NumMaxQueuedUrbs;
  115. //@}
  116. //! \name Root - USB event grabber parameters.
  117. //@{
  118. /*!
  119. \brief Priority of the thread that handles USB requests from the stream interface.
  120. \b Visibility = Guru
  121. */
  122. GENAPI_NAMESPACE::IInteger& TransferLoopThreadPriority;
  123. //@}
  124. //! \name Statistic - Statistical data.
  125. //@{
  126. /*!
  127. \brief The total count of processed events.
  128. \b Visibility = Expert
  129. */
  130. GENAPI_NAMESPACE::IInteger& Statistic_Total_Event_Count;
  131. //@}
  132. //! \name Statistic - Statistical data.
  133. //@{
  134. /*!
  135. \brief The count of processed events with an error status.
  136. \b Visibility = Expert
  137. */
  138. GENAPI_NAMESPACE::IInteger& Statistic_Failed_Event_Count;
  139. //@}
  140. //! \name Statistic - Statistical data.
  141. //@{
  142. /*!
  143. \brief The status code of the last failed event buffer.
  144. \b Visibility = Expert
  145. */
  146. GENAPI_NAMESPACE::IInteger& Statistic_Last_Failed_Event_Buffer_Status;
  147. //@}
  148. private:
  149. //! \cond HIDE_CLASS_METHODS
  150. //! not implemented copy constructor
  151. CUsbEventParams_Params( CUsbEventParams_Params& );
  152. //! not implemented assignment operator
  153. CUsbEventParams_Params& operator=( CUsbEventParams_Params& );
  154. //! \endcond
  155. };
  156. //**************************************************************************************************
  157. // Parameter class implementation
  158. //**************************************************************************************************
  159. //! \cond HIDE_CLASS_METHODS
  160. inline CUsbEventParams_Params::CUsbEventParams_Params( void )
  161. : NumBuffer( *new GENAPI_NAMESPACE::CIntegerRef() )
  162. , NumMaxQueuedUrbs( *new GENAPI_NAMESPACE::CIntegerRef() )
  163. , TransferLoopThreadPriority( *new GENAPI_NAMESPACE::CIntegerRef() )
  164. , Statistic_Total_Event_Count( *new GENAPI_NAMESPACE::CIntegerRef() )
  165. , Statistic_Failed_Event_Count( *new GENAPI_NAMESPACE::CIntegerRef() )
  166. , Statistic_Last_Failed_Event_Buffer_Status( *new GENAPI_NAMESPACE::CIntegerRef() )
  167. {
  168. }
  169. inline CUsbEventParams_Params::~CUsbEventParams_Params( void )
  170. {
  171. delete static_cast <GENAPI_NAMESPACE::CIntegerRef*> (&NumBuffer);
  172. delete static_cast <GENAPI_NAMESPACE::CIntegerRef*> (&NumMaxQueuedUrbs);
  173. delete static_cast <GENAPI_NAMESPACE::CIntegerRef*> (&TransferLoopThreadPriority);
  174. delete static_cast <GENAPI_NAMESPACE::CIntegerRef*> (&Statistic_Total_Event_Count);
  175. delete static_cast <GENAPI_NAMESPACE::CIntegerRef*> (&Statistic_Failed_Event_Count);
  176. delete static_cast <GENAPI_NAMESPACE::CIntegerRef*> (&Statistic_Last_Failed_Event_Buffer_Status);
  177. }
  178. inline void CUsbEventParams_Params::_Initialize( GENAPI_NAMESPACE::INodeMap* _Ptr )
  179. {
  180. static_cast<GENAPI_NAMESPACE::CIntegerRef*> (&NumBuffer)->SetReference( _Ptr->GetNode( "NumBuffer" ) );
  181. static_cast<GENAPI_NAMESPACE::CIntegerRef*> (&NumMaxQueuedUrbs)->SetReference( _Ptr->GetNode( "NumMaxQueuedUrbs" ) );
  182. static_cast<GENAPI_NAMESPACE::CIntegerRef*> (&TransferLoopThreadPriority)->SetReference( _Ptr->GetNode( "TransferLoopThreadPriority" ) );
  183. static_cast<GENAPI_NAMESPACE::CIntegerRef*> (&Statistic_Total_Event_Count)->SetReference( _Ptr->GetNode( "Statistic_Total_Event_Count" ) );
  184. static_cast<GENAPI_NAMESPACE::CIntegerRef*> (&Statistic_Failed_Event_Count)->SetReference( _Ptr->GetNode( "Statistic_Failed_Event_Count" ) );
  185. static_cast<GENAPI_NAMESPACE::CIntegerRef*> (&Statistic_Last_Failed_Event_Buffer_Status)->SetReference( _Ptr->GetNode( "Statistic_Last_Failed_Event_Buffer_Status" ) );
  186. }
  187. inline const char* CUsbEventParams_Params::_GetVendorName( void )
  188. {
  189. return "Basler";
  190. }
  191. inline const char* CUsbEventParams_Params::_GetModelName( void )
  192. {
  193. return "UsbEventParams";
  194. }
  195. //! \endcond
  196. } // namespace Basler_UsbEventParams
  197. #if GCC_DIAGNOSTIC_AWARE
  198. # if GCC_DIAGNOSTIC_PUSH_POP_AWARE
  199. # pragma GCC diagnostic pop
  200. # else
  201. # pragma GCC diagnostic warning "-Wdeprecated-declarations"
  202. # endif
  203. #endif
  204. #undef GENAPI_DEPRECATED_FEATURE
  205. #endif // Basler_UsbEventParams_PARAMS_H