Skip to content

Pylon::ITransportLayer#

Module: Transport Layer

The interface of Transport Layer objects. More…

#include <pylon/TransportLayer.h>

Inherits from Pylon::IDeviceFactory

Inherited by Pylon::IGigETransportLayer

Public Functions#

Name
virtual CTlInfo GetTlInfo() const
Returns a CTlInfo object holding information about the transport layer.
virtual CDeviceInfo CreateDeviceInfo()
Creates and returns an 'empty' Device Info object appropriate for the transport layer.
virtual GenApi::INodeMap * GetNodeMap()
Returns the GenApi node map used for accessing parameters provided by the transport layer.
virtual int EnumerateInterfaces(InterfaceInfoList_t & list, bool addToList =false)
Retrieves a list of available interfaces.
virtual IInterface * CreateInterface(const CInterfaceInfo & interfaceInfo)
Creates an interface object from an interface info object.
virtual void DestroyInterface(IInterface * pInterface)
Destroys an interface.
virtual int EnumerateDevices(DeviceInfoList_t & list, bool addToList =false)
Retrieves a list of available devices.
virtual int EnumerateDevices(DeviceInfoList_t & list, const DeviceInfoList_t & filter, bool addToList =false)
Retrieves a list of available devices filtered by given properties, usable for looking for specific devices.
virtual IPylonDevice * CreateDevice(const CDeviceInfo & di)
Creates a camera object from a device info object.
virtual IPylonDevice * CreateDevice(const CDeviceInfo & di, const StringList_t & InjectedXmlStrings)
virtual IPylonDevice * CreateDevice(const String_t & )
virtual IPylonDevice * CreateFirstDevice(const CDeviceInfo & di =CDeviceInfo())
virtual IPylonDevice * CreateFirstDevice(const CDeviceInfo & di, const StringList_t & InjectedXmlStrings)
virtual void DestroyDevice(IPylonDevice * )
Destroys a device.
virtual bool IsDeviceAccessible(const CDeviceInfo & deviceInfo, AccessModeSet mode =Control, EDeviceAccessiblityInfo * pAccessibilityInfo =NULL)
This method can be used to check if a camera device can be created and opened.

Detailed Description#

class Pylon::ITransportLayer;

The interface of Transport Layer objects.

Transport Layer objects are used for enumerating and creating devices accessible by a specific transport layer (like the Pylon1394 or the PylonGigE transport layer).

Public Functions Documentation#

GetTlInfo#

virtual CTlInfo GetTlInfo() const 

Returns a CTlInfo object holding information about the transport layer.

Return: Returns a CTlInfo object holding information about the transport layer.

CreateDeviceInfo#

virtual CDeviceInfo CreateDeviceInfo() 

Creates and returns an 'empty' Device Info object appropriate for the transport layer.

Device Info objects returned by the CreateDeviceInfo() method are used to create devices from device info objects that are not the result of a device enumeration process but are provided by the user. The user is responsible for filling in the fields of the Device Info object that are needed to identify and create a device.

Example: To open a GigE device for which the IP address is known, the user lets the Transport Layer object create a Device Info object, specifies the IP address and passes the device info object to the CreateDevice() method.

GetNodeMap#

virtual GenApi::INodeMap * GetNodeMap() 

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

Return: NULL, if the transport layer doesn't provide parameters, a pointer to the parameter node map otherwise.

EnumerateInterfaces#

virtual int EnumerateInterfaces(
    InterfaceInfoList_t & list,
    bool addToList =false
) 

Retrieves a list of available interfaces.

Parameters:

  • list The list to be filled with interface info objects. The list contains Pylon::CInterfaceInfo objects used for the interface creation. It is ordered by device class and interface ID using the operator <a href="class_pylon_1_1_c_interface_info.html#operator<">Pylon::CInterfaceInfo::operator<().
  • addToList If true, devices found will be added to the list instead of clearing the list. By default, the list passed in will be cleared.

Return: Number of interfaces provided by the transport layer.

Note: Currently, this method is used mainly for the pylon GenTL Consumer transport layer, which is used for CoaXPress, for example. All other pylon transport layers return one default interface. The default interface will forward all IDeviceFactory methods to the transport layer that created the interface object. The default interface does not provide a node map.

Thread Safety:

This method is thread-safe.

Error Safety:

Can throw C++ exceptions.

An interface may represent a frame grabber board, a network card, etc.

CreateInterface#

virtual IInterface * CreateInterface(
    const CInterfaceInfo & interfaceInfo
) 

Creates an interface object from an interface info object.

Parameters:

  • interfaceInfo The Interface info object. You can pass an interface info object returned by EnumerateInterfaces() or a user-provided interface info object. User-provided interface info objects can be preset with properties required for an interface, e.g. the interface ID. The implementation tries to find a matching interface.

Return: Returns the pointer to the interface created.

Postcondition: The interface created must be freed by calling DestroyInterface(). The transport layer is not destroyed as long as the interface is not destroyed. Never try to delete a pointer to an interface object by calling free or delete. Always use the DestroyInterface() method.

Error Safety:

Throws an exception if creating the interface fails.

Thread Safety:

This method is thread-safe.

DestroyInterface#

virtual void DestroyInterface(
    IInterface * pInterface
) 

Destroys an interface.

Parameters:

  • pInterface The pointer to an interface created by this transport layer.

Precondition: The interface has been created by this transport layer using CreateInterface() and has not been destroyed using DestroyInterface() yet.

Postcondition: The interface is deleted and must not be used any longer.

Error Safety:

Throws a C++ exception if the preconditions are not met.

Thread Safety:

This method is thread-safe.

EnumerateDevices#

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

Retrieves a list of available devices.

Parameters:

  • list List to be filled with device info objects.
  • addToList If 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.

Return: Number of devices found.

Reimplemented by: Pylon::CTlFactory::EnumerateDevices, Pylon::CInstantInterface::EnumerateDevices

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

EnumerateDevices#

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

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

Parameters:

  • list List to be filled with device info objects.
  • filter A list of device info objects with user-provided properties that a device can match.
  • addToList If 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.

Return: Number of devices found.

Reimplemented by: Pylon::CTlFactory::EnumerateDevices, Pylon::CInstantInterface::EnumerateDevices

The list contains Pylon::CDeviceInfo objects used for the device creation and is ordered by device class and serial number using the operator <a href="class_pylon_1_1_c_device_info.html#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.

CreateDevice#

virtual IPylonDevice * CreateDevice(
    const CDeviceInfo & di
) 

Creates a camera object from a device info object.

Parameters:

  • di Device info object containing all information needed to identify exactly one device.

Reimplemented by: Pylon::CTlFactory::CreateDevice, Pylon::CInstantInterface::CreateDevice

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.

CreateDevice#

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

Reimplemented by: Pylon::CTlFactory::CreateDevice, Pylon::CInstantInterface::CreateDevice

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

CreateDevice#

virtual IPylonDevice * CreateDevice(
    const String_t & 
) 

Reimplemented by: Pylon::CTlFactory::CreateDevice, Pylon::CInstantInterface::CreateDevice

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).

CreateFirstDevice#

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

Reimplemented by: Pylon::CTlFactory::CreateFirstDevice, Pylon::CInstantInterface::CreateFirstDevice

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.

CreateFirstDevice#

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

Reimplemented by: Pylon::CTlFactory::CreateFirstDevice, Pylon::CInstantInterface::CreateFirstDevice

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

DestroyDevice#

virtual void DestroyDevice(
    IPylonDevice * 
) 

Destroys a device.

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

Reimplemented by: Pylon::CTlFactory::DestroyDevice, Pylon::CInstantInterface::DestroyDevice

IsDeviceAccessible#

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

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

Parameters:

  • deviceInfo Properties to find/identify the camera device to check.
  • mode Used for defining how a device is accessed. The use of the mode information is transport layer-specific.

  • For 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.
  • pAccessibilityInfo Optional parameter that provides more information about whether a device is accessible or not.

Return: 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.

Reimplemented by: Pylon::CTlFactory::IsDeviceAccessible, Pylon::CInstantInterface::IsDeviceAccessible

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.


Updated on 5 July 2022 at 15:30:01