Pylon Logo Basler Logo
Public Member Functions | List of all members
Pylon::IInterface Interface Referenceabstract

An interface is used to represent a frame grabber board, a network card, etc. More...

#include <pylon/Interface.h>

Inheritance diagram for Pylon::IInterface:
Inheritance graph
[legend]

Public Member Functions

virtual void Open ()=0
 Opens an interface to be able access it's parameters via GetNodeMap(). More...
 
virtual void Close ()=0
 Closes an interface. More...
 
virtual bool IsOpen () const =0
 Checks if the interface is open. More...
 
virtual const CInterfaceInfoGetInterfaceInfo () const =0
 Returns the interface info object storing information like the Interface ID property. More...
 
virtual GenApi::INodeMapGetNodeMap ()=0
 Returns the GenApi node map used for accessing parameters provided by the interface. More...
 
virtual int EnumerateDevices (DeviceInfoList_t &list, bool addToList=false)=0
 Retrieves a list of available devices. More...
 
virtual int EnumerateDevices (DeviceInfoList_t &list, const DeviceInfoList_t &filter, bool addToList=false)=0
 Retrieves a list of available devices filtered by given properties, usable for looking for specific devices. More...
 
virtual IPylonDeviceCreateDevice (const CDeviceInfo &di)=0
 Creates a camera object from a device info object. More...
 
virtual IPylonDeviceCreateDevice (const CDeviceInfo &di, const StringList_t &InjectedXmlStrings)=0
 
virtual IPylonDeviceCreateDevice (const String_t &)=0
 
virtual IPylonDeviceCreateFirstDevice (const CDeviceInfo &di=CDeviceInfo())=0
 
virtual IPylonDeviceCreateFirstDevice (const CDeviceInfo &di, const StringList_t &InjectedXmlStrings)=0
 
virtual void DestroyDevice (IPylonDevice *)=0
 Destroys a device. More...
 
virtual bool IsDeviceAccessible (const CDeviceInfo &deviceInfo, AccessModeSet mode=Control, EDeviceAccessiblityInfo *pAccessibilityInfo=NULL)=0
 This method can be used to check if a camera device can be created and opened. More...
 

Detailed Description

An interface is used to represent a frame grabber board, a network card, etc.

Currently, this object type is mainly used for the pylon GenTL Consumer Transport Layer, e.g., for CoaXPress. All other pylon transport layers currently return one default interface.

The 'open' status of an interface instance won't change even if an attached camera is used, e.g., opened or closed.

Member Function Documentation

virtual void Pylon::IInterface::Close ( )
pure virtual

Closes an interface.

Thread Safety:
This method is thread-safe.
Postcondition
  • The interface is closed.
  • Any previously acquired node map using GetNodeMap() has been deleted and must not be used any longer.
Error Safety:
Does not throw C++ exceptions.

Implemented in Pylon::CInstantInterface< T >.

virtual IPylonDevice* Pylon::IDeviceFactory::CreateDevice ( const CDeviceInfo di)
pure virtualinherited

Creates a camera object from a device info object.

This method accepts either a device info object from a device enumeration or a user-provided device info object. User-provided device info objects can be preset with properties required for a device, e.g. the user-provided name or the serial number. The implementation tries to find a matching camera by using device enumeration. When the device class property is set, the search is limited to the required transport layer.

If the device creation fails, a GenApi::GenericException will be thrown.

Parameters
diDevice info object containing all information needed to identify exactly one device.

Implemented in Pylon::CInstantInterface< T >, and Pylon::CTlFactory.

virtual IPylonDevice* Pylon::IDeviceFactory::CreateDevice ( const CDeviceInfo di,
const StringList_t InjectedXmlStrings 
)
pure virtualinherited

Creates a camera object from a device info object, injecting additional GenICam XML definition strings. Currently only one injected xml string is supported.

Implemented in Pylon::CInstantInterface< T >, and Pylon::CTlFactory.

virtual IPylonDevice* Pylon::IDeviceFactory::CreateDevice ( const String_t )
pure virtualinherited

This method is deprecated. Use CreateDevice and pass a CDeviceInfo object containing the full name as a property. Example: IPylonDevice* device = TlFactory.CreateDevice( CDeviceInfo().SetFullName( fullname)); creates a device that matches its full name (i.e., as returned by CDeviceInfo::GetFullName).

Implemented in Pylon::CInstantInterface< T >, and Pylon::CTlFactory.

virtual IPylonDevice* Pylon::IDeviceFactory::CreateFirstDevice ( const CDeviceInfo di = CDeviceInfo())
pure virtualinherited

If multiple devices match the provided properties, the first device found is created. The order in which the devices are found can vary from call to call.

Implemented in Pylon::CInstantInterface< T >, and Pylon::CTlFactory.

virtual IPylonDevice* Pylon::IDeviceFactory::CreateFirstDevice ( const CDeviceInfo di,
const StringList_t InjectedXmlStrings 
)
pure virtualinherited

Creates the first found camera device matching the provided properties, injecting additional GenICam XML definition strings. Currently only one injected xml string is supported.

Implemented in Pylon::CInstantInterface< T >, and Pylon::CTlFactory.

virtual void Pylon::IDeviceFactory::DestroyDevice ( IPylonDevice )
pure virtualinherited

Destroys a device.

Note
Never try to delete a pointer to a camera device by calling free or delete. Always use the DestroyDevice method.

Implemented in Pylon::CInstantInterface< T >, and Pylon::CTlFactory.

virtual int Pylon::IDeviceFactory::EnumerateDevices ( DeviceInfoList_t list,
bool  addToList = false 
)
pure virtualinherited

Retrieves a list of available devices.

The list contains Pylon::CDeviceInfo objects used for the device creation and is ordered by device class and serial number using the operator Pylon::CDeviceInfo::operator<(). By default, the list will be cleared before the device discovery is started.

Parameters
listList to be filled with device info objects.
addToListIf true, the devices found will be appended to the list instead of deleting the list. Only newly discovered devices are sorted and not the entire list.
Returns
Number of devices found.

Implemented in Pylon::CInstantInterface< T >, and Pylon::CTlFactory.

virtual int Pylon::IDeviceFactory::EnumerateDevices ( DeviceInfoList_t list,
const DeviceInfoList_t filter,
bool  addToList = false 
)
pure virtualinherited

Retrieves a list of available devices filtered by given properties, usable for looking for specific devices.

The list contains Pylon::CDeviceInfo objects used for the device creation and is ordered by device class and serial number using the operator Pylon::CDeviceInfo::operator<(). By default, the list will be cleared before the device discovery is started. The filter list can contain a list of device info objects containing properties a device must have, e.g., the user-provided name or the serial number. A device is returned if it matches the properties of any of the device info objects on the filter list. If the device class property is set in the filter device info objects, the search is limited to the required transport layers.

Parameters
listList to be filled with device info objects.
filterA list of device info objects with user-provided properties that a device can match.
addToListIf true, the devices found will be appended to the list instead of deleting the list. Only newly discovered devices are sorted and not the entire list.
Returns
Number of devices found.

Implemented in Pylon::CInstantInterface< T >, and Pylon::CTlFactory.

virtual const CInterfaceInfo& Pylon::IInterface::GetInterfaceInfo ( ) const
pure virtual

Returns the interface info object storing information like the Interface ID property.

This information is available at all times regardless of whether the interface is open or closed.

Returns
A reference to the interface info object.
Thread Safety:
This method is thread-safe.
Error Safety:
Does not throw C++ exceptions.

Implemented in Pylon::CInstantInterface< T >.

virtual GenApi::INodeMap* Pylon::IInterface::GetNodeMap ( )
pure virtual

Returns the GenApi node map used for accessing parameters provided by the interface.

Note
The default interface object does not provide a node map.
Returns
Returns the GenApi node map used for accessing parameters provided by the interface. If no parameters are available, NULL is returned.
Thread Safety:
This method is thread-safe.
Error Safety:
Can throw C++ exceptions.

Implemented in Pylon::CInstantInterface< T >.

virtual bool Pylon::IDeviceFactory::IsDeviceAccessible ( const CDeviceInfo deviceInfo,
AccessModeSet  mode = Control,
EDeviceAccessiblityInfo pAccessibilityInfo = NULL 
)
pure virtualinherited

This method can be used to check if a camera device can be created and opened.

This method accepts either a device info object from a device enumeration or a user-provided device info object. User-provided device info objects can be preset with properties required for a device, e.g. the user-provided name or the serial number. The implementation tries to find a matching camera by using device enumeration. When the device class property is set, see DeviceClass.h header file, the search is limited to the required transport layer. For more information, see Applying a Filter when Enumerating Cameras.

Parameters
[in]deviceInfoProperties to find/identify the camera device to check.
[in]modeUsed for defining how a device is accessed. The use of the mode information is transport layer-specific.
  • For BCON, CameraLink, and USB devices, the mode information is ignored.
  • For GigE devices, the Exclusive and Control flags are used for defining how a device is accessed. Other mode information is ignored.
  • For devices of any type that are accessed via the GenICam GenTL transport layer, the mode is ignored.
[out]pAccessibilityInfoOptional parameter that provides more information about whether a device is accessible or not.
Returns
True if device can be opened with provided access mode.
Precondition
The deviceInfo object properties specify exactly one device. This is the case when the device info object has been obtained using device enumeration.
Error Safety:
Throws a C++ exception, if the preconditions are not met.

Implemented in Pylon::CInstantInterface< T >, and Pylon::CTlFactory.

virtual bool Pylon::IInterface::IsOpen ( ) const
pure virtual

Checks if the interface is open.

Note
The 'open' status of an interface instance won't change even if an attached camera is used, e.g., opened or closed.
Returns
Returns true if when the interface is open.
Thread Safety:
This method is thread-safe.
Error Safety:
Does not throw C++ exceptions.

Implemented in Pylon::CInstantInterface< T >.

virtual void Pylon::IInterface::Open ( )
pure virtual

Opens an interface to be able access it's parameters via GetNodeMap().

Note
You can use the methods provided by IDeviceFactory regardless of whether the interface is opened or closed.
Postcondition
  • The interface is open.
  • The node map can be accessed via GetNodeMap().
Thread Safety:
This method is thread-safe.
Error Safety:
Throws a C++ exception if opening the interface fails.

Implemented in Pylon::CInstantInterface< T >.


The documentation for this interface was generated from the following file:

pylon 6.1.0
Copyright (c) 2006-2020 Basler AG (Mon Mar 16 2020 10:57:01)