pylon/AcquireContinuousConfiguration.h#
Namespaces#
| Name |
|---|
| Pylon Contains definitions of pylon types. |
Classes#
| Name | |
|---|---|
| class | Pylon::CAcquireContinuousConfiguration Changes the configuration of the camera to free-running continuous acquisition. |
Detailed Description#
An instant camera configuration for free-running continuous acquisition.
This instant camera configuration is provided as header-only file. The code can be copied and modified for creating own configuration classes.
Source code#
//-----------------------------------------------------------------------------
// Basler pylon SDK
// Copyright (c) 2010-2022 Basler AG
// http://www.baslerweb.com
// Author: Andreas Gau
//-----------------------------------------------------------------------------
#ifndef INCLUDED_ACQUIRECONTINUOUSCONFIGURATION_H_7346765
#define INCLUDED_ACQUIRECONTINUOUSCONFIGURATION_H_7346765
#include <pylon/Platform.h>
#ifdef _MSC_VER
# pragma pack(push, PYLON_PACKING)
#endif /* _MSC_VER */
#include <pylon/InstantCamera.h>
#include <pylon/ParameterIncludes.h>
#include <pylon/ConfigurationHelper.h>
namespace Pylon
{
class CAcquireContinuousConfiguration : public CConfigurationEventHandler
{
public:
virtual ~CAcquireContinuousConfiguration()
{
}
static void ApplyConfiguration( GenApi::INodeMap& nodemap )
{
using namespace GenApi;
//Disable all trigger types.
CConfigurationHelper::DisableAllTriggers( nodemap );
//Disable compression mode.
CConfigurationHelper::DisableCompression( nodemap );
//Disable GenDC streaming.
CConfigurationHelper::DisableGenDC( nodemap );
// Set image component.
CConfigurationHelper::SelectRangeComponent( nodemap );
//Set acquisition mode.
CEnumParameter( nodemap, "AcquisitionMode" ).SetValue( "Continuous" );
}
//Set basic camera settings.
virtual void OnOpened( CInstantCamera& camera )
{
try
{
ApplyConfiguration( camera.GetNodeMap() );
// Probe max packet size
CConfigurationHelper::ProbePacketSize( camera.GetStreamGrabberNodeMap() );
}
catch (const GenericException& e)
{
throw RUNTIME_EXCEPTION( "Could not apply configuration. Pylon::GenericException caught in OnOpened method msg=%hs", e.what() );
}
catch (const std::exception& e)
{
throw RUNTIME_EXCEPTION( "Could not apply configuration. std::exception caught in OnOpened method msg=%hs", e.what() );
}
catch (...)
{
throw RUNTIME_EXCEPTION( "Could not apply configuration. Unknown exception caught in OnOpened method." );
}
}
};
}
#ifdef _MSC_VER
# pragma pack(pop)
#endif /* _MSC_VER */
#endif /* INCLUDED_ACQUIRECONTINUOUSCONFIGURATION_H_7346765 */
Updated on 5 July 2022 at 15:30:01