eBUS SDK .NET API
  • Getting Started
    • Getting started with the eBUS SDK .NET API
    • Configuring Your IDE
    • Receiving Data from a GigE Vision or USB3 Vision Transmitter
    • Sample Applications
    • GigE Vision Device Communication Parameters
    • USB3 Vision Device Communication Parameters
    • PvStream USB3 Vision Parameters
    • PvStream GigE Vision Parameters
  • eBUS SDK .NET API Reference
    • API Overview
    • eBUSDotNet
    • eBUSDotNetReceive
    • eBUSDotNetEdge
Search Results for

    Show / Hide Table of Contents
      • IActionHandler
      • IPvGenApiFactory
      • IPvMessageChannel
      • IPvRegister
      • IPvRegisterEventSink
      • IPvRegisterEventSinkSwigInterface
      • IPvRegisterFactory
      • IPvRegisterInfo
      • IPvRegisterMap
      • IPvRegisterStore
      • IPvSWStreamingChannelSource
      • IPvSWStreamingChannelSourceGenDC
      • IPvSWStreamingChannelSourceGenDCSwigInterface
      • IPvSWStreamingChannelSourceSwigInterface
      • IPvSemaphore
      • IPvSoftDeviceGEV
      • IPvStreamingChannelSource
      • IPvStreamingChannelSourceSwigInterface
      • IPvTransmitterGEV
      • IPvTriggerCallback
      • IPvTriggerSelector
      • IPvTriggerSelector.State
      • IPvUserSetNotify
      • IPvVirtualDeviceGEV
      • IPvVirtualDeviceGEVEventSink
      • IPvVirtualDeviceGEVInfo
      • IPvVirtualDeviceGEVStatistics
      • PvScanType
      • PvSoftDeviceGEV
      • PvStreamingChannelSourceDefault
      • PvStreamingChannelSourceTrigger
      • PvTransmitterGEV
      • PvTriggerSelectorAcquisitionStart
      • PvTriggerSelectorDefault
      • PvTriggerSelectorFrameStart
      • PvTriggerSelectorLineStart
      • PvUserSetState
      • PvVirtualDeviceGEV
      • SWIGTYPE_p_PvAccessType
      • SWIGTYPE_p_PvVirtualDeviceLib__GEV_ActionCmd
      • SWIGTYPE_p_unsigned_short
      • SWIGTYPE_p_void
      • TriggerModeEnum
      • TriggerSelectorEnum
      • TriggerSourceEnum
      • eBUSDotNetEdge

    Class PvTransmitterGEV

    Class for transmitting blocks using the GigE Vision streaming protocol.

    Inheritance
    object
    IPvTransmitterGEV
    PvTransmitterGEV
    Implements
    IDisposable
    Inherited Members
    IPvTransmitterGEV.swigCMemOwn
    IPvTransmitterGEV.Dispose()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: eBUSDotNetEdge
    Assembly: eBUSDotNetEdge.dll
    Syntax
    public class PvTransmitterGEV : IPvTransmitterGEV, IDisposable
    Remarks

    Procedure for transmitting blocks (images or raw data) with the eBUS SDK:

    • Ensure that the transmitter knows where to send blocks by calling Open.
    • Initialize the transmitter with a set of free buffers (PvBuffer objects) by calling LoadBufferPool.
    • Retrieve a free buffer to populate by calling RetrieveFreeBuffer.
    • Queue a buffer for transmission by calling QueueBuffer.
    • Once a buffer has been transmitted, it can be retrieved again by calling RetrieveFreeBuffer.

    The status of a given PvBuffer object can be retrieved by calling PvBuffer.OperationResult:

    • An operation result of Code::OK indicates that the buffer was transmitted successfully.
    • An operation result of Code::NETWORK_ERROR indicates that there was a problem transmitting the buffer (likely due to a lack of connectivity).
    • An operation result of Code::ABORTED indicates that the transmission of that buffer was aborted (typically by calling AbortQueuedBuffers).
    • An operation result of Code::PENDING indicates that the buffer has not yet been fully transmitted.

    Note: PvTransmitterGEV is only responsible for transmitting blocks. It does not implement a control channel like a complete GigE Vision device. To receive transmitted blocks with a PvStream application (such as eBUS Player), the transmitting application must be set up to respond to device discovery requests. Use PvVirtualDeviceGEV to respond to device discovery requests. If using eBUS Player to receive data being transmitted with this class, ensure that the application is set up as Data Receiver Only.

    For an illustration of how this API is used in practice, refer to the following source code samples in the samples directory where the eBUS SDK resides:

    • TransmitTestPattern - Transmits a test pattern to a given destination. This is the easiest starting point for learning to use PvTransmitterGEV.
    • TransmitProcessImage - Receives video from a GigE Vision device using PvStream and PvPipeline, re-samples it and print text on it using OpenCV and finally transmits it using PvTransmitterGEV.
    • TransmitTiledImagesSample - An MFC GUI application that receives video from multiple GEV transmitters, tiles into one video feed and transmits to a given destination.

    Constructors

    View Source

    PvTransmitterGEV()

    Constructor

    Declaration
    public PvTransmitterGEV()

    Properties

    View Source

    AveragePayloadThroughput

    Gets the average payload throughput in MB/s.

    Declaration
    public float AveragePayloadThroughput { get; }
    Property Value
    Type Description
    float
    View Source

    AverageTransmissionRate

    Gets the average transmission rate in MB/s.

    Declaration
    public float AverageTransmissionRate { get; }
    Property Value
    Type Description
    float
    View Source

    BlocksTransmitted

    Gets the total number of blocks transmitted.

    Declaration
    public ulong BlocksTransmitted { get; }
    Property Value
    Type Description
    ulong
    View Source

    BufferPoolThreadPriority

    Gets or sets the priority of the buffer pool thread.

    Declaration
    public uint BufferPoolThreadPriority { get; set; }
    Property Value
    Type Description
    uint
    View Source

    DestinationIPAddress

    Gets the destination IP address for transmission.

    Declaration
    public string DestinationIPAddress { get; }
    Property Value
    Type Description
    string
    View Source

    DestinationPort

    Gets the destination port for transmission.

    Declaration
    public ushort DestinationPort { get; }
    Property Value
    Type Description
    ushort
    View Source

    ExtendedIDs

    Gets or sets the extended IDs mode. Extended IDs allow for larger block and packet ID values in the GVSP protocol, enabling support for high-resolution images and high frame rates.

    Declaration
    public override bool ExtendedIDs { get; set; }
    Property Value
    Type Description
    bool

    True if extended IDs are enabled, false otherwise.

    Overrides
    IPvTransmitterGEV.ExtendedIDs
    View Source

    InstantaneousPayloadThroughput

    Gets the instantaneous payload throughput in MB/s.

    Declaration
    public float InstantaneousPayloadThroughput { get; }
    Property Value
    Type Description
    float
    View Source

    InstantaneousTransmissionRate

    Gets the instantaneous transmission rate in MB/s.

    Declaration
    public float InstantaneousTransmissionRate { get; }
    Property Value
    Type Description
    float
    View Source

    IsOpen

    Checks if the transmitter is currently open and ready to transmit.

    Declaration
    public override bool IsOpen { get; }
    Property Value
    Type Description
    bool

    True if the transmitter is open, false otherwise.

    Overrides
    IPvTransmitterGEV.IsOpen
    View Source

    IsTransmitting

    Checks if the transmitter is currently transmitting data.

    Declaration
    public override bool IsTransmitting { get; }
    Property Value
    Type Description
    bool

    True if actively transmitting, false otherwise.

    Overrides
    IPvTransmitterGEV.IsTransmitting
    View Source

    MaxPayloadThroughput

    Gets or sets the maximum payload throughput in MB/s.

    Declaration
    public float MaxPayloadThroughput { get; set; }
    Property Value
    Type Description
    float
    View Source

    NumberOfResendRequests

    Gets the number of resend requests received.

    Declaration
    public ulong NumberOfResendRequests { get; }
    Property Value
    Type Description
    ulong
    View Source

    PacketSize

    Gets or sets the packet size in bytes.

    Declaration
    public uint PacketSize { get; set; }
    Property Value
    Type Description
    uint
    View Source

    PayloadBytesTransmitted

    Gets the total number of payload bytes transmitted.

    Declaration
    public ulong PayloadBytesTransmitted { get; }
    Property Value
    Type Description
    ulong
    View Source

    QueuedBufferCount

    Gets the number of buffers currently queued in the transmitter.

    Declaration
    public uint QueuedBufferCount { get; }
    Property Value
    Type Description
    uint
    View Source

    SamplingTime

    Gets the sampling time for statistics in microseconds.

    Declaration
    public ulong SamplingTime { get; }
    Property Value
    Type Description
    ulong
    View Source

    SentBuffersTimeout

    Gets or sets the timeout in milliseconds for sent buffers.

    Declaration
    public uint SentBuffersTimeout { get; set; }
    Property Value
    Type Description
    uint
    View Source

    SourceIPAddress

    Gets the source IP address used for transmission.

    Declaration
    public string SourceIPAddress { get; }
    Property Value
    Type Description
    string
    View Source

    SourcePort

    Gets the source port used for transmission.

    Declaration
    public ushort SourcePort { get; }
    Property Value
    Type Description
    ushort
    View Source

    UserModeTransmitterThreadPriority

    Gets or sets the priority of the user mode transmitter thread.

    Declaration
    public uint UserModeTransmitterThreadPriority { get; set; }
    Property Value
    Type Description
    uint

    Methods

    View Source

    AbortQueuedBuffers()

    Abort all pending transmission requests. Waits indefinitely for current buffer to complete.

    Declaration
    public PvResult AbortQueuedBuffers()
    Returns
    Type Description
    PvResult

    PvResult indicating success (Code::OK).

    Remarks

    Buffers that were aborted will have an operation result of Code::ABORTED.

    View Source

    AbortQueuedBuffers(uint)

    Abort all pending transmission requests.

    Declaration
    public PvResult AbortQueuedBuffers(uint aTimeout)
    Parameters
    Type Name Description
    uint aTimeout

    Maximum milliseconds to wait for the current transmit before aborting.

    Returns
    Type Description
    PvResult

    PvResult indicating success (Code::OK) or timeout (Code::TIMEOUT).

    Remarks

    Buffers that were aborted will have an operation result of Code::ABORTED.

    View Source

    AbortQueuedBuffers(uint, bool[])

    Abort all pending transmission requests.

    Declaration
    public PvResult AbortQueuedBuffers(uint aTimeout, bool[] aPartialTransmission)
    Parameters
    Type Name Description
    uint aTimeout

    Maximum milliseconds to wait for the current transmit before aborting.

    bool[] aPartialTransmission

    Set to true if transmission was stopped in the middle of a block.

    Returns
    Type Description
    PvResult

    PvResult indicating success (Code::OK) or timeout (Code::TIMEOUT).

    Remarks

    Buffers that were aborted will have an operation result of Code::ABORTED.

    View Source

    Close()

    Stop sending data and close the socket.

    Declaration
    public PvResult Close()
    Returns
    Type Description
    PvResult

    PvResult indicating success (Code::OK).

    Remarks

    Any buffers currently being transmitted are aborted.

    View Source

    Dispose(bool)

    Dispose

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing
    Overrides
    IPvTransmitterGEV.Dispose(bool)
    View Source

    FireTestPacket()

    Send a GVSP test packet to the destination.

    Declaration
    public PvResult FireTestPacket()
    Returns
    Type Description
    PvResult

    PvResult indicating success (Code::OK) or failure.

    View Source

    LoadBufferPool(out PvBuffer, uint)

    Load a set of free buffers into the transmitter pool.

    Declaration
    public PvResult LoadBufferPool(out PvBuffer aBuffers, uint aBufferCount)
    Parameters
    Type Name Description
    PvBuffer aBuffers

    Array of pointers to PvBuffer objects.

    uint aBufferCount

    Number of buffer pointers provided.

    Returns
    Type Description
    PvResult

    PvResult indicating success (Code::OK) or failure (e.g., Code::INVALID_PARAMETER if buffers are invalid).

    Remarks

    These buffers can be retrieved immediately by calling RetrieveFreeBuffer.

    View Source

    Open(string, ushort)

    Initialize a socket to begin transmitting data. Uses default settings for source binding, Don't Fragment flag, and buffer management.

    Declaration
    public PvResult Open(string aDestinationIPAddress, ushort aDestinationPort)
    Parameters
    Type Name Description
    string aDestinationIPAddress

    Address to which the transmitter will send.

    ushort aDestinationPort

    Port to which the transmitter will send.

    Returns
    Type Description
    PvResult

    PvResult indicating success (Code::OK) or failure (e.g., Code::NETWORK_ERROR if socket creation failed).

    Remarks

    Once completed successfully, the transmitter sends blocks as soon as the first buffer is queued via QueueBuffer.

    View Source

    Open(string, ushort, string)

    Initialize a socket to begin transmitting data with specified source IP address.

    Declaration
    public PvResult Open(string aDestinationIPAddress, ushort aDestinationPort, string aSourceIPAddress)
    Parameters
    Type Name Description
    string aDestinationIPAddress

    Address to which the transmitter will send.

    ushort aDestinationPort

    Port to which the transmitter will send.

    string aSourceIPAddress

    Address from which the transmitter will send; empty string leaves binding to OS.

    Returns
    Type Description
    PvResult

    PvResult indicating success (Code::OK) or failure (e.g., Code::NETWORK_ERROR if socket creation failed).

    Remarks

    Once completed successfully, the transmitter sends blocks as soon as the first buffer is queued via QueueBuffer.

    View Source

    Open(string, ushort, string, ushort)

    Initialize a socket to begin transmitting data with specified source and destination.

    Declaration
    public PvResult Open(string aDestinationIPAddress, ushort aDestinationPort, string aSourceIPAddress, ushort aSourcePort)
    Parameters
    Type Name Description
    string aDestinationIPAddress

    Address to which the transmitter will send.

    ushort aDestinationPort

    Port to which the transmitter will send.

    string aSourceIPAddress

    Address from which the transmitter will send; empty string leaves binding to OS.

    ushort aSourcePort

    Port from which the transmitter will send; 0 lets the OS choose.

    Returns
    Type Description
    PvResult

    PvResult indicating success (Code::OK) or failure (e.g., Code::NETWORK_ERROR if socket creation failed).

    Remarks

    Once completed successfully, the transmitter sends blocks as soon as the first buffer is queued via QueueBuffer.

    View Source

    Open(string, ushort, string, ushort, bool)

    Initialize a socket to begin transmitting data with source, destination, and Don't Fragment flag.

    Declaration
    public PvResult Open(string aDestinationIPAddress, ushort aDestinationPort, string aSourceIPAddress, ushort aSourcePort, bool aDontFrag)
    Parameters
    Type Name Description
    string aDestinationIPAddress

    Address to which the transmitter will send.

    ushort aDestinationPort

    Port to which the transmitter will send.

    string aSourceIPAddress

    Address from which the transmitter will send; empty string leaves binding to OS.

    ushort aSourcePort

    Port from which the transmitter will send; 0 lets the OS choose.

    bool aDontFrag

    Value for the Don't Fragment flag in the IP header.

    Returns
    Type Description
    PvResult

    PvResult indicating success (Code::OK) or failure (e.g., Code::NETWORK_ERROR if socket creation failed).

    Remarks

    Once completed successfully, the transmitter sends blocks as soon as the first buffer is queued via QueueBuffer.

    View Source

    Open(string, ushort, string, ushort, bool, bool)

    Initialize a socket to begin transmitting data with source, destination, Don't Fragment flag, and extended IDs setting.

    Declaration
    public PvResult Open(string aDestinationIPAddress, ushort aDestinationPort, string aSourceIPAddress, ushort aSourcePort, bool aDontFrag, bool aExtendedIDs)
    Parameters
    Type Name Description
    string aDestinationIPAddress

    Address to which the transmitter will send.

    ushort aDestinationPort

    Port to which the transmitter will send.

    string aSourceIPAddress

    Address from which the transmitter will send; empty string leaves binding to OS.

    ushort aSourcePort

    Port from which the transmitter will send; 0 lets the OS choose.

    bool aDontFrag

    Value for the Don't Fragment flag in the IP header.

    bool aExtendedIDs

    True to use extended IDs for blocks and packets (GigE Vision 2.0).

    Returns
    Type Description
    PvResult

    PvResult indicating success (Code::OK) or failure (e.g., Code::NETWORK_ERROR if socket creation failed).

    Remarks

    Once completed successfully, the transmitter sends blocks as soon as the first buffer is queued via QueueBuffer.

    View Source

    Open(string, ushort, string, ushort, bool, bool, uint)

    Initialize a socket to begin transmitting data with buffer capacity configuration.

    Declaration
    public PvResult Open(string aDestinationIPAddress, ushort aDestinationPort, string aSourceIPAddress, ushort aSourcePort, bool aDontFrag, bool aExtendedIDs, uint aBuffersCapacity)
    Parameters
    Type Name Description
    string aDestinationIPAddress

    Address to which the transmitter will send.

    ushort aDestinationPort

    Port to which the transmitter will send.

    string aSourceIPAddress

    Address from which the transmitter will send; empty string leaves binding to OS.

    ushort aSourcePort

    Port from which the transmitter will send; 0 lets the OS choose.

    bool aDontFrag

    Value for the Don't Fragment flag in the IP header.

    bool aExtendedIDs

    True to use extended IDs for blocks and packets (GigE Vision 2.0).

    uint aBuffersCapacity

    Maximum number of buffers held in the lower layer of the transmitter.

    Returns
    Type Description
    PvResult

    PvResult indicating success (Code::OK) or failure (e.g., Code::NETWORK_ERROR if socket creation failed).

    Remarks

    Once completed successfully, the transmitter sends blocks as soon as the first buffer is queued via QueueBuffer.

    View Source

    Open(string, ushort, string, ushort, bool, bool, uint, bool)

    Initialize a socket to begin transmitting data with buffer capacity and timestamp configuration.

    Declaration
    public PvResult Open(string aDestinationIPAddress, ushort aDestinationPort, string aSourceIPAddress, ushort aSourcePort, bool aDontFrag, bool aExtendedIDs, uint aBuffersCapacity, bool aTimestampWhenSending)
    Parameters
    Type Name Description
    string aDestinationIPAddress

    Address to which the transmitter will send.

    ushort aDestinationPort

    Port to which the transmitter will send.

    string aSourceIPAddress

    Address from which the transmitter will send; empty string leaves binding to OS.

    ushort aSourcePort

    Port from which the transmitter will send; 0 lets the OS choose.

    bool aDontFrag

    Value for the Don't Fragment flag in the IP header.

    bool aExtendedIDs

    True to use extended IDs for blocks and packets (GigE Vision 2.0).

    uint aBuffersCapacity

    Maximum number of buffers held in the lower layer of the transmitter.

    bool aTimestampWhenSending

    Set the timestamp in the buffer header before sending packets.

    Returns
    Type Description
    PvResult

    PvResult indicating success (Code::OK) or failure (e.g., Code::NETWORK_ERROR if socket creation failed).

    Remarks

    Once completed successfully, the transmitter sends blocks as soon as the first buffer is queued via QueueBuffer.

    View Source

    Open(string, ushort, string, ushort, bool, bool, uint, bool, uint)

    Initialize a socket to begin transmitting data with resend request configuration.

    Declaration
    public PvResult Open(string aDestinationIPAddress, ushort aDestinationPort, string aSourceIPAddress, ushort aSourcePort, bool aDontFrag, bool aExtendedIDs, uint aBuffersCapacity, bool aTimestampWhenSending, uint aNumberOfPendingResendRequests)
    Parameters
    Type Name Description
    string aDestinationIPAddress

    Address to which the transmitter will send.

    ushort aDestinationPort

    Port to which the transmitter will send.

    string aSourceIPAddress

    Address from which the transmitter will send; empty string leaves binding to OS.

    ushort aSourcePort

    Port from which the transmitter will send; 0 lets the OS choose.

    bool aDontFrag

    Value for the Don't Fragment flag in the IP header.

    bool aExtendedIDs

    True to use extended IDs for blocks and packets (GigE Vision 2.0).

    uint aBuffersCapacity

    Maximum number of buffers held in the lower layer of the transmitter.

    bool aTimestampWhenSending

    Set the timestamp in the buffer header before sending packets.

    uint aNumberOfPendingResendRequests

    Maximum simultaneous pending resend requests; extras are ignored.

    Returns
    Type Description
    PvResult

    PvResult indicating success (Code::OK) or failure (e.g., Code::NETWORK_ERROR if socket creation failed).

    Remarks

    Once completed successfully, the transmitter sends blocks as soon as the first buffer is queued via QueueBuffer.

    View Source

    Open(string, ushort, string, ushort, bool, bool, uint, bool, uint, uint)

    Initialize a socket to begin transmitting data with full configuration options.

    Declaration
    public PvResult Open(string aDestinationIPAddress, ushort aDestinationPort, string aSourceIPAddress, ushort aSourcePort, bool aDontFrag, bool aExtendedIDs, uint aBuffersCapacity, bool aTimestampWhenSending, uint aNumberOfPendingResendRequests, uint aNumberOfBuffersHoldForResends)
    Parameters
    Type Name Description
    string aDestinationIPAddress

    Address to which the transmitter will send.

    ushort aDestinationPort

    Port to which the transmitter will send.

    string aSourceIPAddress

    Address from which the transmitter will send; empty string leaves binding to OS.

    ushort aSourcePort

    Port from which the transmitter will send; 0 lets the OS choose.

    bool aDontFrag

    Value for the Don't Fragment flag in the IP header.

    bool aExtendedIDs

    True to use extended IDs for blocks and packets (GigE Vision 2.0).

    uint aBuffersCapacity

    Maximum number of buffers held in the lower layer of the transmitter.

    bool aTimestampWhenSending

    Set the timestamp in the buffer header before sending packets.

    uint aNumberOfPendingResendRequests

    Maximum simultaneous pending resend requests; extras are ignored.

    uint aNumberOfBuffersHoldForResends

    Number of PvBuffers held to service resend requests after transfer.

    Returns
    Type Description
    PvResult

    PvResult indicating success (Code::OK) or failure (e.g., Code::NETWORK_ERROR if socket creation failed).

    Remarks

    Once completed successfully, the transmitter sends blocks as soon as the first buffer is queued via QueueBuffer.

    View Source

    QueueBuffer(PvBuffer)

    Queue one buffer to be transmitted when a connection is available.

    Declaration
    public PvResult QueueBuffer(PvBuffer aBuffer)
    Parameters
    Type Name Description
    PvBuffer aBuffer

    The buffer to transmit.

    Returns
    Type Description
    PvResult

    PvResult indicating success (Code::OK), or failure (e.g., Code::BUFFER_TOO_SMALL if buffer is empty).

    View Source

    QueuePacketResend(ulong, uint, uint)

    Queue a packet resend request for a range of packets within a block.

    Declaration
    public override void QueuePacketResend(ulong aBlockID, uint aFirstPacketID, uint aLastPacketID)
    Parameters
    Type Name Description
    ulong aBlockID

    The block ID containing the packets to resend.

    uint aFirstPacketID

    The first packet ID in the range to resend.

    uint aLastPacketID

    The last packet ID in the range to resend (inclusive).

    Overrides
    IPvTransmitterGEV.QueuePacketResend(ulong, uint, uint)
    View Source

    ResetStats()

    Reset all running transmitter counters.

    Declaration
    public void ResetStats()
    View Source

    RetrieveFreeBuffer(out PvBuffer)

    Retrieve a free buffer from the list of available buffers. Waits indefinitely for a buffer to become available.

    Declaration
    public PvResult RetrieveFreeBuffer(out PvBuffer aBuffer)
    Parameters
    Type Name Description
    PvBuffer aBuffer

    Output buffer available to populate and transmit.

    Returns
    Type Description
    PvResult

    PvResult indicating success (Code::OK).

    View Source

    RetrieveFreeBuffer(out PvBuffer, uint)

    Retrieve a free buffer from the list of available buffers.

    Declaration
    public PvResult RetrieveFreeBuffer(out PvBuffer aBuffer, uint aTimeout)
    Parameters
    Type Name Description
    PvBuffer aBuffer

    Output buffer available to populate and transmit.

    uint aTimeout

    Maximum milliseconds to wait for a free buffer.

    Returns
    Type Description
    PvResult

    PvResult indicating success (Code::OK) or timeout (Code::TIMEOUT if timeout was exceeded).

    Remarks

    If no buffer is available within the timeout, the buffer pointer is set to null.

    Implements

    IDisposable
    • View Source
    In this article
    Back to top Generated by DocFX