Skip to content

pylon/ArrayParameter.h#

Contains the class CArrayParameter used to simplify access to GenApi parameters.

Namespaces#

Name
Pylon
Contains definitions of pylon types.

Classes#

Name
struct Pylon::IRegisterEx
Extends the GenApi::IRegister interface with convenience methods.
class Pylon::CArrayParameter
CArrayParameter 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_CARRAYPARAMETER_H
#define INCLUDED_BASLER_PYLON_CARRAYPARAMETER_H

#pragma once

#include <pylon/PylonBase.h>
#include <GenApi/IRegister.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 IRegisterEx : virtual public GenApi::IRegister, virtual public IValueEx
    {
        using GenApi::IRegister::operator=;

    };


    class PYLONBASE_API CArrayParameter : public IRegisterEx, public CParameter
    {
    public:
        CArrayParameter();


        explicit CArrayParameter( GenApi::INode* pNode );


        explicit CArrayParameter( GenApi::IRegister* pRegister );


        CArrayParameter( GenApi::INodeMap* pNodeMap, const char* pName );


        CArrayParameter( GenApi::INodeMap& nodeMap, const char* pName );


        CArrayParameter( const CArrayParameter& rhs );


        virtual ~CArrayParameter();


        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::IRegister* pRegister );


        CArrayParameter& operator=( const CArrayParameter& rhs );


        virtual bool Equals( const CArrayParameter& rhs ) const;


        virtual bool Equals( const GenApi::INode* pNode ) const;


        virtual bool Equals( const GenApi::IRegister* pRegister ) const;


        virtual void Release();


        // Implements IValueEx
        virtual bool IsValid() const;


        // Implements GenApi::IRegister
        virtual void Set( const uint8_t* pBuffer, int64_t length, bool verify = true );

        // Implements GenApi::IRegister
        virtual void Get( uint8_t* pBuffer, int64_t length, bool verify = false, bool ignoreCache = false );

        // Implements GenApi::IRegister
        virtual int64_t GetLength();

        // Implements GenApi::IRegister
        virtual int64_t GetAddress();



    protected:
        GenApi::IRegister* m_pFeature;
    };
}
#ifdef _MSC_VER
#   pragma warning( pop )
#endif

#ifdef _MSC_VER
#   pragma pack(pop)
#endif /* _MSC_VER */

#endif /* INCLUDED_BASLER_PYLON_CARRAYPARAMETER_H */

Updated on 5 July 2022 at 15:30:01