pylon/CommandParameter.h#
Namespaces#
Name |
---|
Pylon Contains definitions of pylon types. |
Classes#
Name | |
---|---|
struct | Pylon::ICommandEx Extends the GenApi::ICommand interface with convenience methods. |
class | Pylon::CCommandParameter CCommandParameter class used to simplify access to GenApi parameters. |
Source code#
//------------------------------------------------------------------------------
// Basler pylon SDK
// Copyright (c) 2018-2022 Basler AG
// http://www.baslerweb.com
//------------------------------------------------------------------------------
#ifndef INCLUDED_BASLER_PYLON_CCOMMANDPARAMETER_H
#define INCLUDED_BASLER_PYLON_CCOMMANDPARAMETER_H
#pragma once
#include <pylon/PylonBase.h>
#include <GenApi/ICommand.h>
#include <pylon/Parameter.h>
#ifdef _MSC_VER
# pragma pack(push, PYLON_PACKING)
#endif /* _MSC_VER */
#ifdef _MSC_VER
# pragma warning( push )
# pragma warning( disable : 4275 ) // Class needs to have a dll interface to be used by clients of the class.
# pragma warning( disable : 4250 ) // warning C4250: 'Pylon::CXYZParameter': inherits 'Pylon::CParameter::Pylon::CParameter::ZYX' via dominance
#endif
namespace Pylon
{
interface ICommandEx : virtual public GenApi::ICommand, virtual public IValueEx
{
using GenApi::ICommand::operator=;
virtual bool TryExecute() = 0;
};
class PYLONBASE_API CCommandParameter : public ICommandEx, public CParameter
{
public:
CCommandParameter();
explicit CCommandParameter( GenApi::INode* pNode );
explicit CCommandParameter( GenApi::ICommand* pCommand );
CCommandParameter( GenApi::INodeMap* pNodeMap, const char* pName );
CCommandParameter( GenApi::INodeMap& nodeMap, const char* pName );
CCommandParameter( const CCommandParameter& rhs );
virtual ~CCommandParameter();
virtual bool Attach( GenApi::INodeMap* pNodeMap, const char* pName );
virtual bool Attach( GenApi::INodeMap& nodeMap, const char* pName );
virtual bool Attach( GenApi::INode* pNode );
virtual bool Attach( GenApi::ICommand* pCommand );
CCommandParameter& operator=( const CCommandParameter& rhs );
virtual bool Equals( const CCommandParameter& rhs ) const;
virtual bool Equals( const GenApi::INode* pNode ) const;
virtual bool Equals( const GenApi::ICommand* pCommand ) const;
virtual void Release();
// Implements IValueEx
virtual bool IsValid() const;
// Implements GenApi::ICommand
virtual void Execute( bool verify = true );
// Implements GenApi::ICommand
virtual void operator()();
// Implements GenApi::ICommand
virtual bool IsDone( bool verify = true );
// Implements ICommandEx
virtual bool TryExecute();
protected:
GenApi::ICommand* m_pFeature;
};
}
#ifdef _MSC_VER
# pragma warning( pop )
#endif
#ifdef _MSC_VER
# pragma pack(pop)
#endif /* _MSC_VER */
#endif /* INCLUDED_BASLER_PYLON_CCOMMANDPARAMETER_H */
Updated on 5 July 2022 at 15:30:01