Skip to content


Definition of CDeviceInfo class.


Contains definitions of pylon types.
This namespace contains keys for accessing the properties of pylon info objects.


class Pylon::CDeviceInfo
Holds information about an enumerated device.

Source code#

//  Basler pylon SDK
//  Copyright (c) 2006-2022 Basler AG
//  Author:  Hartmut Nebelung, AH
#ifndef __DEVICEINFO_H__
#define __DEVICEINFO_H__

#if _MSC_VER > 1000
#pragma once

#include <pylon/Platform.h>

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

#include <pylon/PylonBase.h>
#include <pylon/stdinclude.h>
#include <pylon/Info.h>

namespace Pylon

    namespace Key
        const char* const SerialNumberKey = "SerialNumber";
        const char* const UserDefinedNameKey = "UserDefinedName";
        const char* const ModelNameKey = "ModelName";
        const char* const DeviceVersionKey = "DeviceVersion";
        const char* const DeviceFactoryKey = "DeviceFactory";
        const char* const XMLSourceKey = "XMLSource";
        const char* const ManufacturerInfoKey = "ManufacturerInfo";
        const char* const DeviceIDKey = "DeviceID";

        const char* const AddressKey = "Address";
        const char* const IpAddressKey = "IpAddress";
        const char* const DefaultGatewayKey = "DefaultGateway";
        const char* const SubnetMaskKey = "SubnetMask";
        const char* const SubnetAddressKey = "SubnetAddress";
        const char* const PortNrKey = "PortNr";
        const char* const MacAddressKey = "MacAddress";
        const char* const InterfaceKey = "Interface";
        const char* const IpConfigOptionsKey = "IpConfigOptions";
        const char* const IpConfigCurrentKey = "IpConfigCurrent";

        const char* const DeviceGUIDKey = "DeviceGUID";
        const char* const VendorIdKey = "VendorId";
        const char* const ProductIdKey = "ProductId";
        const char* const DriverKeyNameKey = "DriverKeyName";
        const char* const UsbDriverTypeKey = "UsbDriverTypeName";
        // Internal use only
        const char* const UsbPortVersionBcdKey = "UsbPortVersionBcd";
        // Internal use only
        const char* const SpeedSupportBitmaskKey = "SpeedSupportBitmask";
        // Internal use only
        const char* const TransferModeKey = "TransferModeKey";

        const char* const InternalNameKey = "InternalName";

        const char* const PortIDKey = "PortID";
        const char* const InitialBaudRateKey = "InitialBaudRate";
        const char* const DeviceXMLFileOverrideKey = "DeviceXMLFileOverride";
        const char* const DeviceSpecificStringKey = "DeviceSpecificString";
        const char* const PortSpecificStringKey = "PortSpecificString";

        // Internal use only
        const char* const DeviceIdxKey = "DeviceIdx";

    class PYLONBASE_API CDeviceInfo : public CInfoBase

        CDeviceInfo( const CDeviceInfo& );
        virtual ~CDeviceInfo()

        bool operator<( const CDeviceInfo& rhs ) const;

        /* The underlying implementation does not need to support all the listed properties.
        The properties that are not supported always have the value "N/A" which is the value of CInfoBase::PropertyNotAvailable */

        String_t GetSerialNumber() const;
        CDeviceInfo& SetSerialNumber( const String_t& SerialNumberValue );
        bool IsSerialNumberAvailable() const;

        String_t GetUserDefinedName() const;
        CDeviceInfo& SetUserDefinedName( const String_t& UserDefinedNameValue );
        bool IsUserDefinedNameAvailable() const;

        String_t GetModelName() const;
        CDeviceInfo& SetModelName( const String_t& ModelNameValue );
        bool IsModelNameAvailable() const;

        String_t GetDeviceVersion() const;
        CDeviceInfo& SetDeviceVersion( const String_t& DeviceVersionValue );
        bool IsDeviceVersionAvailable() const;

        String_t GetDeviceFactory() const;
        CDeviceInfo& SetDeviceFactory( const String_t& DeviceFactoryValue );
        bool IsDeviceFactoryAvailable() const;

        String_t GetXMLSource() const;
        CDeviceInfo& SetXMLSource( const String_t& XMLSource );
        bool IsXMLSourceAvailable() const;

        CDeviceInfo& SetFriendlyName( const String_t& FriendlyNameValue );

        CDeviceInfo& SetFullName( const String_t& FullNameValue );

        CDeviceInfo& SetVendorName( const String_t& VendorNameValue );

        CDeviceInfo& SetDeviceClass( const String_t& DeviceClassValue );

        String_t GetInterfaceID() const;
        CDeviceInfo& SetInterfaceID( const String_t& InterfaceIDValue );
        bool IsInterfaceIDAvailable() const;

        String_t GetAddress() const;
        CDeviceInfo& SetAddress( const String_t& AddressValue );
        bool IsAddressAvailable() const;

        String_t GetIpAddress() const;
        CDeviceInfo& SetIpAddress( const String_t& IpAddressValue );
        bool IsIpAddressAvailable() const;

        String_t GetSubnetAddress() const;
        CDeviceInfo& SetSubnetAddress( const String_t& SubnetAddressValue );
        bool IsSubnetAddressAvailable() const;

        String_t GetDefaultGateway() const;
        CDeviceInfo& SetDefaultGateway( const String_t& DefaultGatewayValue );
        bool IsDefaultGatewayAvailable() const;

        String_t GetSubnetMask() const;
        CDeviceInfo& SetSubnetMask( const String_t& SubnetMaskValue );
        bool IsSubnetMaskAvailable() const;

        String_t GetPortNr() const;
        CDeviceInfo& SetPortNr( const String_t& PortNrValue );
        bool IsPortNrAvailable() const;

        String_t GetMacAddress() const;
        CDeviceInfo& SetMacAddress( const String_t& MacAddressValue );
        bool IsMacAddressAvailable() const;

        String_t GetInterface() const;
        CDeviceInfo& SetInterface( const String_t& InterfaceValue );
        bool IsInterfaceAvailable() const;

        String_t GetIpConfigOptions() const;
        CDeviceInfo& SetIpConfigOptions( const String_t& IpConfigOptionsValue );
        bool IsIpConfigOptionsAvailable() const;

        String_t GetIpConfigCurrent() const;
        CDeviceInfo& SetIpConfigCurrent( const String_t& IpConfigCurrentValue );
        bool IsIpConfigCurrentAvailable() const;

        String_t GetDeviceGUID() const;
        bool IsDeviceGUIDAvailable() const;

        String_t GetManufacturerInfo() const;
        bool IsManufacturerInfoAvailable() const;

        String_t GetDeviceIdx() const;
        bool IsDeviceIdxAvailable() const;

        String_t GetProductId() const;
        bool IsProductIdAvailable() const;

        String_t GetVendorId() const;
        bool IsVendorIdAvailable() const;

        String_t GetDriverKeyName() const;
        bool IsDriverKeyNameAvailable() const;

        String_t GetUsbDriverType() const;
        bool IsUsbDriverTypeAvailable() const;

        // Returns either dtx or btx (direct vs. buffered transfer)
        String_t GetTransferMode() const;
        bool IsTransferModeAvailable() const;

        String_t GetInternalName() const;
        CDeviceInfo& SetInternalName( const String_t& InternalNameValue );
        bool IsInternalNameAvailable() const;

        String_t GetPortID() const;
        CDeviceInfo& SetPortID( const String_t& PortIDValue );
        bool IsPortIDAvailable() const;

        String_t GetDeviceID() const;
        CDeviceInfo& SetDeviceID( const String_t& DeviceIDValue );
        bool IsDeviceIDAvailable() const;

        String_t GetInitialBaudRate() const;
        CDeviceInfo& SetInitialBaudRate( const String_t& InitialBaudRateValue );
        bool IsInitialBaudRateAvailable() const;

        String_t GetDeviceXMLFileOverride() const;
        CDeviceInfo& SetDeviceXMLFileOverride( const String_t& DeviceXMLFileOverrideValue );
        bool IsDeviceXMLFileOverrideAvailable() const;

        String_t GetDeviceSpecificString() const;
        CDeviceInfo& SetDeviceSpecificString( const String_t& DeviceSpecificStringValue );
        bool IsDeviceSpecificStringAvailable() const;

        String_t GetPortSpecificString() const;
        CDeviceInfo& SetPortSpecificString( const String_t& PortSpecificStringValue );
        bool IsPortSpecificStringAvailable() const;

        virtual CDeviceInfo& SetPropertyValue( const String_t& Name, const String_t& Value )
            CInfoBase::SetPropertyValue( Name, Value );
            return *this;

        bool IsPersistentIpActive( void ) const;

        bool IsDhcpActive( void ) const;

        bool IsAutoIpActive( void ) const;

        bool IsPersistentIpSupported( void ) const;

        bool IsDhcpSupported( void ) const;

        bool IsAutoIpSupported( void ) const;

        virtual bool IsSubset( const IProperties& Subset ) const;

        CDeviceInfo& SetDeviceGUID( const String_t& );
        CDeviceInfo& SetManufacturerInfo( const String_t& );
        CDeviceInfo& SetDeviceIdx( const String_t& );
        CDeviceInfo& SetProductId( const String_t& );
        CDeviceInfo& SetVendorId( const String_t& );
        CDeviceInfo& SetDriverKeyName( const String_t& );
        CDeviceInfo& SetUsbDriverType( const String_t& );
        CDeviceInfo& SetTransferMode( const String_t& );

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

#endif //__DEVICEINFO_H__

Updated on 27 July 2022 at 19:03:47