All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
Pylon::CPylonGigEStreamGrabber Class Reference

Low Level API: Class for pylon GigE Vision cameras providing access to stream grabber related methods and parameters. More...

#include <pylon/gige/PylonGigECamera.h>

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

Public Member Functions

Construction
 CPylonGigEStreamGrabber ()
 Creates a CStreamGrabberProxyT object that is not attached to a pylon stream grabber. Use the Attach() method to attach the pylon stream grabber. More...
 
 CPylonGigEStreamGrabber (IStreamGrabber *pStreamGrabber)
 Creates a CStreamGrabberProxyT object and attaches it to a pylon stream grabber. More...
 
Some smart pointer functionality
virtual void Attach (IStreamGrabber *)
 Attach a pylon stream grabber.
 
virtual bool IsAttached () const
 Checks if a pylon stream grabber is attached.
 
virtual IStreamGrabberGetStreamGrabber () const
 Returns the pylon stream grabber interface pointer.
 
Some smart pointer functionality
virtual void Attach (GenApi::INodeMap *, bool replace=false)
 Attach a pylon node map.
 
virtual GenApi::INodeMapGetNodeMap () const
 Returns the pylon node map interface pointer.
 
Implementation of the IStreamGrabber interface

See Pylon::IStreamGrabber for more details.

void Open ()
 Opens the stream grabber. More...
 
void Close ()
 Closes the stream grabber. More...
 
bool IsOpen () const
 Retrieve whether the stream grabber is open. More...
 
StreamBufferHandle RegisterBuffer (void *Buffer, size_t BufferSize)
 Registers a buffer for subsequent use. More...
 
const void * DeregisterBuffer (StreamBufferHandle handle)
 Deregisters the buffer. More...
 
void PrepareGrab ()
 Prepares grabbing. More...
 
void FinishGrab ()
 Stops grabbing. More...
 
void QueueBuffer (StreamBufferHandle Handle, const void *Context=NULL)
 Enqueues a buffer in the input queue. More...
 
void CancelGrab ()
 Cancels pending requests. More...
 
bool RetrieveResult (GrabResult &Result)
 Retrieves a grab result from the output queue. More...
 
WaitObjectGetWaitObject () const
 Returns the result event object. More...
 
GenApi::INodeMapGetNodeMap ()
 Returns the associated stream grabber parameters. More...
 
Partial implementation of the INodeMap interface

See GENAPI_NAMESPACE::INodeMap for more details

void GetNodes (GenApi::NodeList_t &Nodes) const
 Retrieves all nodes in the node map. More...
 
GenApi::INodeGetNode (const GenICam::gcstring &Name) const
 Retrieves the node from the central map by Name. More...
 
void InvalidateNodes () const
 Invalidates all nodes. More...
 
void Poll (int64_t ElapsedTime)
 Fires nodes which have a polling time. More...
 

Public Attributes

Root - Interface to the GigE specific stream parameters.
GenApi::IEnumerationT
< TypeEnums > & 
Type
 Selects the driver type to be used. More...
 
GenApi::IIntegerMaxNumBuffer
 The maximum number of buffers that can be used simultaneously. More...
 
GenApi::IIntegerMaxBufferSize
 The maximum buffer size in bytes that can be registered. More...
 
GenApi::IBooleanEnableResend
 Enables or disables the packet resend mechanism. More...
 
GenApi::IIntegerPacketTimeout
 Timeout period in milliseconds between two packets within one frame. More...
 
GenApi::IBooleanAutoPacketSize
 Enables or disables probing of a working large packet size before grabbing. More...
 
GenApi::IIntegerReceiveWindowSize
 Size of the sliding receive window in number of frames. More...
 
GenApi::IIntegerResendRequestThreshold
 Resend threshold as percentage of receive window. More...
 
GenApi::IIntegerResendRequestBatching
 Additional resend batching as percentage of threshold. More...
 
GenApi::IIntegerResendTimeout
 Time in milliseconds to wait until a resend request is issued. More...
 
GenApi::IIntegerResendRequestResponseTimeout
 Timeout in milliseconds for missing resend responses. More...
 
GenApi::IIntegerMaximumNumberResendRequests
 Maximum number of resend requests per packet. More...
 
GenApi::IIntegerFrameRetention
 Maximum time in milliseconds to receive all packets of an individual frame. More...
 
GenApi::IBooleanReceiveThreadPriorityOverride
 If enabled, the user can set a custom priority of the receive thread. More...
 
GenApi::IIntegerReceiveThreadPriority
 The realtime receive thread priority. More...
 
GenApi::IIntegerSocketBufferSize
 The socket buffer size in KB. More...
 
Debug - Shows information for debugging purposes.
GenApi::IEnumerationT
< StatusEnums > & 
Status
 Shows the current stream grabber status. More...
 
GenApi::IEnumerationT
< AccessModeEnums > & 
AccessMode
 Camera access mode. More...
 
GenApi::IIntegerTypeIsWindowsIntelPerformanceDriverAvailable
 Specifies whether the Pylon GigE Vision Performance Driver for Intel network controllers is currently available. More...
 
GenApi::IIntegerTypeIsWindowsFilterDriverAvailable
 Specifies whether the Pylon GigE Vision Streaming Filter Driver is currently available. More...
 
GenApi::IIntegerTypeIsSocketDriverAvailable
 Specifies whether the socket driver is currently available. More...
 
Statistic - Statistical data.
GenApi::IIntegerStatistic_Total_Buffer_Count
 Counts the number of received frames. More...
 
GenApi::IIntegerStatistic_Failed_Buffer_Count
 Counts the number of buffers with at least one failed packet (status != success). More...
 
GenApi::IIntegerStatistic_Buffer_Underrun_Count
 Counts the number of frames lost because there were no buffers queued to the driver. More...
 
GenApi::IIntegerStatistic_Total_Packet_Count
 Counts the number of received packets. More...
 
GenApi::IIntegerStatistic_Failed_Packet_Count
 Counts the number of failed packets (status != success). More...
 
GenApi::IIntegerStatistic_Resend_Request_Count
 Counts the number of emitted PACKETRESEND commands. More...
 
GenApi::IIntegerStatistic_Resend_Packet_Count
 Counts the number of packets requested by PACKETRESEND commands. More...
 
IPConfig - Configuration of the stream destination.
GenApi::IEnumerationT
< TransmissionTypeEnums > & 
TransmissionType
 Controls whether the stream data is sent to a single device or to multiple devices. More...
 
GenApi::IStringDestinationAddr
 Specifies the destination IP address. More...
 
GenApi::IIntegerDestinationPort
 Specifies the destination port number (0 = auto select). More...
 

Detailed Description

Low Level API: Class for pylon GigE Vision cameras providing access to stream grabber related methods and parameters.

See Also
Accessing Parameters

Constructor & Destructor Documentation

Pylon::CPylonGigEStreamGrabber::CPylonGigEStreamGrabber ( )
inline

Creates a CStreamGrabberProxyT object that is not attached to a pylon stream grabber. Use the Attach() method to attach the pylon stream grabber.

Pylon::CPylonGigEStreamGrabber::CPylonGigEStreamGrabber ( IStreamGrabber pStreamGrabber)
inline

Creates a CStreamGrabberProxyT object and attaches it to a pylon stream grabber.

Member Function Documentation

Cancels pending requests.

, resources remain allocated. Following, the results must be retrieved from the Output Queue.

Closes the stream grabber.

Flushes the result queue and stops the thread.

const void* Pylon::CStreamGrabberProxyT< Basler_GigEStreamParams::CGigEStreamParams_Params >::DeregisterBuffer ( StreamBufferHandle  handle)
inlineinherited

Deregisters the buffer.

Deregistering fails while the buffer is in use, so retrieve the buffer from the output queue after grabbing.

Note
Do not delete buffers before they are deregistered.

Stops grabbing.

Releases the resources and camera. Pending grab requests are canceled.

Retrieves the node from the central map by Name.

Returns the associated stream grabber parameters.

If no parameters are available, NULL is returned.

Retrieves all nodes in the node map.

Returns the result event object.

This object is associated with the result queue. The event is signaled when queue is non-empty

void Pylon::CNodeMapProxyT< Basler_GigEStreamParams::CGigEStreamParams_Params >::InvalidateNodes ( ) const
inlineinherited

Invalidates all nodes.

bool Pylon::CStreamGrabberProxyT< Basler_GigEStreamParams::CGigEStreamParams_Params >::IsOpen ( void  ) const
inlineinherited

Retrieve whether the stream grabber is open.

Opens the stream grabber.

void Pylon::CNodeMapProxyT< Basler_GigEStreamParams::CGigEStreamParams_Params >::Poll ( int64_t  ElapsedTime)
inlineinherited

Fires nodes which have a polling time.

void Pylon::CStreamGrabberProxyT< Basler_GigEStreamParams::CGigEStreamParams_Params >::PrepareGrab ( void  )
inlineinherited

Prepares grabbing.

Allocates resources, synchronizes with the camera and locks critical parameter

void Pylon::CStreamGrabberProxyT< Basler_GigEStreamParams::CGigEStreamParams_Params >::QueueBuffer ( StreamBufferHandle  Handle,
const void *  Context = NULL 
)
inlineinherited

Enqueues a buffer in the input queue.

PrepareGrab is required to queue buffers. The context is returned together with the buffer and the grab result. It is not touched by the stream grabber. It is illegal to queue a buffer a second time before it is fetched from the result queue.

StreamBufferHandle Pylon::CStreamGrabberProxyT< Basler_GigEStreamParams::CGigEStreamParams_Params >::RegisterBuffer ( void *  Buffer,
size_t  BufferSize 
)
inlineinherited

Registers a buffer for subsequent use.

Stream must be locked to register buffers The Buffer size may not exceed the value specified when PrepareGrab was called.

bool Pylon::CStreamGrabberProxyT< Basler_GigEStreamParams::CGigEStreamParams_Params >::RetrieveResult ( GrabResult Result)
inlineinherited

Retrieves a grab result from the output queue.

Returns
When result was available true is returned and and the first result is copied into the grabresult. Otherwise the grabresult remains unchanged and false is returned.

Member Data Documentation

GenApi::IEnumerationT<AccessModeEnums >& Basler_GigEStreamParams::CGigEStreamParams_Params::AccessMode
inherited

Camera access mode.

Visibility = Guru

GenApi::IBoolean& Basler_GigEStreamParams::CGigEStreamParams_Params::AutoPacketSize
inherited

Enables or disables probing of a working large packet size before grabbing.

Enables or disables probing of a working large packet size before grabbing. Using large packets reduces the overhead for transferring images but whether a large packet can be transported depends on the used network hardware and its configuration.

Visibility = Guru

GenApi::IString& Basler_GigEStreamParams::CGigEStreamParams_Params::DestinationAddr
inherited

Specifies the destination IP address.

The camera will sent all stream data to this IP address. For more details see 'TransmissionType' feature.

Visibility = Expert

GenApi::IInteger& Basler_GigEStreamParams::CGigEStreamParams_Params::DestinationPort
inherited

Specifies the destination port number (0 = auto select).

The camera will sent all stream data to this port.

Port configuration:

  1. Unicast
    The port is determined automatically. Manually choosing a port number might be useful for certain firewall configurations.
  2. Broadcast & Multicast
    For each device reachable by a specific network interface, a unique, unused port number must be assigned. Be aware that the suggested default value might be already in use. Choose an unused port or 0=autoselect in that case. The controlling application and all monitor applications must use the same port number. There is no autoselect feature availbale for monitor applications, i.e., monitor applications must not use the 0 value. For monitor applications it is convenient to use the 'UseCameraConfig' value for the 'TransmissionType' feature instead. For more details see the 'TransmissionType' feature.

Visibility = Expert

GenApi::IBoolean& Basler_GigEStreamParams::CGigEStreamParams_Params::EnableResend
inherited

Enables or disables the packet resend mechanism.

An image frame consists of n numbers of packets. Each packet has a header consisting of a 24-bit packet ID. This packet ID increases with each packet sent, and makes it possible for the receiving end to know if a particular packet has been lost during the transfer. If 'ResendPacketMechanism' is enabled, and the receiving end notices a lost packet, it will request the other side (e.g. the camera) to send the lost packet again. If enabled, the 'ResendPacketMechanism' can cause delays in the timing because the sending end will resend the lost packet. If disabled, image data packet(s) can get lost which results in an incomplete received frame. You have to weigh the disadvantages and advantages for your special application to decide whether to enable or disable this command.

Default setting: Enabled

Visibility = Expert

GenApi::IInteger& Basler_GigEStreamParams::CGigEStreamParams_Params::FrameRetention
inherited

Maximum time in milliseconds to receive all packets of an individual frame.

An image frame consists of n numbers of packets. The 'FrameRetention' always starts from the point in time the receiving end notices that a packet has been received for a particular frame. If the transmission of packets of a frame is not completed within the 'FrameRetention' time, the corresponding frame is delivered with status 'Failed'.

Visibility = Guru

GenApi::IInteger& Basler_GigEStreamParams::CGigEStreamParams_Params::MaxBufferSize
inherited

The maximum buffer size in bytes that can be registered.

Visibility = Expert

GenApi::IInteger& Basler_GigEStreamParams::CGigEStreamParams_Params::MaximumNumberResendRequests
inherited

Maximum number of resend requests per packet.

Visibility = Guru

GenApi::IInteger& Basler_GigEStreamParams::CGigEStreamParams_Params::MaxNumBuffer
inherited

The maximum number of buffers that can be used simultaneously.

Visibility = Expert

GenApi::IInteger& Basler_GigEStreamParams::CGigEStreamParams_Params::PacketTimeout
inherited

Timeout period in milliseconds between two packets within one frame.

An image frame consists of n numbers of packets. The packet timeout counting is (re)started each time a packet is received. If the timeout expires (e.g. no packet was received during the last 'PacketTimeout' period), the 'Resend Packet Mechanism' is started. For information, see the 'EnableResend' feature.

Visibility = Guru

GenApi::IInteger& Basler_GigEStreamParams::CGigEStreamParams_Params::ReceiveThreadPriority
inherited

The realtime receive thread priority.

This value sets the absolute thread priority of the receive thread.

Visibility = Guru

GenApi::IBoolean& Basler_GigEStreamParams::CGigEStreamParams_Params::ReceiveThreadPriorityOverride
inherited

If enabled, the user can set a custom priority of the receive thread.

Visibility = Guru

GenApi::IInteger& Basler_GigEStreamParams::CGigEStreamParams_Params::ReceiveWindowSize
inherited

Size of the sliding receive window in number of frames.

Visibility = Guru

GenApi::IInteger& Basler_GigEStreamParams::CGigEStreamParams_Params::ResendRequestBatching
inherited

Additional resend batching as percentage of threshold.

Visibility = Guru

GenApi::IInteger& Basler_GigEStreamParams::CGigEStreamParams_Params::ResendRequestResponseTimeout
inherited

Timeout in milliseconds for missing resend responses.

Visibility = Guru

GenApi::IInteger& Basler_GigEStreamParams::CGigEStreamParams_Params::ResendRequestThreshold
inherited

Resend threshold as percentage of receive window.

Visibility = Guru

GenApi::IInteger& Basler_GigEStreamParams::CGigEStreamParams_Params::ResendTimeout
inherited

Time in milliseconds to wait until a resend request is issued.

Visibility = Guru

GenApi::IInteger& Basler_GigEStreamParams::CGigEStreamParams_Params::SocketBufferSize
inherited

The socket buffer size in KB.

Visibility = Guru

GenApi::IInteger& Basler_GigEStreamParams::CGigEStreamParams_Params::Statistic_Buffer_Underrun_Count
inherited

Counts the number of frames lost because there were no buffers queued to the driver.

Visibility = Expert

GenApi::IInteger& Basler_GigEStreamParams::CGigEStreamParams_Params::Statistic_Failed_Buffer_Count
inherited

Counts the number of buffers with at least one failed packet (status != success).

Visibility = Expert

GenApi::IInteger& Basler_GigEStreamParams::CGigEStreamParams_Params::Statistic_Failed_Packet_Count
inherited

Counts the number of failed packets (status != success).

Visibility = Expert

GenApi::IInteger& Basler_GigEStreamParams::CGigEStreamParams_Params::Statistic_Resend_Packet_Count
inherited

Counts the number of packets requested by PACKETRESEND commands.

Visibility = Expert

GenApi::IInteger& Basler_GigEStreamParams::CGigEStreamParams_Params::Statistic_Resend_Request_Count
inherited

Counts the number of emitted PACKETRESEND commands.

Visibility = Expert

GenApi::IInteger& Basler_GigEStreamParams::CGigEStreamParams_Params::Statistic_Total_Buffer_Count
inherited

Counts the number of received frames.

Visibility = Expert

GenApi::IInteger& Basler_GigEStreamParams::CGigEStreamParams_Params::Statistic_Total_Packet_Count
inherited

Counts the number of received packets.

Visibility = Expert

GenApi::IEnumerationT<StatusEnums >& Basler_GigEStreamParams::CGigEStreamParams_Params::Status
inherited

Shows the current stream grabber status.

Visibility = Guru

GenApi::IEnumerationT<TransmissionTypeEnums >& Basler_GigEStreamParams::CGigEStreamParams_Params::TransmissionType
inherited

Controls whether the stream data is sent to a single device or to multiple devices.

  • Default (Unicast)
    The camera sends stream data to a single controlling application. Other devices cannot receive the stream data.
  • Broadcast
    The camera sends the stream data to all devices on the network. The application which starts/stops the acquisition is called the controlling application. Other applications can receive the stream data. These applications are called monitor applications, because they open the camera in read-only mode. This implies that monitor applications cannot change the camera configuration and they cannot start/stop the image acquisition. However, monitor applications can request resend requests for lost stream data packets.

    Attention: Broadcasting the stream data packets uses a high amount of network bandwidth because the stream data packets are forwarded to all devices attached to the network, even if they are not interested in receiving stream data.
  • Multicast
    Multicasting is very similar to broadcasting. The main advantage of multicasting is that multicasting saves network bandwidth, because the image data stream is only sent to those devices that are interested in receiving the data. To achieve this, the camera sends image data streams to members of a multicast group only. A multicast group is defined by an IP address taken from the multicast address range (224.0.0.0 to 239.255.255.255).

    Every device that wants to receive a multicast data stream has to be a member of a multicast group. A member of a specific multicast group only receives data destinated for this group. Data for other groups is not received. Usually network adapters and switches are able to filter the data efficently on hardware level (layer-2 packet filtering).

    When multicasting is enabled for pylon, pylon automatically takes care of joining and leaving the multicast groups defined by the destination IP address. Keep in mind that some addresses from the multicast address range are reserved for general purposes. The address range from 239.255.0.0 to 239.255.255.255 is assigned by RFC 2365 as a locally administered address space. Use one of these addresses if you are not sure.

    On protocol level multicasting involves a so-called IGMP message (IGMP = Internet Group Management Protocol). To benefit from multicasting, managed network switches should be used. These managed network switches support the IGMP protocol. Managed network switches supporting the IGMP protocol will forward multicast packets only if there is a connected device that has joined the corresponding multicast group. If the switch does not support the IGMP protocol, multicast is equivalent to broadcasting.

    Recommendation:
    • Each camera should stream to a different multicast group.
    • Streaming to different multicast groups reduces the CPU load and saves network bandwidth if the network switches supports the IGMP protocol.

  • Use camera configuration
    This setting is only available if the application has opened the device in monitor mode. If the controlling application has already configured the camera stream channel and has possibly started the acquisition, the monitor application can read all required configuration data from the camera. Additional configuration is not required. This setting can only be used if the controlling application has established the stream channel (by opening a pylon stream grabber object), and the monitor application is started afterwards.

    Note, when using broadcast and multicast configurations: When there is more than one camera device reachable by one network interface, make sure that for each camera a different port number must be assigned. For assigning port numbers, see the 'DestinationPort' feature.

Visibility = Expert

GenApi::IEnumerationT<TypeEnums >& Basler_GigEStreamParams::CGigEStreamParams_Params::Type
inherited

Selects the driver type to be used.

Visibility = Beginner

GenApi::IInteger& Basler_GigEStreamParams::CGigEStreamParams_Params::TypeIsSocketDriverAvailable
inherited

Specifies whether the socket driver is currently available.

Visibility = Guru

GenApi::IInteger& Basler_GigEStreamParams::CGigEStreamParams_Params::TypeIsWindowsFilterDriverAvailable
inherited

Specifies whether the Pylon GigE Vision Streaming Filter Driver is currently available.

Visibility = Guru

GenApi::IInteger& Basler_GigEStreamParams::CGigEStreamParams_Params::TypeIsWindowsIntelPerformanceDriverAvailable
inherited

Specifies whether the Pylon GigE Vision Performance Driver for Intel network controllers is currently available.

Visibility = Guru


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

pylon 5.0.9
Copyright © 2006-2017 Basler AG (Tue May 30 2017 17:24:58)