Class PvStreamingChannelSourceTrigger
Trigger-capable streaming source implementing IPvSWStreamingChannelSource.
Implements
Inherited Members
Namespace: eBUSDotNetEdge
Assembly: eBUSDotNetEdge.dll
Syntax
public class PvStreamingChannelSourceTrigger : IPvSWStreamingChannelSourceSwigInterface, IPvStreamingChannelSourceSwigInterface, IPvRegisterEventSinkSwigInterface, IDisposable
Remarks
Provides TriggerSelector/TriggerSource support (AcquisitionStart, FrameStart, LineStart, etc.), allows registering custom selectors and sources, and exposes a low-latency software trigger path when TriggerSource is Software.
Constructors
View SourcePvStreamingChannelSourceTrigger(uint, uint)
Construct a trigger-capable streaming source for a channel.
Declaration
public PvStreamingChannelSourceTrigger(uint mChannel, uint aRegisterBaseAddress)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | mChannel | Streaming channel index. |
| uint | aRegisterBaseAddress | Base address for trigger-related registers. |
Fields
View SourceswigCMemOwn
Declaration
protected bool swigCMemOwn
Field Value
| Type | Description |
|---|---|
| bool |
Methods
View SourceAbortQueuedBuffers()
Abort all buffers currently queued for transmission.
Declaration
public virtual void AbortQueuedBuffers()
AddSelector(TriggerSelectorEnum, IPvTriggerSelector)
Add or replace a trigger selector entry.
Declaration
public void AddSelector(TriggerSelectorEnum aIndex, IPvTriggerSelector aSelector)
Parameters
| Type | Name | Description |
|---|---|---|
| TriggerSelectorEnum | aIndex | Selector identifier. |
| IPvTriggerSelector | aSelector | Selector instance to add. |
AddSelectorTriggerCallback(TriggerSelectorEnum, IPvTriggerCallback)
Bind in an implementation of the IPvTriggerCallback class
Declaration
public void AddSelectorTriggerCallback(TriggerSelectorEnum aIndex, IPvTriggerCallback aCallback)
Parameters
| Type | Name | Description |
|---|---|---|
| TriggerSelectorEnum | aIndex | Which Trigger selector should this callback be for |
| IPvTriggerCallback | aCallback | Class which implements the IPvTriggerCallback interface |
AddSource(uint, string)
Register a trigger source entry.
Declaration
public void AddSource(uint aIndex, string aName)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | aIndex | Source index (must be unique across sources). |
| string | aName | Display name for the source. |
AllocBuffer()
Allocate a buffer for image payload delivery.
Declaration
public virtual PvBuffer AllocBuffer()
Returns
| Type | Description |
|---|---|
| PvBuffer | A newly allocated PvBuffer instance. |
CreateGenApiFeatures(IPvRegisterMap, IPvGenApiFactory)
Create GenApi features for trigger control.
Declaration
public virtual void CreateGenApiFeatures(IPvRegisterMap aRegisterMap, IPvGenApiFactory aFactory)
Parameters
| Type | Name | Description |
|---|---|---|
| IPvRegisterMap | aRegisterMap | Register map of the device. |
| IPvGenApiFactory | aFactory | GenApi factory used to create nodes. |
CreateRegisters(IPvRegisterMap, IPvRegisterFactory)
Create trigger-related registers.
Declaration
public virtual void CreateRegisters(IPvRegisterMap aRegisterMap, IPvRegisterFactory aFactory)
Parameters
| Type | Name | Description |
|---|---|---|
| IPvRegisterMap | aRegisterMap | Register map of the device. |
| IPvRegisterFactory | aFactory | Register factory used to create registers. |
CreateTriggerMode(IPvRegisterMap, IPvGenApiFactory)
Build TriggerMode GenApi feature.
Declaration
protected virtual void CreateTriggerMode(IPvRegisterMap aRegisterMap, IPvGenApiFactory aFactory)
Parameters
| Type | Name | Description |
|---|---|---|
| IPvRegisterMap | aRegisterMap | Register map of the device. |
| IPvGenApiFactory | aFactory | GenApi factory used to create nodes. |
CreateTriggerSelector(IPvRegisterMap, IPvGenApiFactory)
Build TriggerSelector GenApi feature.
Declaration
protected virtual void CreateTriggerSelector(IPvRegisterMap aRegisterMap, IPvGenApiFactory aFactory)
Parameters
| Type | Name | Description |
|---|---|---|
| IPvRegisterMap | aRegisterMap | Register map of the device. |
| IPvGenApiFactory | aFactory | GenApi factory used to create nodes. |
CreateTriggerSoftware(IPvRegisterMap, IPvGenApiFactory)
Build TriggerSoftware GenApi command.
Declaration
protected virtual void CreateTriggerSoftware(IPvRegisterMap aRegisterMap, IPvGenApiFactory aFactory)
Parameters
| Type | Name | Description |
|---|---|---|
| IPvRegisterMap | aRegisterMap | Register map of the device. |
| IPvGenApiFactory | aFactory | GenApi factory used to create nodes. |
CreateTriggerSource(IPvRegisterMap, IPvGenApiFactory)
Build TriggerSource GenApi feature.
Declaration
protected virtual void CreateTriggerSource(IPvRegisterMap aRegisterMap, IPvGenApiFactory aFactory)
Parameters
| Type | Name | Description |
|---|---|---|
| IPvRegisterMap | aRegisterMap | Register map of the device. |
| IPvGenApiFactory | aFactory | GenApi factory used to create nodes. |
Dispose()
Dispose.
Declaration
public void Dispose()
Dispose(bool)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing |
~PvStreamingChannelSourceTrigger()
Destructor.
Declaration
protected ~PvStreamingChannelSourceTrigger()
FireTrigger()
Fire a software trigger for the current selector when source is Software.
Declaration
public virtual void FireTrigger()
FreeBuffer(PvBuffer)
Release a previously allocated buffer.
Declaration
public virtual void FreeBuffer(PvBuffer aBuffer)
Parameters
| Type | Name | Description |
|---|---|---|
| PvBuffer | aBuffer | Buffer to release. |
GetChunkEnable(uint)
Check whether a specific chunk is enabled.
Declaration
public virtual bool GetChunkEnable(uint aChunkID)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | aChunkID | Chunk identifier. |
Returns
| Type | Description |
|---|---|
| bool |
|
GetChunkModeActive()
Determine whether chunk mode is active.
Declaration
public virtual bool GetChunkModeActive()
Returns
| Type | Description |
|---|---|
| bool |
|
GetChunksSize()
Get the size of all enabled chunks.
Declaration
public virtual uint GetChunksSize()
Returns
| Type | Description |
|---|---|
| uint | Total chunk size in bytes. |
GetGevSCPSPacketSizeInfo(out uint)
Get the customized max value for GevSCPSPacketSize. Used at #PvSoftDeviceGEV::Start time to create the GenICam XML of the device.
Declaration
public virtual PvResult GetGevSCPSPacketSizeInfo(out uint aMax)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | aMax | GevSCPSPacketSize maximum. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
GetHeight()
Get the configured image height.
Declaration
public virtual uint GetHeight()
Returns
| Type | Description |
|---|---|
| uint | Height in pixels. |
GetHeightInfo(out uint, out uint, out uint)
Get the supported range for image height.
Declaration
public virtual void GetHeightInfo(out uint aMin, out uint aMax, out uint aInc)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | aMin | Receives the minimum height. |
| uint | aMax | Receives the maximum height. |
| uint | aInc | Receives the increment step. |
GetMode()
Get trigger mode for the current selector.
Declaration
public bool GetMode()
Returns
| Type | Description |
|---|---|
| bool | True if trigger mode is ON; otherwise false. |
GetOffsetX()
Get the configured X offset.
Declaration
public virtual uint GetOffsetX()
Returns
| Type | Description |
|---|---|
| uint | Horizontal offset in pixels. |
GetOffsetY()
Get the configured Y offset.
Declaration
public virtual uint GetOffsetY()
Returns
| Type | Description |
|---|---|
| uint | Vertical offset in pixels. |
GetPayloadSize()
Get the total payload size.
Declaration
public virtual uint GetPayloadSize()
Returns
| Type | Description |
|---|---|
| uint | Payload size in bytes. |
GetPixelType()
Get the configured pixel type.
Declaration
public virtual PvPixelType GetPixelType()
Returns
| Type | Description |
|---|---|
| PvPixelType | The current pixel format. |
GetScanType()
Get the configured scan type.
Declaration
public virtual PvScanType GetScanType()
Returns
| Type | Description |
|---|---|
| PvScanType | Current scan type. |
GetSource()
Get active trigger source index.
Declaration
public uint GetSource()
Returns
| Type | Description |
|---|---|
| uint | Trigger source index. |
GetSupportedChunk(int, out uint, out string)
Query a supported chunk descriptor.
Declaration
public virtual PvResult GetSupportedChunk(int aIndex, out uint aID, out string aName)
Parameters
| Type | Name | Description |
|---|---|---|
| int | aIndex | Zero-based index of the chunk. |
| uint | aID | Receives the chunk identifier. |
| string | aName | Receives the chunk name. |
Returns
| Type | Description |
|---|---|
| PvResult | Operation result. |
GetSupportedPixelType(int, out PvPixelType)
Query a supported pixel type.
Declaration
public virtual PvResult GetSupportedPixelType(int aIndex, out PvPixelType aPixelType)
Parameters
| Type | Name | Description |
|---|---|---|
| int | aIndex | Zero-based index of the pixel type. |
| PvPixelType | aPixelType | Receives the pixel type. |
Returns
| Type | Description |
|---|---|
| PvResult | Operation result. |
GetTxNumBuffersToUse(out uint)
Disabled transmitter buffer count query.
Declaration
public virtual PvResult GetTxNumBuffersToUse(out uint aNumBuffer)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | aNumBuffer | Receives the recommended buffer count. |
Returns
| Type | Description |
|---|---|
| PvResult | Not implemented result code. |
GetWidth()
Get the configured image width.
Declaration
public virtual uint GetWidth()
Returns
| Type | Description |
|---|---|
| uint | Width in pixels. |
GetWidthInfo(out uint, out uint, out uint)
Get the supported range for image width.
Declaration
public virtual void GetWidthInfo(out uint aMin, out uint aMax, out uint aInc)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | aMin | Receives the minimum width. |
| uint | aMax | Receives the maximum width. |
| uint | aInc | Receives the increment step. |
IsPayloadTypeSupported(PvPayloadType)
When called, the streaming source has to return whether the specificed payload type is supported or not.
Declaration
public virtual bool IsPayloadTypeSupported(PvPayloadType aPayloadType)
Parameters
| Type | Name | Description |
|---|---|---|
| PvPayloadType | aPayloadType | The payload type for which support is queried. |
Returns
| Type | Description |
|---|---|
| bool | Return true if the payload type is supported, false if not. |
OnClose()
Notifies the source that streaming is closing.
Declaration
public virtual void OnClose()
OnOpen(string, ushort)
Notifies the source that streaming is opening.
Declaration
public virtual void OnOpen(string aDestIP, ushort aDestPort)
Parameters
| Type | Name | Description |
|---|---|---|
| string | aDestIP | Destination IP address. |
| ushort | aDestPort | Destination port. |
OnStreamingStart()
Notification that streaming starts on this channel.
Declaration
public virtual void OnStreamingStart()
Remarks
Invoked by the streaming framework when acquisition begins.
See Also
View SourceOnStreamingStop()
Notification that streaming stops on this channel.
Declaration
public virtual void OnStreamingStop()
Remarks
Invoked by the streaming framework when acquisition ends.
See Also
View SourcePersist(IPvRegister, IPvRegisterStore)
Persist trigger-related registers for user sets.
Declaration
public virtual PvResult Persist(IPvRegister aRegister, IPvRegisterStore aStore)
Parameters
| Type | Name | Description |
|---|---|---|
| IPvRegister | aRegister | Register to persist. |
| IPvRegisterStore | aStore | Register store used for persistence. |
Returns
| Type | Description |
|---|---|
| PvResult | Result code. |
See Also
View SourcePostRead(IPvRegister)
Post-read register notification.
Declaration
public virtual void PostRead(IPvRegister aRegister)
Parameters
| Type | Name | Description |
|---|---|---|
| IPvRegister | aRegister | Register to which the notification applies. |
PostRetrieveBufferProc()
Post-retrieve callback after a buffer is retrieved.
Declaration
public virtual void PostRetrieveBufferProc()
See Also
View SourcePostWrite(IPvRegister)
Post-write register notification.
Declaration
public virtual void PostWrite(IPvRegister aRegister)
Parameters
| Type | Name | Description |
|---|---|---|
| IPvRegister | aRegister | Register to which the notification applies. |
PreQueueBufferProc()
Pre-queue callback; may block until trigger conditions are satisfied.
Declaration
public virtual bool PreQueueBufferProc()
Returns
| Type | Description |
|---|---|
| bool | True to proceed with queuing; false to skip. |
See Also
View SourcePreRead(IPvRegister)
Pre-read notification for trigger-related registers.
Declaration
public virtual PvResult PreRead(IPvRegister aRegister)
Parameters
| Type | Name | Description |
|---|---|---|
| IPvRegister | aRegister | Register being read. |
Returns
| Type | Description |
|---|---|
| PvResult | Result code. |
See Also
View SourcePreWrite(IPvRegister)
Pre-write notification for trigger-related registers.
Declaration
public virtual PvResult PreWrite(IPvRegister aRegister)
Parameters
| Type | Name | Description |
|---|---|---|
| IPvRegister | aRegister | Register being written. |
Returns
| Type | Description |
|---|---|
| PvResult | Result code. |
See Also
View SourceQueueBuffer(PvBuffer)
Queue a buffer for transmission.
Declaration
public virtual PvResult QueueBuffer(PvBuffer aBuffer)
Parameters
| Type | Name | Description |
|---|---|---|
| PvBuffer | aBuffer | Buffer to queue. |
Returns
| Type | Description |
|---|---|
| PvResult | Operation result. |
RetrieveBuffer(out PvBuffer)
Retrieve the next completed buffer.
Declaration
public virtual PvResult RetrieveBuffer(out PvBuffer aBuffer)
Parameters
| Type | Name | Description |
|---|---|---|
| PvBuffer | aBuffer | Receives the completed buffer. |
Returns
| Type | Description |
|---|---|
| PvResult | Operation result. |
SetChunkEnable(uint, bool)
Enable or disable a specific chunk.
Declaration
public virtual PvResult SetChunkEnable(uint aChunkID, bool aEnabled)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | aChunkID | Chunk identifier. |
| bool | aEnabled | Whether the chunk should be enabled. |
Returns
| Type | Description |
|---|---|
| PvResult | Operation result. |
SetChunkModeActive(bool)
Enable or disable chunk mode.
Declaration
public virtual PvResult SetChunkModeActive(bool aEnabled)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | aEnabled | Whether chunk mode should be active. |
Returns
| Type | Description |
|---|---|
| PvResult | Operation result. |
SetHeight(uint)
Set the image height.
Declaration
public virtual PvResult SetHeight(uint aHeight)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | aHeight | Desired height in pixels. |
Returns
| Type | Description |
|---|---|
| PvResult | Operation result. |
SetLargeLeaderTrailerEnabled(bool, uint)
Sets whether the streaming source which transmit multi-part data uses large data leader and trailer packets.
Declaration
public virtual void SetLargeLeaderTrailerEnabled(bool aEnabled, uint aMaxMultiPartCount)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | aEnabled | True if Large Leader Trailer is enabled. |
| uint | aMaxMultiPartCount | The number of maximum allowed Multi parts calculated from the value allowed by the SCPSx register. |
SetMultiPartAllowed(bool)
Sets whether the streaming source is allowed or not, but not forced, to transmit multi-part data.
Declaration
public virtual void SetMultiPartAllowed(bool aAllowed)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | aAllowed | True if multi-part is allowed. |
SetOffsetX(uint)
Set the X offset.
Declaration
public virtual PvResult SetOffsetX(uint aOffsetX)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | aOffsetX | Horizontal offset in pixels. |
Returns
| Type | Description |
|---|---|
| PvResult | Operation result. |
SetOffsetY(uint)
Set the Y offset.
Declaration
public virtual PvResult SetOffsetY(uint aOffsetY)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | aOffsetY | Vertical offset in pixels. |
Returns
| Type | Description |
|---|---|
| PvResult | Operation result. |
SetPixelType(PvPixelType)
Set the pixel type.
Declaration
public virtual PvResult SetPixelType(PvPixelType aPixelType)
Parameters
| Type | Name | Description |
|---|---|---|
| PvPixelType | aPixelType | Desired pixel format. |
Returns
| Type | Description |
|---|---|
| PvResult | Operation result. |
SetTestPayloadFormatMode(PvPayloadType)
When called, the streaming source has to ensure it can stream buffers of the specified payload type.
Declaration
public virtual PvResult SetTestPayloadFormatMode(PvPayloadType aPayloadType)
Parameters
| Type | Name | Description |
|---|---|---|
| PvPayloadType | aPayloadType | Payload type to prepare test for. PvPayloadTypeNone sets the device back in normal operation mode. |
Returns
| Type | Description |
|---|---|
| PvResult | Includes:
|
SetWidth(uint)
Set the image width.
Declaration
public virtual PvResult SetWidth(uint aWidth)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | aWidth | Desired width in pixels. |
Returns
| Type | Description |
|---|---|
| PvResult | Operation result. |