All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
Pylon::CPylonDeviceProxyT< TCameraParams > Class Template Reference

Low Level API: The camera class for generic camera devices. More...

#include <pylon/PylonDeviceProxy.h>

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

Public Member Functions

Construction
 CPylonDeviceProxyT ()
 Creates a camera object that is not attached to an pylon device. Use the Attach() method to attach the device.
 
 CPylonDeviceProxyT (IPylonDevice *, 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...
 
virtual ~CPylonDeviceProxyT ()
 Destructor.
 
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::INodeMapGetNodeMap (void)
 Returns the set of camera parameters. More...
 
GenApi::INodeMapGetTLNodeMap (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...
 

Detailed Description

template<class TCameraParams>
class Pylon::CPylonDeviceProxyT< TCameraParams >

Low Level API: The camera class for generic camera devices.

This is the base class for pylon camera classes 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::CPylonDeviceProxyT< TCameraParams >::CPylonDeviceProxyT ( 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
inline

Returns the access mode used to open the device.

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

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  )
inline

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  )
inline

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  )
inline

Creates an Event adapter.

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

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

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

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)
inline

Deletes a chunk parser.

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

Deletes an Event adapter.

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

Deletes a self-reliant chunk parser.

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

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  )
inline

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  )
inline

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
inline

Returns the number of stream grabbers the camera object provides.

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

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  )
inline

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
inline

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))
inline

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)
inline

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.9
Copyright © 2006-2017 Basler AG (Tue May 30 2017 17:24:58)