All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Static Public Member Functions | List of all members
Pylon::CPylonUsbCameraT< TCameraParams > Class Template Reference

Low Level API: The camera class for pylon USB3 Vision camera devices. More...

#include <pylon/usb/PylonUsbCamera.h>

Inheritance diagram for Pylon::CPylonUsbCameraT< TCameraParams >:
Inheritance graph
[legend]

Public Types

typedef Pylon::CBaslerUsbDeviceInfo DeviceInfo_t
 PylonUsb specific Device Info object.
 
typedef Pylon::CPylonUsbTLParams TlParams_t
 Low Level API: Class for pylon USB3 Vision cameras providing access to transport layer related parameters.
 
typedef
Pylon::CPylonUsbStreamGrabber 
StreamGrabber_t
 Low Level API: Class for pylon USB3 Vision cameras providing access to stream grabber related methods and parameters.
 
typedef
Pylon::CPylonUsbEventGrabber 
EventGrabber_t
 Low Level API: Class for pylon USB3 Vision cameras providing access to event grabber related methods and parameters.
 

Public Member Functions

Construction
 CPylonUsbCameraT ()
 Creates a camera object that is not attached to an pylon device. Use the Attach() method to attach the device. More...
 
 CPylonUsbCameraT (IPylonDevice *pDevice, bool takeOwnership=true)
 Creates a camera object and attaches a camera object to a pylon device that takes the ownership over an pylon device. More...
 
Some smart pointer functionality
virtual void Attach (IPylonDevice *, bool takeOwnership=true)
 Attach the camera object to a pylon device. More...
 
virtual bool IsAttached () const
 Checks if a pylon device is attached to the camera object.
 
virtual bool HasOwnership () const
 Checks if the camera object has the ownership of the pylon device.
 
virtual IPylonDeviceGetDevice () const
 Returns the pylon device interface pointer.
 
Implementation of the IPylonDevice interface.

See Pylon::IPylonDevice for more details.

void Open (AccessModeSet mode=(Stream|Control|Event))
 Opens a device. More...
 
void Close (void)
 Closes a device. More...
 
bool IsOpen (void) const
 Checks if a device already is opened. More...
 
AccessModeSet AccessMode (void) const
 Returns the access mode used to open the device. More...
 
const CDeviceInfoGetDeviceInfo (void) const
 Returns the device info object storing information like the device's name. More...
 
uint32_t GetNumStreamGrabberChannels (void) const
 Returns the number of stream grabbers the camera object provides. More...
 
IStreamGrabberGetStreamGrabber (uint32_t index)
 Returns a pointer to a stream grabber. More...
 
IEventGrabberGetEventGrabber (void)
 Returns a pointer to an event grabber. More...
 
GenApi::INodeMap * GetNodeMap (void)
 Returns the set of camera parameters. More...
 
GenApi::INodeMap * GetTLNodeMap (void)
 Returns the set of camera related transport layer parameters. More...
 
Pylon::IChunkParserCreateChunkParser (void)
 Creates a chunk parser used to update those camera object members reflecting the content of additional data chunks appended to the image data. More...
 
void DestroyChunkParser (Pylon::IChunkParser *pChunkParser)
 Deletes a chunk parser. More...
 
IEventAdapterCreateEventAdapter (void)
 Creates an Event adapter. More...
 
void DestroyEventAdapter (IEventAdapter *pAdapter)
 Deletes an Event adapter. More...
 
virtual ISelfReliantChunkParserCreateSelfReliantChunkParser ()
 Creates a a self-reliant chunk parser, returns NULL if not supported. More...
 
virtual void DestroySelfReliantChunkParser (ISelfReliantChunkParser *pChunkParser)
 Deletes a self-reliant chunk parser. More...
 
DeviceCallbackHandle RegisterRemovalCallback (DeviceCallback &d)
 Registers a surprise removal callback object. More...
 
bool DeregisterRemovalCallback (DeviceCallbackHandle h)
 Deregisters a surprise removal callback object. More...
 

Static Public Member Functions

static String_t DeviceClass ()
 The name of this device class, use this for enumeration.
 

Detailed Description

template<class TCameraParams>
class Pylon::CPylonUsbCameraT< TCameraParams >

Low Level API: The camera class for pylon USB3 Vision camera devices.

This is the base class for pylon USB3 Vision cameras providing access to camera parameters.

See Also
Accessing Parameters
Template Parameters
TCameraParamsThe camera specific parameter class (auto generated from camera xml file)

Constructor & Destructor Documentation

template<class TCameraParams>
Pylon::CPylonUsbCameraT< TCameraParams >::CPylonUsbCameraT ( )
inline

Creates a camera object that is not attached to an pylon device. Use the Attach() method to attach the device.

template<class TCameraParams>
Pylon::CPylonUsbCameraT< TCameraParams >::CPylonUsbCameraT ( IPylonDevice pDevice,
bool  takeOwnership = true 
)
inline

Creates a camera object and attaches a camera object to a pylon device that takes the ownership over an pylon device.

When having the ownership, the destructor of this camera object destroys the pylon device the camera object is attached to. Otherwise, the pylon device object remains valid when the camera object has been destroyed.

Member Function Documentation

template<class TCameraParams>
AccessModeSet Pylon::CPylonDeviceProxyT< TCameraParams >::AccessMode ( void  ) const
inlineinherited

Returns the access mode used to open the device.

template<class TCameraParams >
void Pylon::CPylonDeviceProxyT< TCameraParams >::Attach ( IPylonDevice pDevice,
bool  takeOwnership = true 
)
inlinevirtualinherited

Attach the camera object to a pylon device.

It is not allowed to call Attach when the camera object is already attached!

When having the ownership, the destructor of this camera object destroys the pylon device the camera object is attached to. Otherwise, the pylon device object remains valid when the camera object has been destroyed.

Reimplemented in Pylon::CPylonGigEDeviceProxyT< TCameraParams >, and Pylon::CPylonGigEDeviceProxyT< Basler_GigECamera::CGigECamera_Params >.

template<class TCameraParams>
void Pylon::CPylonDeviceProxyT< TCameraParams >::Close ( void  )
inlineinherited

Closes a device.

The close method closes all involved drivers and an existing connection to the device will be released. Other applications now can access the device.

template<class TCameraParams>
Pylon::IChunkParser* Pylon::CPylonDeviceProxyT< TCameraParams >::CreateChunkParser ( void  )
inlineinherited

Creates a chunk parser used to update those camera object members reflecting the content of additional data chunks appended to the image data.

Returns
Pointer to the created chunk parser
Note
Don't try to delete a chunk parser pointer by calling free or delete. Instead, use the DestroyChunkParser() method
template<class TCameraParams>
IEventAdapter* Pylon::CPylonDeviceProxyT< TCameraParams >::CreateEventAdapter ( void  )
inlineinherited

Creates an Event adapter.

template<class TCameraParams>
virtual ISelfReliantChunkParser* Pylon::CPylonDeviceProxyT< TCameraParams >::CreateSelfReliantChunkParser ( )
inlinevirtualinherited

Creates a a self-reliant chunk parser, returns NULL if not supported.

template<class TCameraParams>
bool Pylon::CPylonDeviceProxyT< TCameraParams >::DeregisterRemovalCallback ( DeviceCallbackHandle  h)
inlineinherited

Deregisters a surprise removal callback object.

Parameters
hHandle of the callback to be removed
template<class TCameraParams>
void Pylon::CPylonDeviceProxyT< TCameraParams >::DestroyChunkParser ( Pylon::IChunkParser pChunkParser)
inlineinherited

Deletes a chunk parser.

Parameters
pChunkParserPointer to the chunk parser to be deleted
template<class TCameraParams>
void Pylon::CPylonDeviceProxyT< TCameraParams >::DestroyEventAdapter ( IEventAdapter pAdapter)
inlineinherited

Deletes an Event adapter.

template<class TCameraParams>
virtual void Pylon::CPylonDeviceProxyT< TCameraParams >::DestroySelfReliantChunkParser ( ISelfReliantChunkParser pChunkParser)
inlinevirtualinherited

Deletes a self-reliant chunk parser.

template<class TCameraParams>
const CDeviceInfo& Pylon::CPylonDeviceProxyT< TCameraParams >::GetDeviceInfo ( void  ) const
inlineinherited

Returns the device info object storing information like the device's name.

Returns
A reference to the device info object used to create the device by a device factory
template<class TCameraParams>
IEventGrabber* Pylon::CPylonDeviceProxyT< TCameraParams >::GetEventGrabber ( void  )
inlineinherited

Returns a pointer to an event grabber.

Event grabbers are used to handle events sent from a camera device.

template<class TCameraParams>
GenApi::INodeMap* Pylon::CPylonDeviceProxyT< TCameraParams >::GetNodeMap ( void  )
inlineinherited

Returns the set of camera parameters.

Returns
Pointer to the GenApi node map holding the parameters
template<class TCameraParams>
uint32_t Pylon::CPylonDeviceProxyT< TCameraParams >::GetNumStreamGrabberChannels ( void  ) const
inlineinherited

Returns the number of stream grabbers the camera object provides.

template<class TCameraParams>
IStreamGrabber* Pylon::CPylonDeviceProxyT< TCameraParams >::GetStreamGrabber ( uint32_t  index)
inlineinherited

Returns a pointer to a stream grabber.

Stream grabbers (IStreamGrabber) are the objects used to grab images from a camera device. A camera device might be able to send image data over more than one logical channel called stream. A stream grabber grabs data from one single stream.

Parameters
indexThe number of the grabber to return
Returns
A pointer to a stream grabber, NULL if index is out of range
template<class TCameraParams>
GenApi::INodeMap* Pylon::CPylonDeviceProxyT< TCameraParams >::GetTLNodeMap ( void  )
inlineinherited

Returns the set of camera related transport layer parameters.

Returns
Pointer to the GenApi node holding the transport layer parameter. If there are no transport layer parameters for the device, NULL is returned.
template<class TCameraParams>
bool Pylon::CPylonDeviceProxyT< TCameraParams >::IsOpen ( void  ) const
inlineinherited

Checks if a device already is opened.

Returns
true, when the device already has been opened by the calling application.
Note
When a device has been opened an application A, IsOpen() will return false when called by an application B not having called the device's open method.
template<class TCameraParams>
void Pylon::CPylonDeviceProxyT< TCameraParams >::Open ( AccessModeSet  mode = (Stream | Control | Event))
inlineinherited

Opens a device.

The open method initializes all involved drivers and establishes a connection to the device.

A device may support different access modes, e.g. EDeviceAccessMode::Exclusive providing an exclusive access to the device.

Parameters
modeThe desired device access mode
template<class TCameraParams>
DeviceCallbackHandle Pylon::CPylonDeviceProxyT< TCameraParams >::RegisterRemovalCallback ( DeviceCallback d)
inlineinherited

Registers a surprise removal callback object.

Parameters
dreference to a device callback object
Returns
A handle which must be used to deregister a callback It is recommended to use one of the RegisterRemovalCallback() helper functions to register a callback.

Example how to register a C function

void MyRemovalCallback( Pylon::IPylonDevice* pDevice)
{
// handle removal
}
Pylon::RegisterRemovalCallback( m_pCamera, &MyRemovalCallback);

Example how to register a class member function

class C
{
void MyRemovalCallback( Pylon::IPylonDevice* pDevice )
{
// handle removal
}
} c;
Pylon::RegisterRemovalCallback( m_pCamera, c, &C::MyRemovalCallback);

The documentation for this class was generated from the following file:

pylon 5.0.5
Copyright © 2006-2016 Basler AG (Thu Aug 11 2016 18:01:29)