pylon/InstantCameraArray.h#
Namespaces#
| Name |
|---|
| Pylon Contains definitions of pylon types. |
Classes#
| Name | |
|---|---|
| class | Pylon::CInstantCameraArray Supports grabbing with multiple camera devices. |
Source code#
//------------------------------------------------------------------------------
// Basler pylon SDK
// Copyright (c) 2010-2022 Basler AG
// http://www.baslerweb.com
// Author: Andreas Gau
//------------------------------------------------------------------------------
#ifndef INCLUDED_INSTANTCAMERAARRAY_H_3108332
#define INCLUDED_INSTANTCAMERAARRAY_H_3108332
#include <pylon/Platform.h>
#ifdef _MSC_VER
# pragma pack(push, PYLON_PACKING)
#endif /* _MSC_VER */
#include <pylon/InstantCamera.h>
namespace Pylon
{
class PYLONBASE_API CInstantCameraArray
{
public:
//Creation and life time------------------------------------------------
CInstantCameraArray();
CInstantCameraArray( size_t numberOfCameras );
virtual ~CInstantCameraArray();
virtual void Initialize( size_t numberOfCameras );
virtual bool IsPylonDeviceAttached() const;
virtual bool IsCameraDeviceRemoved() const;
virtual void DestroyDevice();
virtual void DetachDevice();
//Control opening and closing of the device-----------------------------
virtual void Open();
virtual bool IsOpen() const;
virtual void Close();
virtual size_t GetSize() const;
virtual CInstantCamera& operator[]( size_t index );
virtual const CInstantCamera& operator[]( size_t index ) const;
//Grab -----------------------------------------------------------------
virtual void StartGrabbing( EGrabStrategy strategy = GrabStrategy_OneByOne, EGrabLoop grabLoopType = GrabLoop_ProvidedByUser );
virtual bool RetrieveResult( unsigned int timeoutMs, CGrabResultPtr& grabResult, ETimeoutHandling timeoutHandling = TimeoutHandling_ThrowException );
virtual void StopGrabbing();
virtual bool IsGrabbing() const;
public:
typedef CInstantCamera InstantCamera_t;
protected:
//Functionality that can be provided by specializing class--------------
/*
\brief Creates an instance of an instant camera class.
The method is called from Initialize() method.
\return Returns pointer to the created class.
\error
Does not throw C++ exceptions, except when memory allocation fails.
*/
virtual CInstantCamera* CreateInstantCamera();
/*
\brief Destroys an instance of an instant camera class.
The method is called from Initialize() method.
Cameras are destroyed in the reverse order they are created.
\param[in] pCamera Camera instance to destroy.
\error
Does not throw C++ exceptions.
*/
virtual void DestroyInstantCamera( CInstantCamera* pCamera );
private:
// The camera array object can not be copied.
CInstantCameraArray( const CInstantCameraArray& );
// The camera array object can not be copied.
void operator = ( const CInstantCameraArray& );
class CInstantCameraArrayImpl;
CInstantCameraArrayImpl* m_pImpl;
};
}
#ifdef _MSC_VER
# pragma pack(pop)
#endif /* _MSC_VER */
#endif /* INCLUDED_INSTANTCAMERAARRAY_H_3108332 */
Updated on 5 July 2022 at 15:30:01