Class PvStream
Receive data from a GigE Vision or USB3 Vision transmitter.
Implements
Inherited Members
Namespace: eBUSDotNetReceive
Assembly: eBUSDotNetReceive.dll
Syntax
public class PvStream : IDisposable
Remarks
This provides a means of opening a connection to the data receiver and obtaining data from it.
Fields
View SourceswigCMemOwn
Declaration
protected bool swigCMemOwn
Field Value
| Type | Description |
|---|---|
| bool |
Properties
View SourceChannel
Gets the stream channel property.
Declaration
public ushort Channel { get; }
Property Value
| Type | Description |
|---|---|
| ushort |
IsOpen
Gets whether the stream is open.
Declaration
public bool IsOpen { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Parameters
Gets the parameters defining how data is received from a GigE Vision or USB3 Vision transmitter.
Declaration
public PvGenParameterArray Parameters { get; }
Property Value
| Type | Description |
|---|---|
| PvGenParameterArray |
QueuedBufferCount
Gets the number of buffers waiting to be filled with data.
Declaration
public uint QueuedBufferCount { get; }
Property Value
| Type | Description |
|---|---|
| uint |
QueuedBufferMaximum
Gets the maximum number of buffers that can be queued at a time.
Declaration
public uint QueuedBufferMaximum { get; }
Property Value
| Type | Description |
|---|---|
| uint |
Type
Type property of PvStream.
Declaration
public virtual PvStreamType Type { get; }
Property Value
| Type | Description |
|---|---|
| PvStreamType |
Methods
View SourceAbortQueuedBuffers()
Abort all pending block requests
Declaration
public PvResult AbortQueuedBuffers()
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
Close()
Close the stream channel receiver.
Declaration
public PvResult Close()
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
See Also
View SourceCreateAndOpen(PvDeviceInfo, ref PvResult)
Dynamically allocates a PvStream of the right type.
Declaration
public static PvStream CreateAndOpen(PvDeviceInfo aDeviceInfo, ref PvResult aResult)
Parameters
| Type | Name | Description |
|---|---|---|
| PvDeviceInfo | aDeviceInfo | Pointer to the device information used to open the stream. |
| PvResult | aResult | Outcome of the operation. Includes: - #PvResult::Code::OK - #PvResult::Code::INVALID_PARAMETER aInfo is not correct or default buffer configurations are not correct - #PvResult::Code::NOT_ENOUGH_MEMORY could not allocate class - #PvResult::Code::NOT_CONNECTED device not connected - #PvResult::Code::GENERIC_ERROR unexpected drive error - #PvResult::Code::BAD_VERSION bad driver version - #PvResult::Code::NOT_FOUND usb only - #PvResult::Code::CANNOT_OPEN_FILE usb only - #PvResult::Code::NOT_SUPPORTED usb only |
Returns
| Type | Description |
|---|---|
| PvStream | A pointer to the new object on success, NULL on failure. See aResult for more information on the failure. |
CreateAndOpen(string, ref PvResult)
Dynamically allocates a PvStream of the right type.
Declaration
public static PvStream CreateAndOpen(string aInfo, ref PvResult aResult)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aInfo | Information that uniquely identifies the device. You may use one of the following: - GigE Vision device's IP Address. Use the form 192.168.1.114. - USB3 Vision GUID. |
| PvResult | aResult | Outcome of the operation. Includes: - #PvResult::Code::OK - #PvResult::Code::INVALID_PARAMETER aInfo is not correct or default buffer configurations are not correct - #PvResult::Code::NOT_ENOUGH_MEMORY could not allocate class - #PvResult::Code::NOT_CONNECTED device not connected - #PvResult::Code::GENERIC_ERROR unexpected drive error - #PvResult::Code::BAD_VERSION bad driver version - #PvResult::Code::NOT_FOUND usb only - #PvResult::Code::CANNOT_OPEN_FILE usb only - #PvResult::Code::NOT_SUPPORTED usb only |
Returns
| Type | Description |
|---|---|
| PvStream | A pointer to the new object on success, NULL on failure. See aResult for more information on the failure (unless failure was aResult being NULL) |
Dispose()
Dispose.
Declaration
public void Dispose()
Dispose(bool)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing |
~PvStream()
Destructor.
Declaration
protected ~PvStream()
Free(PvStream)
Frees an object allocated with CreateAndOpen.
Declaration
public static void Free(PvStream aStream)
Parameters
| Type | Name | Description |
|---|---|---|
| PvStream | aStream | Pointer to the device object to delete. |
GetType()
Returns whether the object is a GigE Vision or USB3 Vision stream receiver.
Declaration
public PvStreamType GetType()
Returns
| Type | Description |
|---|---|
| PvStreamType | Specific object type. |
Open(PvDeviceInfo)
Opens the stream using device connection information.
Declaration
public virtual PvResult Open(PvDeviceInfo aDeviceInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| PvDeviceInfo | aDeviceInfo | Device information used to connect the stream. |
Returns
| Type | Description |
|---|---|
| PvResult | PV_OK on success, or an error code on failure. |
Remarks
See specific implementations in PvStreamGEV, PvStreamU3V, and PvStreamRTP for Open method overloads.
Open(string)
Opens the stream using a connection string.
Declaration
public virtual PvResult Open(string aInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aInfo | Transport-specific connection information (IP address, GUID, etc.). |
Returns
| Type | Description |
|---|---|
| PvResult | PV_OK on success, or an error code on failure. |
Remarks
See specific implementations in PvStreamGEV, PvStreamU3V, and PvStreamRTP for Open method overloads.
QueueBuffer(PvBuffer)
Queue a buffer to receive a block.
Declaration
public PvResult QueueBuffer(PvBuffer aBuffer)
Parameters
| Type | Name | Description |
|---|---|---|
| PvBuffer | aBuffer | A pointer to the buffer to be filled. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
RegisterEventSink(PvStreamEventSink)
Register an event sink used for callbacks.
Declaration
public PvResult RegisterEventSink(PvStreamEventSink aEventSink)
Parameters
| Type | Name | Description |
|---|---|---|
| PvStreamEventSink | aEventSink | A pointer to the event sink. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
RetrieveBuffer(out PvBuffer, ref PvResult)
Attempt to retrieve a queued buffer.
Declaration
public PvResult RetrieveBuffer(out PvBuffer aBuffer, ref PvResult aOperationResult)
Parameters
| Type | Name | Description |
|---|---|---|
| PvBuffer | aBuffer | The buffer that holds the image. |
| PvResult | aOperationResult | A pointer to the result of the acquisition operation on aBuffer, see #PvBuffer::GetOperationResult. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
RetrieveBuffer(out PvBuffer, ref PvResult, uint)
Attempt to retrieve a queued buffer.
Declaration
public PvResult RetrieveBuffer(out PvBuffer aBuffer, ref PvResult aOperationResult, uint aTimeout)
Parameters
| Type | Name | Description |
|---|---|---|
| PvBuffer | aBuffer | The buffer that holds the image. |
| PvResult | aOperationResult | A pointer to the result of the acquisition operation on aBuffer, see #PvBuffer::GetOperationResult. |
| uint | aTimeout | The maximum time, in ms, to wait for a buffer to be returned by the data receiver. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
UnregisterEventSink(PvStreamEventSink)
Unregister an event sink
Declaration
public PvResult UnregisterEventSink(PvStreamEventSink aEventSink)
Parameters
| Type | Name | Description |
|---|---|---|
| PvStreamEventSink | aEventSink | A pointer to the event sink. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|