_UsbStreamParams.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428
  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 Stream Grabber parameters
  9. */
  10. //-----------------------------------------------------------------------------
  11. // This file is generated automatically
  12. // Do not modify!
  13. //-----------------------------------------------------------------------------
  14. #ifndef Basler_UsbStreamParams_PARAMS_H
  15. #define Basler_UsbStreamParams_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_UsbStreamParams
  61. {
  62. //**************************************************************************************************
  63. // Enumerations
  64. //**************************************************************************************************
  65. //! Valid values for Status
  66. enum StatusEnums
  67. {
  68. Status_Closed, //!<The stream grabber is closed.
  69. Status_Open, //!<The stream grabber is open.
  70. Status_Grabbing //!<The stream grabber is grabbing.
  71. };
  72. //**************************************************************************************************
  73. // Parameter class
  74. //**************************************************************************************************
  75. //! Interface to the PylonUsb Stream Grabber parameters
  76. class CUsbStreamParams_Params
  77. {
  78. //----------------------------------------------------------------------------------------------------------------
  79. // Implementation
  80. //----------------------------------------------------------------------------------------------------------------
  81. protected:
  82. // If you want to show the following methods in the help file
  83. // add the string HIDE_CLASS_METHODS to the ENABLED_SECTIONS tag in the doxygen file
  84. //! \cond HIDE_CLASS_METHODS
  85. //! Constructor
  86. CUsbStreamParams_Params( void );
  87. //! Destructor
  88. ~CUsbStreamParams_Params( void );
  89. //! Initializes the references
  90. void _Initialize( GENAPI_NAMESPACE::INodeMap* );
  91. //! Return the vendor of the camera
  92. const char* _GetVendorName( void );
  93. //! Returns the camera model name
  94. const char* _GetModelName( void );
  95. //! \endcond
  96. //----------------------------------------------------------------------------------------------------------------
  97. // References to features
  98. //----------------------------------------------------------------------------------------------------------------
  99. public:
  100. //! \name Root - Interface to the USB-specific stream parameters.
  101. //@{
  102. /*!
  103. \brief Maximum number of buffers that can be used simultaneously for grabbing images.
  104. \b Visibility = Expert
  105. */
  106. GENAPI_NAMESPACE::IInteger& MaxNumBuffer;
  107. //@}
  108. //! \name Root - Interface to the USB-specific stream parameters.
  109. //@{
  110. /*!
  111. \brief Maximum size (in bytes) of a buffer used for grabbing images.
  112. \b Visibility = Expert
  113. */
  114. GENAPI_NAMESPACE::IInteger& MaxBufferSize;
  115. //@}
  116. //! \name Root - Interface to the USB-specific stream parameters.
  117. //@{
  118. /*!
  119. \brief Maximum USB data transfer size in bytes.
  120. The default value is appropriate for most applications.
  121. Reducing the value may cause a higher CPU load. USB host adapter drivers may require
  122. to decrease the value in case the application fails to receive the image stream. The maximum value
  123. for the Maximum Transfer Size depends on the operating system version and may be limited by the host adapter drivers.
  124. \b Visibility = Guru
  125. */
  126. GENAPI_NAMESPACE::IInteger& MaxTransferSize;
  127. //@}
  128. //! \name Root - Interface to the USB-specific stream parameters.
  129. //@{
  130. /*!
  131. \brief Maximum number of USB request blocks (URBs) to be enqueued simultaneously.
  132. \b Visibility = Guru
  133. */
  134. GENAPI_NAMESPACE::IInteger& NumMaxQueuedUrbs;
  135. //@}
  136. //! \name Root - Interface to the USB-specific stream parameters.
  137. //@{
  138. /*!
  139. \brief Priority of the thread that handles USB requests from the stream interface.
  140. \b Visibility = Guru
  141. */
  142. GENAPI_NAMESPACE::IInteger& TransferLoopThreadPriority;
  143. //@}
  144. //! \name Root - Interface to the USB-specific stream parameters.
  145. //@{
  146. /*!
  147. \brief Timeout for payload and trailer transfers in milliseconds.
  148. Timeout for payload and trailer transfers in milliseconds.
  149. \b Visibility = Invisible
  150. */
  151. GENAPI_NAMESPACE::IInteger& TransferTimeout;
  152. //@}
  153. //! \name Statistic - Statistical data.
  154. //@{
  155. /*!
  156. \brief GigE cameras: Number of frames received. Other cameras: Number of buffers processed.
  157. \b Visibility = Expert
  158. */
  159. GENAPI_NAMESPACE::IInteger& Statistic_Total_Buffer_Count;
  160. //@}
  161. //! \name Statistic - Statistical data.
  162. //@{
  163. /*!
  164. \brief GigE cameras: Number of buffers with at least one failed packet. A packet is considered failed if its status is not 'success'. Other cameras: Number of buffers that returned with an error status.
  165. \b Visibility = Expert
  166. */
  167. GENAPI_NAMESPACE::IInteger& Statistic_Failed_Buffer_Count;
  168. //@}
  169. //! \name Statistic - Statistical data.
  170. //@{
  171. /*!
  172. \brief Status code of the last failed buffer.
  173. \b Visibility = Expert
  174. */
  175. GENAPI_NAMESPACE::IInteger& Statistic_Last_Failed_Buffer_Status;
  176. //@}
  177. //! \name Statistic - Statistical data.
  178. //@{
  179. /*!
  180. \brief Status code of the last failed buffer.
  181. \b Visibility = Expert
  182. */
  183. GENAPI_NAMESPACE::IString& Statistic_Last_Failed_Buffer_Status_Text;
  184. //@}
  185. //! \name Statistic - Statistical data.
  186. //@{
  187. /*!
  188. \brief Number of corrupt or lost frames between successfully grabbed images.
  189. \b Visibility = Expert
  190. */
  191. GENAPI_NAMESPACE::IInteger& Statistic_Missed_Frame_Count;
  192. //@}
  193. //! \name Statistic - Statistical data.
  194. //@{
  195. /*!
  196. \brief Number of stream resynchronizations.
  197. \b Visibility = Expert
  198. */
  199. GENAPI_NAMESPACE::IInteger& Statistic_Resynchronization_Count;
  200. //@}
  201. //! \name Statistic - Statistical data.
  202. //@{
  203. /*!
  204. \brief Last grabbed block ID.
  205. \b Visibility = Expert
  206. */
  207. GENAPI_NAMESPACE::IInteger& Statistic_Last_Block_Id;
  208. //@}
  209. private:
  210. //! \cond HIDE_CLASS_METHODS
  211. //! not implemented copy constructor
  212. CUsbStreamParams_Params( CUsbStreamParams_Params& );
  213. //! not implemented assignment operator
  214. CUsbStreamParams_Params& operator=( CUsbStreamParams_Params& );
  215. //! \endcond
  216. };
  217. //**************************************************************************************************
  218. // Parameter class implementation
  219. //**************************************************************************************************
  220. //! \cond HIDE_CLASS_METHODS
  221. inline CUsbStreamParams_Params::CUsbStreamParams_Params( void )
  222. : MaxNumBuffer( *new GENAPI_NAMESPACE::CIntegerRef() )
  223. , MaxBufferSize( *new GENAPI_NAMESPACE::CIntegerRef() )
  224. , MaxTransferSize( *new GENAPI_NAMESPACE::CIntegerRef() )
  225. , NumMaxQueuedUrbs( *new GENAPI_NAMESPACE::CIntegerRef() )
  226. , TransferLoopThreadPriority( *new GENAPI_NAMESPACE::CIntegerRef() )
  227. , TransferTimeout( *new GENAPI_NAMESPACE::CIntegerRef() )
  228. , Statistic_Total_Buffer_Count( *new GENAPI_NAMESPACE::CIntegerRef() )
  229. , Statistic_Failed_Buffer_Count( *new GENAPI_NAMESPACE::CIntegerRef() )
  230. , Statistic_Last_Failed_Buffer_Status( *new GENAPI_NAMESPACE::CIntegerRef() )
  231. , Statistic_Last_Failed_Buffer_Status_Text( *new GENAPI_NAMESPACE::CStringRef() )
  232. , Statistic_Missed_Frame_Count( *new GENAPI_NAMESPACE::CIntegerRef() )
  233. , Statistic_Resynchronization_Count( *new GENAPI_NAMESPACE::CIntegerRef() )
  234. , Statistic_Last_Block_Id( *new GENAPI_NAMESPACE::CIntegerRef() )
  235. {
  236. }
  237. inline CUsbStreamParams_Params::~CUsbStreamParams_Params( void )
  238. {
  239. delete static_cast <GENAPI_NAMESPACE::CIntegerRef*> (&MaxNumBuffer);
  240. delete static_cast <GENAPI_NAMESPACE::CIntegerRef*> (&MaxBufferSize);
  241. delete static_cast <GENAPI_NAMESPACE::CIntegerRef*> (&MaxTransferSize);
  242. delete static_cast <GENAPI_NAMESPACE::CIntegerRef*> (&NumMaxQueuedUrbs);
  243. delete static_cast <GENAPI_NAMESPACE::CIntegerRef*> (&TransferLoopThreadPriority);
  244. delete static_cast <GENAPI_NAMESPACE::CIntegerRef*> (&TransferTimeout);
  245. delete static_cast <GENAPI_NAMESPACE::CIntegerRef*> (&Statistic_Total_Buffer_Count);
  246. delete static_cast <GENAPI_NAMESPACE::CIntegerRef*> (&Statistic_Failed_Buffer_Count);
  247. delete static_cast <GENAPI_NAMESPACE::CIntegerRef*> (&Statistic_Last_Failed_Buffer_Status);
  248. delete static_cast <GENAPI_NAMESPACE::CStringRef*> (&Statistic_Last_Failed_Buffer_Status_Text);
  249. delete static_cast <GENAPI_NAMESPACE::CIntegerRef*> (&Statistic_Missed_Frame_Count);
  250. delete static_cast <GENAPI_NAMESPACE::CIntegerRef*> (&Statistic_Resynchronization_Count);
  251. delete static_cast <GENAPI_NAMESPACE::CIntegerRef*> (&Statistic_Last_Block_Id);
  252. }
  253. inline void CUsbStreamParams_Params::_Initialize( GENAPI_NAMESPACE::INodeMap* _Ptr )
  254. {
  255. static_cast<GENAPI_NAMESPACE::CIntegerRef*> (&MaxNumBuffer)->SetReference( _Ptr->GetNode( "MaxNumBuffer" ) );
  256. static_cast<GENAPI_NAMESPACE::CIntegerRef*> (&MaxBufferSize)->SetReference( _Ptr->GetNode( "MaxBufferSize" ) );
  257. static_cast<GENAPI_NAMESPACE::CIntegerRef*> (&MaxTransferSize)->SetReference( _Ptr->GetNode( "MaxTransferSize" ) );
  258. static_cast<GENAPI_NAMESPACE::CIntegerRef*> (&NumMaxQueuedUrbs)->SetReference( _Ptr->GetNode( "NumMaxQueuedUrbs" ) );
  259. static_cast<GENAPI_NAMESPACE::CIntegerRef*> (&TransferLoopThreadPriority)->SetReference( _Ptr->GetNode( "TransferLoopThreadPriority" ) );
  260. static_cast<GENAPI_NAMESPACE::CIntegerRef*> (&TransferTimeout)->SetReference( _Ptr->GetNode( "TransferTimeout" ) );
  261. static_cast<GENAPI_NAMESPACE::CIntegerRef*> (&Statistic_Total_Buffer_Count)->SetReference( _Ptr->GetNode( "Statistic_Total_Buffer_Count" ) );
  262. static_cast<GENAPI_NAMESPACE::CIntegerRef*> (&Statistic_Failed_Buffer_Count)->SetReference( _Ptr->GetNode( "Statistic_Failed_Buffer_Count" ) );
  263. static_cast<GENAPI_NAMESPACE::CIntegerRef*> (&Statistic_Last_Failed_Buffer_Status)->SetReference( _Ptr->GetNode( "Statistic_Last_Failed_Buffer_Status" ) );
  264. static_cast<GENAPI_NAMESPACE::CStringRef*> (&Statistic_Last_Failed_Buffer_Status_Text)->SetReference( _Ptr->GetNode( "Statistic_Last_Failed_Buffer_Status_Text" ) );
  265. static_cast<GENAPI_NAMESPACE::CIntegerRef*> (&Statistic_Missed_Frame_Count)->SetReference( _Ptr->GetNode( "Statistic_Missed_Frame_Count" ) );
  266. static_cast<GENAPI_NAMESPACE::CIntegerRef*> (&Statistic_Resynchronization_Count)->SetReference( _Ptr->GetNode( "Statistic_Resynchronization_Count" ) );
  267. static_cast<GENAPI_NAMESPACE::CIntegerRef*> (&Statistic_Last_Block_Id)->SetReference( _Ptr->GetNode( "Statistic_Last_Block_Id" ) );
  268. }
  269. inline const char* CUsbStreamParams_Params::_GetVendorName( void )
  270. {
  271. return "Basler";
  272. }
  273. inline const char* CUsbStreamParams_Params::_GetModelName( void )
  274. {
  275. return "UsbStreamParams";
  276. }
  277. //! \endcond
  278. } // namespace Basler_UsbStreamParams
  279. #if GCC_DIAGNOSTIC_AWARE
  280. # if GCC_DIAGNOSTIC_PUSH_POP_AWARE
  281. # pragma GCC diagnostic pop
  282. # else
  283. # pragma GCC diagnostic warning "-Wdeprecated-declarations"
  284. # endif
  285. #endif
  286. #undef GENAPI_DEPRECATED_FEATURE
  287. #endif // Basler_UsbStreamParams_PARAMS_H