Skip to content

pylon/DeviceFactory.h#

Definition of the IDeviceFactory interface.

Namespaces#

Name
Pylon
Contains definitions of pylon types.

Classes#

Name
interface Pylon::IDeviceFactory
Interface to be implemented by device factories used to create devices.

Source code#

//-----------------------------------------------------------------------------
//  Basler pylon SDK
//  Copyright (c) 2006-2022 Basler AG
//  http://www.baslerweb.com
//  Author:  AH
//-----------------------------------------------------------------------------
#ifndef __DEVICEFACTORY_H__
#define __DEVICEFACTORY_H__

#if _MSC_VER > 1000
#pragma once
#endif

#include <pylon/Platform.h>

#ifdef _MSC_VER
#   pragma pack(push, PYLON_PACKING)
#endif /* _MSC_VER */

#include <pylon/stdinclude.h>
#include <pylon/DeviceInfo.h>
#include <pylon/Container.h>
#include <pylon/DeviceAccessMode.h>

namespace Pylon
{
    interface IPylonDevice;


    // --------------------------------------------------------------------------
    // enum EDeviceAccessiblityInfo
    // --------------------------------------------------------------------------

    enum EDeviceAccessiblityInfo
    {
        Accessibility_Unknown = 0,           
        Accessibility_Ok = 1,                
        Accessibility_Opened = 2,            
        Accessibility_OpenedExclusively = 3, 
        Accessibility_NotReachable = 4,      
    };


    interface PUBLIC_INTERFACE IDeviceFactory
    {

        virtual int EnumerateDevices( DeviceInfoList_t& list, bool addToList = false ) = 0;


        virtual int EnumerateDevices( DeviceInfoList_t& list, const DeviceInfoList_t& filter, bool addToList = false ) = 0;


        virtual IPylonDevice* CreateDevice( const CDeviceInfo& di ) = 0;

        virtual IPylonDevice* CreateFirstDevice( const CDeviceInfo& di = CDeviceInfo() ) = 0;

        virtual IPylonDevice* CreateDevice( const CDeviceInfo& di, const StringList_t& InjectedXmlStrings ) = 0;

        virtual IPylonDevice* CreateFirstDevice( const CDeviceInfo& di, const StringList_t& InjectedXmlStrings ) = 0;

        virtual IPylonDevice* CreateDevice( const String_t& ) = 0;


        virtual void DestroyDevice( IPylonDevice* ) = 0;

        virtual bool IsDeviceAccessible( const CDeviceInfo& deviceInfo, AccessModeSet mode = Control, EDeviceAccessiblityInfo* pAccessibilityInfo = NULL ) = 0;
    };







} // namespace PYLON

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

#endif

Updated on 5 July 2022 at 15:30:01