Skip to content

Pylon::IPylonGigEDevice#

Module: Low Level API

Low Level API: The interface for Basler GigE camera devices. More…

#include <pylon/gige/PylonGigEDevice.h>

Inherits from Pylon::IPylonDevice, Pylon::IDevice

Public Functions#

Name
virtual void ChangeIpConfiguration(bool EnablePersistentIp, bool EnableDhcp)
Enables/disables use of persistent IP address and DHCP usage.
virtual void GetPersistentIpAddress(String_t & IpAddress, String_t & SubnetMask, String_t & DefaultGateway)
Reads the persistent IP address from the device.
virtual void SetPersistentIpAddress(const String_t & IpAddress, const String_t & SubnetMask, const String_t & DefaultGateway)
Writes a persistent IP address to the device.
virtual uint32_t GetNumStreamGrabberChannels() const
Returns the number of stream grabbers the camera object provides.
virtual IStreamGrabber * GetStreamGrabber(uint32_t index)
Returns a pointer to a stream grabber.
virtual IEventGrabber * GetEventGrabber()
Returns a pointer to an event grabber.
virtual GenApi::INodeMap * GetNodeMap()
Returns the set of camera parameters.
virtual GenApi::INodeMap * GetTLNodeMap()
Returns the set of camera related transport layer parameters.
virtual Pylon::IChunkParser * CreateChunkParser()
Creates a chunk parser used to update those camera object members reflecting the content of additional data chunks appended to the image data.
virtual void DestroyChunkParser(Pylon::IChunkParser * pChunkParser)
Deletes a chunk parser.
virtual IEventAdapter * CreateEventAdapter()
Creates an Event adapter.
virtual void DestroyEventAdapter(IEventAdapter * )
Deletes an Event adapter.
virtual ISelfReliantChunkParser * CreateSelfReliantChunkParser()
Creates a a self-reliant chunk parser, returns NULL if not supported.
virtual void DestroySelfReliantChunkParser(ISelfReliantChunkParser * )
Deletes a self-reliant chunk parser.
virtual DeviceCallbackHandle RegisterRemovalCallback(DeviceCallback & d)
Registers a surprise removal callback object.
virtual bool DeregisterRemovalCallback(DeviceCallbackHandle h)
Deregisters a surprise removal callback object.
virtual void Open(AccessModeSet mode =(Stream
virtual void Close()
Closes a device.
virtual bool IsOpen() const
Checks if a device already is opened.
virtual AccessModeSet AccessMode(void ) const
Returns the access mode used to open the device.
virtual const CDeviceInfo & GetDeviceInfo() const
Returns the device info object storing information like the device's name.

Detailed Description#

class Pylon::IPylonGigEDevice;

Low Level API: The interface for Basler GigE camera devices.

This interface extends the IPylonDevice interface.

Public Functions Documentation#

ChangeIpConfiguration#

virtual void ChangeIpConfiguration(
    bool EnablePersistentIp,
    bool EnableDhcp
) 

Enables/disables use of persistent IP address and DHCP usage.

GetPersistentIpAddress#

virtual void GetPersistentIpAddress(
    String_t & IpAddress,
    String_t & SubnetMask,
    String_t & DefaultGateway
) 

Reads the persistent IP address from the device.

SetPersistentIpAddress#

virtual void SetPersistentIpAddress(
    const String_t & IpAddress,
    const String_t & SubnetMask,
    const String_t & DefaultGateway
) 

Writes a persistent IP address to the device.

Writing the persistent IP address does not change the IP configuration. Use the ChangeIpConfiguration() method to enable the usage of persistent IP addresses.

GetNumStreamGrabberChannels#

virtual uint32_t GetNumStreamGrabberChannels() const 

Returns the number of stream grabbers the camera object provides.

GetStreamGrabber#

virtual IStreamGrabber * GetStreamGrabber(
    uint32_t index
) 

Returns a pointer to a stream grabber.

Parameters:

  • index The number of the grabber to return

Return: A pointer to a stream grabber, NULL if index is out of range

Stream grabbers (IStreamGrabber) are the objects used to grab images from a camera device. A camera device might be able to send image data over more than one logical channel called stream. A stream grabber grabs data from one single stream.

GetEventGrabber#

virtual IEventGrabber * GetEventGrabber() 

Returns a pointer to an event grabber.

Event grabbers are used to handle events sent from a camera device.

GetNodeMap#

virtual GenApi::INodeMap * GetNodeMap() 

Returns the set of camera parameters.

Return: Pointer to the GenApi node map holding the parameters

GetTLNodeMap#

virtual GenApi::INodeMap * GetTLNodeMap() 

Returns the set of camera related transport layer parameters.

Return: Pointer to the GenApi node holding the transport layer parameter. If there are no transport layer parameters for the device, NULL is returned.

CreateChunkParser#

virtual Pylon::IChunkParser * CreateChunkParser() 

Creates a chunk parser used to update those camera object members reflecting the content of additional data chunks appended to the image data.

Return: Pointer to the created chunk parser

Note: Don't try to delete a chunk parser pointer by calling free or delete. Instead, use the DestroyChunkParser() method

DestroyChunkParser#

virtual void DestroyChunkParser(
    Pylon::IChunkParser * pChunkParser
) 

Deletes a chunk parser.

Parameters:

  • pChunkParser Pointer to the chunk parser to be deleted

CreateEventAdapter#

virtual IEventAdapter * CreateEventAdapter() 

Creates an Event adapter.

DestroyEventAdapter#

virtual void DestroyEventAdapter(
    IEventAdapter * 
) 

Deletes an Event adapter.

CreateSelfReliantChunkParser#

virtual ISelfReliantChunkParser * CreateSelfReliantChunkParser() 

Creates a a self-reliant chunk parser, returns NULL if not supported.

DestroySelfReliantChunkParser#

virtual void DestroySelfReliantChunkParser(
    ISelfReliantChunkParser * 
) 

Deletes a self-reliant chunk parser.

RegisterRemovalCallback#

virtual DeviceCallbackHandle RegisterRemovalCallback(
    DeviceCallback & d
) 

Registers a surprise removal callback object.

Parameters:

  • d reference to a device callback object

Return: A handle which must be used to deregister a callback It is recommended to use one of the RegisterRemovalCallback() helper functions to register a callback.

Example how to register a C function

void MyRemovalCallback( Pylon::IPylonDevice* pDevice)
{
    // handle removal
}

DeviceCallbackHandle h =
    Pylon::RegisterRemovalCallback( m_pCamera, &MyRemovalCallback);

Example how to register a class member function

class C
{
    void MyRemovalCallback( Pylon::IPylonDevice* pDevice )
    {
      // handle removal
    }
} c;

DeviceCallbackHandle h =
    Pylon::RegisterRemovalCallback( m_pCamera, c, &C::MyRemovalCallback);

DeregisterRemovalCallback#

virtual bool DeregisterRemovalCallback(
    DeviceCallbackHandle h
) 

Deregisters a surprise removal callback object.

Parameters:

  • h Handle of the callback to be removed

Open#

virtual void Open(
    AccessModeSet mode =(Stream|Control|Event)
) 

Opens a device.

Parameters:

  • mode The desired device access mode

The open method initializes all involved drivers and establishes a connection to the device.

A device may support different access modes, e.g. EDeviceAccessMode::Exclusive providing an exclusive access to the device.

Close#

virtual void Close() 

Closes a device.

The close method closes all involved drivers and an existing connection to the device will be released. Other applications now can access the device.

IsOpen#

virtual bool IsOpen() const 

Checks if a device already is opened.

Return: true, when the device already has been opened by the calling application.

Note: When a device has been opened an application A, IsOpen() will return false when called by an application B not having called the device's open method.

AccessMode#

virtual AccessModeSet AccessMode(
    void 
) const 

Returns the access mode used to open the device.

GetDeviceInfo#

virtual const CDeviceInfo & GetDeviceInfo() const 

Returns the device info object storing information like the device's name.

Return: A reference to the device info object used to create the device by a device factory


Updated on 5 July 2022 at 15:30:01