Pleora Technologies Inc. eBUS SDK v6.2.8.5877 API



PvStreamGEV Class Reference

Receive data from a GigE Vision. More...

Public Member Functions

 PvStreamGEV ()
 Constructor.
 
virtual ~PvStreamGEV ()
 Destructor.
 
PvResult Open (const PvDeviceInfo *aDeviceInfo)
 Begin receiving blocks (images or raw data) unicasted from a GigE Vision transmitter. More...
 
PvResult Open (const PvDeviceInfo *aDeviceInfo, uint16_t aLocalPort, uint16_t aChannel=0, const PvString &aLocalIpAddress=PvString(), uint32_t aBuffersCapacity=64)
 Begin receiving blocks (images or raw data) unicasted from a GigE Vision transmitter. More...
 
PvResult Open (const PvDeviceInfo *aDeviceInfo, const PvString &aMulticastAddr, uint16_t aDataPort, uint16_t aChannel=0, const PvString &aLocalIPAddress=PvString(), uint32_t aBuffersCapacity=64)
 Begin receiving blocks (images or raw data) multicasted from a GigE Vision transmitter. More...
 
PvResult Open (const PvString &aInfo)
 Begin receiving blocks (images or raw data) unicasted from a GigE Vision transmitter. More...
 
PvResult Open (const PvString &aInfo, uint16_t aLocalPort, uint16_t aChannel=0, const PvString &aLocalIpAddress=PvString(), uint32_t aBuffersCapacity=64)
 Begin receiving blocks (images or raw data) unicasted from a GigE Vision transmitter. More...
 
PvResult Open (const PvString &aInfo, const PvString &aMulticastAddr, uint16_t aDataPort, uint16_t aChannel=0, const PvString &aLocalIPAddress=PvString(), uint32_t aBuffersCapacity=64)
 Begin receiving blocks (images or raw data) multicasted from a GigE Vision transmitter. More...
 
virtual PvStreamType GetType () const
 Returns whether the object is a GigE Vision or USB3 Vision stream receiver. More...
 
PvDataReceiverType GetDataReceiverType () const
 Returns the type of GigE Vision data receiving used by the stream receiver. More...
 
PvResult FlushPacketQueue ()
 Flushes all non-processed UDP packets from the data receiver. More...
 
bool GetWaitForFirstPacketOfBlockToStart () const
 Wait for the first packet of the block to start the stream capture StartStreamOnlyOnPacketIdZero property. More...
 
PvResult SetWaitForFirstPacketOfBlockToStart (bool aWaitForFirstPacketOfBlockToStart)
 Set the stream's StartStreamOnlyOnPacketIdZero property. More...
 
uint16_t GetLocalPort () const
 Get the stream's DataPort property. More...
 
PvString GetLocalIPAddress () const
 Get the stream's LocalIPAddress property. More...
 
PvString GetMulticastIPAddress () const
 Get the stream's MulticastIPAddress property. More...
 
PvString GetDeviceIPAddress () const
 Get the IP address of the device this stream receives data from. More...
 
uint16_t GetSpecificLocalPort () const
 Returns the local UDP port requested when opening the stream. More...
 
uint32_t GetUserModeDataReceiverThreadPriority () const
 Get the priority of the thread used to run the data receiver user mode. More...
 
PvResult SetUserModeDataReceiverThreadPriority (uint32_t aPriority)
 Set the priority of the thread used to run the data receiver user mode. More...
 
- Public Member Functions inherited from PvStream
virtual ~PvStream ()
 Destructor.
 
uint32_t GetQueuedBufferCount () const
 Get the number of buffers (PvBuffer objects) waiting to be filled with images by the data receiver. More...
 
uint32_t GetQueuedBufferMaximum () const
 Get the maximum number of buffers (PvBuffer objects) that can be queued at a time. More...
 
PvResult Close ()
 Close the stream channel receiver. More...
 
PvResult AbortQueuedBuffers ()
 Abort all pending block requests. More...
 
PvResult QueueBuffer (PvBuffer *aBuffer)
 Queue a buffer to receive a block. More...
 
PvResult RetrieveBuffer (PvBuffer **aBuffer, PvResult *aOperationResult, uint32_t aTimeout=0xFFFFFFFF)
 Attempt to retrieve a queued buffer. More...
 
uint16_t GetChannel ()
 Get the stream's Channel property. More...
 
bool IsOpen () const
 Test if the stream is open. More...
 
PvResult RegisterEventSink (PvStreamEventSink *aEventSink)
 Register an event sink used for callbacks. More...
 
PvResult UnregisterEventSink (PvStreamEventSink *aEventSink)
 Unregister an event sink. More...
 
PvGenParameterArrayGetParameters ()
 Get the parameters defining how data is received from a GigE Vision transmitter. More...
 

Static Public Member Functions

static PvResult IsDriverInstalled (PvString &aIPAddress, bool &aInstalled, const PvString &aLocalIPAddress=PvString())
 Test if the specified GigE Vision device is currently reachable through an eBUS driver. More...
 
- Static Public Member Functions inherited from PvStream
static PvStreamCreateAndOpen (const PvDeviceInfo *aDeviceInfo, PvResult *aResult)
 Dynamically allocates a PvStream of the right type. More...
 
static PvStreamCreateAndOpen (const PvString &aInfo, PvResult *aResult)
 Dynamically allocates a PvStream of the right type. More...
 
static void Free (PvStream *aStream)
 Frees an object allocated with CreateAndOpen. More...
 

Additional Inherited Members

- Protected Member Functions inherited from PvStream
 PvStream ()
 Constructor.
 

Detailed Description

Receive data from a GigE Vision.

This provides a means of opening a connection to the data receiver and obtaining data from it.

Member Function Documentation

◆ FlushPacketQueue()

PvResult PvStreamGEV::FlushPacketQueue ( )

Flushes all non-processed UDP packets from the data receiver.

Should be called before resuming streaming after a pause to ensure that old packets are not processed as new incoming data.

Returns
Includes:

◆ GetDataReceiverType()

PvDataReceiverType PvStreamGEV::GetDataReceiverType ( ) const

Returns the type of GigE Vision data receiving used by the stream receiver.

Returns
Data receiver type.

◆ GetDeviceIPAddress()

PvString PvStreamGEV::GetDeviceIPAddress ( ) const

Get the IP address of the device this stream receives data from.

Returns
IP address of the streaming device.

◆ GetLocalIPAddress()

PvString PvStreamGEV::GetLocalIPAddress ( ) const

Get the stream's LocalIPAddress property.

Returns
The stream's LocalIPAddress property.

◆ GetLocalPort()

uint16_t PvStreamGEV::GetLocalPort ( ) const

Get the stream's DataPort property.

Returns
The stream's DataPort property.

◆ GetMulticastIPAddress()

PvString PvStreamGEV::GetMulticastIPAddress ( ) const

Get the stream's MulticastIPAddress property.

Returns
The stream's MulticastIPAddress property.

◆ GetSpecificLocalPort()

uint16_t PvStreamGEV::GetSpecificLocalPort ( ) const

Returns the local UDP port requested when opening the stream.

0 is returned if the user did not open the stream requesting a specific local UDP port if if the stream is not opened.

Returns
Local UDP port requested when opening the stream.

◆ GetType()

PvStreamType PvStreamGEV::GetType ( ) const
virtual

Returns whether the object is a GigE Vision or USB3 Vision stream receiver.

Returns
Specific object type.

Reimplemented from PvStream.

◆ GetUserModeDataReceiverThreadPriority()

uint32_t PvStreamGEV::GetUserModeDataReceiverThreadPriority ( ) const

Get the priority of the thread used to run the data receiver user mode.

See SetUserModeDataReceiverThreadPriority for details about the meaning of the values returned

Returns
The priority of the thread

◆ GetWaitForFirstPacketOfBlockToStart()

bool PvStreamGEV::GetWaitForFirstPacketOfBlockToStart ( ) const

Wait for the first packet of the block to start the stream capture StartStreamOnlyOnPacketIdZero property.

Returns
The value of the StartStreamOnlyOnPacketIdZero property.

◆ IsDriverInstalled()

PvResult PvStreamGEV::IsDriverInstalled ( PvString aIPAddress,
bool &  aInstalled,
const PvString aLocalIPAddress = PvString() 
)
static

Test if the specified GigE Vision device is currently reachable through an eBUS driver.

Parameters
[in]aIPAddressThe GigE Vision transmitter's IP address.
[out]aInstalledTrue if the device is reachable through an eBUS driver; otherwise, false.
[in]aLocalIPAddressDeprecated and ignored.
Returns
Includes:

◆ Open() [1/6]

PvResult PvStreamGEV::Open ( const PvDeviceInfo aDeviceInfo)
virtual

Begin receiving blocks (images or raw data) unicasted from a GigE Vision transmitter.

See equivalent Open method with aInfo PvString as first parameter for more information.

Parameters
[in]aDeviceInfoDevice information as retrieved from a device finder.
Returns
Includes:

Implements PvStream.

◆ Open() [2/6]

PvResult PvStreamGEV::Open ( const PvDeviceInfo aDeviceInfo,
const PvString aMulticastAddr,
uint16_t  aDataPort,
uint16_t  aChannel = 0,
const PvString aLocalIPAddress = PvString(),
uint32_t  aBuffersCapacity = 64 
)

Begin receiving blocks (images or raw data) multicasted from a GigE Vision transmitter.

See equivalent Open method with aInfo PvString as first parameter for more information.

Parameters
[in]aDeviceInfoDevice information as retrieved from a device finder.
[in]aMulticastAddrThe multicast IP address to which the receiver subscribes and the GigE Vision transmitter sends data. (Set the streaming channel destination address (SCDA) on your GigE Vision transmitter accordingly by calling PvDeviceGEV::SetStreamDestination.)
[in]aDataPortThe multicast port to which the receiver subscribes and the GigE Vision transmitter sends data. (Set the streaming channel port (SCP) on your GigE Vision transmitter accordingly by calling PvDeviceGEV::SetStreamDestination.)
[in]aChannelThe GigE Vision transmitter's streaming channel (default 0).
[in]aLocalIPAddressDeprecated and ignored.
[in]aBuffersCapacityThe maximum number of buffers that can be stored simultaneously in the data receiver.
Returns
Includes:

◆ Open() [3/6]

PvResult PvStreamGEV::Open ( const PvDeviceInfo aDeviceInfo,
uint16_t  aLocalPort,
uint16_t  aChannel = 0,
const PvString aLocalIPAddress = PvString(),
uint32_t  aBuffersCapacity = 64 
)

Begin receiving blocks (images or raw data) unicasted from a GigE Vision transmitter.

See equivalent Open method with aInfo PvString as first parameter for more information.

Parameters
[in]aDeviceInfoDevice information as retrieved from a device finder.
[in]aLocalPortThe local port upon which to begin receiving incoming data. A value of 0 (default) indicates that the local port will be assigned automatically. Call GetLocalPort afterwards to obtain the port number that was assigned by the system. Set the streaming channel destination address (SCDA) on your GigE Vision transmitter accordingly by calling PvDeviceGEV::SetStreamDestination.
[in]aChannelThe GigE Vision transmitter's streaming channel (default 0).
[in]aLocalIPAddressDeprecated and ignored.
[in]aBuffersCapacityThe maximum number of buffers that can be stored simultaneously in the data receiver.
Returns
Includes:

◆ Open() [4/6]

PvResult PvStreamGEV::Open ( const PvString aInfo)
virtual

Begin receiving blocks (images or raw data) unicasted from a GigE Vision transmitter.

Note that this overload of Open is for receiving blocks that are unicasted from a GigE Vision transmitter to an interface on the same subnet. To receive multicasted data, refer to the other overload of the other (multicast) Open method.

Parameters
[in]aInfoThe GigE Vision transmitter's IP address.
Returns
Includes:

Implements PvStream.

◆ Open() [5/6]

PvResult PvStreamGEV::Open ( const PvString aInfo,
const PvString aMulticastAddr,
uint16_t  aDataPort,
uint16_t  aChannel = 0,
const PvString aLocalIPAddress = PvString(),
uint32_t  aBuffersCapacity = 64 
)

Begin receiving blocks (images or raw data) multicasted from a GigE Vision transmitter.

Note that this overload of Open is for receiving blocks that are multicasted from a GigE Vision transmitter to a given multicast group. To receive unicasted data, refer to the other overload of the Open method.

Multicasting is the delivery of data to a group of receivers simultaneously in a single transmission.

The following example illustrates how to multicast data from one transmitter to a given set of receivers:

  • Connect receivers and transmitter to an IGMP compliant switch.
  • The GigE Vision transmitter begins transmitting to a multicast group (i.e. 239.192.1.1:1042).
  • The GigE Vision transmitter has a control channel listening for device discovery requests and packet resend requests on a given IP address (i.e. 169.254.1.1).
  • Receiver applications discover the device and subscribe to the multicast group (call Open( "169.254.1.1", "239.192.1.1", 1042 ))

Why does the GigE Vision device address (aIPAddress) need to be specified? In this example, the data is transmitted using the GVSP protocol to a multicast group (239.192.1.1:1042). The receiving application contacts the device (IP address 169.254.1.1) using the GVCP protocol to ensure that it is reachable. In addition to this, packet resend requests are directed from receiver to GigE Vision device using the GVCP control channel. This is by design as per the GigEVision standard.

Multicasting uses the IGMP (Internet Group Management Protocol) and requires an IGMP-compliant switch. The switch maintains a list of subscribed peers associated with a given multicast group. Multicast group IP addresses take the form 239.192.xx.yy. It is also possible to use multicasting with a non-IGMP compliant switch or network. In that case, the multicast stream is simply broadcasted to every connected entity on the network. It can be OK in controlled environment, but use with caution! To learn more about IGMPv3, see RFC 3376 at www.ietf.org.

For a complete illustration of how to use this method to receive data multicasted from a GigE Vision transmitter, refer to the following two samples:

  • MulticastMaster - Connects to a GigE Vision device as a controler and tells it to begin streaming to a multicast address.
  • MulticastSlave - Illustrates the use of PvStream multicast Open method by receiving the data the GigE Vision device is transmitting.
Parameters
[in]aInfoThe GigE Vision transmitter's IP address.
[in]aMulticastAddrThe multicast IP address to which the receiver subscribes and the GigE Vision transmitter sends data. (Set the streaming channel destination address (SCDA) on your GigE Vision transmitter accordingly by calling PvDeviceGEV::SetStreamDestination.)
[in]aDataPortThe multicast port to which the receiver subscribes and the GigE Vision transmitter sends data. (Set the streaming channel port (SCP) on your GigE Vision transmitter accordingly by calling PvDeviceGEV::SetStreamDestination.)
[in]aChannelThe GigE Vision transmitter's streaming channel (default 0).
[in]aLocalIPAddressThe local IP address upon which the stream object will begin receiving incoming data. An empty string (default) indicates that the local ip address will be assigned automatically.
[in]aBuffersCapacityThe maximum number of buffers that can be stored simultaneously in the data receiver.
Returns
Includes:

◆ Open() [6/6]

PvResult PvStreamGEV::Open ( const PvString aInfo,
uint16_t  aLocalPort,
uint16_t  aChannel = 0,
const PvString aLocalIPAddress = PvString(),
uint32_t  aBuffersCapacity = 64 
)

Begin receiving blocks (images or raw data) unicasted from a GigE Vision transmitter.

Note that this overload of Open is for receiving blocks that are unicasted from a GigE Vision transmitter to an interface on the same subnet. To receive multicasted data, refer to the other overload of the other (multicast) Open method.

Parameters
[in]aInfoThe GigE Vision transmitter's IP address.
[in]aLocalPortThe local port upon which to begin receiving incoming data. A value of 0 (default) indicates that the local port will be assigned automatically. Call GetLocalPort afterwards to obtain the port number that was assigned by the system. Set the streaming channel destination address (SCDA) on your GigE Vision transmitter accordingly by calling PvDeviceGEV::SetStreamDestination.
[in]aChannelThe GigE Vision transmitter's streaming channel (default 0).
[in]aLocalIPAddressThe local IP address upon which to begin receiving incoming data. An empty string (default) indicates that the local IP address will be assigned automatically. Call GetLocalIPAddress afterwards to obtain the local IP address that was assigned by the system. Set the streaming channel port number (SCP) on your GigE Vision transmitter accordingly by calling PvDeviceGEV::SetStreamDestination.
[in]aBuffersCapacityThe maximum number of buffers that can be stored simultaneously in the data receiver.
Returns
Includes:

◆ SetUserModeDataReceiverThreadPriority()

PvResult PvStreamGEV::SetUserModeDataReceiverThreadPriority ( uint32_t  aPriority)

Set the priority of the thread used to run the data receiver user mode.

Only applicable if using a user-mode data receiver. The thread priority of a driver-based data receiver cannot be controlled. This thread receives and processes all packets received from the device.

If you change the thread priorities, it may alterate the stability of the system. For this reason, if you report a bug to Pleora, ensure to clearly mention that you change threads priorities.

See GetUserModeDataReceiverThreadPriority

Parameters
[in]aPrioritySee PvPipeline::SetBufferHandlingThreadPriority for description of the supported values
Returns
Includes:

◆ SetWaitForFirstPacketOfBlockToStart()

PvResult PvStreamGEV::SetWaitForFirstPacketOfBlockToStart ( bool  aWaitForFirstPacketOfBlockToStart)

Set the stream's StartStreamOnlyOnPacketIdZero property.

Parameters
[in]aWaitForFirstPacketOfBlockToStartThe value being set.
Returns
PvResult::Code::OK or PvResult::Code::NOT_SUPPORTED or PvResult::Code::NOT_CONNECTED

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

Copyright (c) 2002-2021 Pleora Technologies Inc.
www.pleora.com