Pleora Technologies Inc. eBUS SDK v6.4.0.6670 API



PvStreamingChannelSourceTrigger Class Reference

An implementation providing Trigger support for the IPvStreamingChannelSource interface. More...

Public Member Functions

 PvStreamingChannelSourceTrigger (uint32_t mChannel, uint32_t aRegisterBaseAddress)
 Default constructor. More...
 
virtual ~PvStreamingChannelSourceTrigger ()
 Destructor.
 
virtual void OnStreamingStart ()
 Notification that the GigE Vision controller has requested that the device start streaming on this channel. More...
 
virtual void OnStreamingStop ()
 Notification that the GigE Vision controller has requested that the device stop streaming on this channel. More...
 
virtual bool PreQueueBufferProc ()
 
virtual void PostRetrieveBufferProc ()
 
virtual void CreateRegisters (IPvRegisterMap *aRegisterMap, IPvRegisterFactory *aFactory)
 Creates all required Trigger-related registers . More...
 
virtual void CreateGenApiFeatures (IPvRegisterMap *aRegisterMap, IPvGenApiFactory *aFactory)
 Creates all Trigger-related GenApi parameters if they are needed. More...
 
virtual PvResult PreRead (IPvRegister *aRegister)
 Pre-read register notification. More...
 
virtual PvResult PreWrite (IPvRegister *aRegister)
 Pre-write register notification. More...
 
virtual PvResult Persist (IPvRegister *aRegister, IPvRegisterStore *aStore)
 Peristence request for selected registers for user-sets. More...
 
virtual void FireTrigger () const
 Software trigger. More...
 
void AddSelector (TriggerSelectorEnum aIndex, SelectorEntry aSelector)
 Adds a TriggerSelector to the map of selectors. More...
 
void AddSource (uint32_t aIndex, const PvString &aName)
 Adds a TriggerSource to the list of sources. More...
 
bool GetMode () const
 Returns the TriggerMode of the current TriggerSelector. More...
 
uint32_t GetSource () const
 Returns the enum entry index of TriggerSource for the current TriggerSelector. More...
 
- Public Member Functions inherited from IPvStreamingChannelSource
virtual ~IPvStreamingChannelSource ()
 Virtual destructor.
 
virtual uint32_t GetWidth () const =0
 Returns the current image width. More...
 
virtual uint32_t GetHeight () const =0
 Returns the current image height. More...
 
virtual uint32_t GetOffsetX () const =0
 Returns the current image offset X. More...
 
virtual uint32_t GetOffsetY () const =0
 Returns the current image offset Y. More...
 
virtual PvPixelType GetPixelType () const =0
 Returns the current pixel type. More...
 
virtual void GetWidthInfo (uint32_t &aMin, uint32_t &aMax, uint32_t &aInc) const =0
 Returns the stream channel width attributes. More...
 
virtual void GetHeightInfo (uint32_t &aMin, uint32_t &aMax, uint32_t &aInc) const =0
 Returns the stream channel height attributes. More...
 
virtual uint32_t GetChunksSize () const =0
 Gets the stream channel chunk size attributes. More...
 
virtual uint32_t GetPayloadSize () const =0
 Stream channel payload size in bytes. Return zero to have it inferred from width, height and pixel format. More...
 
virtual PvScanType GetScanType () const =0
 Returns the scan type that is used by the streaming source. More...
 
virtual bool GetChunkModeActive () const =0
 Indicates whether the current master chunk mode is active. More...
 
virtual bool GetChunkEnable (uint32_t aChunkID) const =0
 Returns the current chunk enabled state. More...
 
virtual PvResult GetSupportedPixelType (int aIndex, PvPixelType &aPixelType) const =0
 Obtains an index of supported pixel types. Used at PvSoftDeviceGEV::Start time to create the GenICam XML of the device. More...
 
virtual PvResult GetSupportedChunk (int aIndex, uint32_t &aID, PvString &aName) const =0
 Returns the indexed supported chunk type. Used at PvSoftDeviceGEV::Start time to create the GenICam XML of the device. More...
 
virtual PvResult SetWidth (uint32_t aWidth)=0
 Request from the PvSoftDeviceGEV to change the image width. More...
 
virtual PvResult SetHeight (uint32_t aHeight)=0
 Request from the PvSoftDeviceGEV to change the image height. More...
 
virtual PvResult SetOffsetX (uint32_t aOffsetX)=0
 Request from the PvSoftDeviceGEV to change the image offset X. More...
 
virtual PvResult SetOffsetY (uint32_t aOffsetY)=0
 Request from the PvSoftDeviceGEV to change the image offset Y. More...
 
virtual PvResult SetPixelType (PvPixelType aPixelType)=0
 Request from the PvSoftDeviceGEV to change the image pixel type. More...
 
virtual PvResult SetChunkModeActive (bool aEnabled)=0
 Set the master chunk mode active state. More...
 
virtual PvResult SetChunkEnable (uint32_t aChunkID, bool aEnabled)=0
 Sets the chunk enabled state for a specific chunk type. More...
 
virtual void OnOpen (const PvString &aDestIP, uint16_t aDestPort)=0
 Notification from the PvSoftDeviceGEV that this streaming channel has been opened. More...
 
virtual void OnClose ()=0
 Notification from the PvSoftDeviceGEV that this streaming channel has been closed.
 
virtual PvBufferAllocBuffer ()=0
 Request by the PvSoftDeviceGEV to allocate a PvBuffer. More...
 
virtual void FreeBuffer (PvBuffer *aBuffer)=0
 Request by the PvSoftDeviceGEV to free or release a buffer allocated with AllocBuffer. More...
 
virtual PvResult QueueBuffer (PvBuffer *aBuffer)=0
 Request by the PvSoftDeviceGEV to queue a buffer for acquisition. More...
 
virtual PvResult RetrieveBuffer (PvBuffer **aBuffer)=0
 Request by the PvSoftDeviceGEV to retrieve a buffer from the streaming source. More...
 
virtual void AbortQueuedBuffers ()=0
 Request by the PvSoftDeviceGEV to abort all buffers queued for acquisition. More...
 
virtual bool IsPayloadTypeSupported (PvPayloadType aPayloadType)
 When called, the streaming source has to return whether the specificed payload type is supported or not. More...
 
virtual void SetMultiPartAllowed (bool aAllowed)
 Sets whether the streaming source is allowed or not, but not forced, to transmit multi-part data. More...
 
virtual void SetLargeLeaderTrailerEnabled (bool aEnabled, uint32_t aMaxMultiPartCount)
 Sets whether the streaming source which transmit multi-part data uses large data leader and trailer packets. More...
 
virtual PvResult SetTestPayloadFormatMode (PvPayloadType aPayloadType)
 When called, the streaming source has to ensure it can stream buffers of the specified payload type. More...
 
- Public Member Functions inherited from IPvRegisterEventSink
virtual ~IPvRegisterEventSink ()
 Virtual destructor.
 
virtual void PostRead (IPvRegister *aRegister)
 Post-read register notification. More...
 
virtual void PostWrite (IPvRegister *aRegister)
 Post-write register notification. More...
 

Detailed Description

An implementation providing Trigger support for the IPvStreamingChannelSource interface.

PvStreamingChannelSourceTrigger provides basic Trigger support, with TriggerSelector such as AcquisitionStart, FrameStart and LineStart. It also provides an API to add/remove custom-made TriggerSelector entries, as well as TriggerSource entries.

When TriggerSource set to TriggerSoftware, there is a trigger fire call available that avoids having to call the TriggerSoftware ICommand. This provides a low-latency mechanism for software trigger.

If you require simple Trigger mechanics, create a class derived from this one (providing the required implementations of pure virtual functions), add any of the already-provided TriggerSelector.

For custom requirements, provide a concrete implementation of ITriggerSelector class and add an object of this class to PvStreamingChannelSourceTrigger, which will manage its lifetime. You can also add custom TriggerSource entries.

Constructor & Destructor Documentation

◆ PvStreamingChannelSourceTrigger()

PvStreamingChannelSourceTrigger::PvStreamingChannelSourceTrigger ( uint32_t  aChannel,
uint32_t  aRegisterBaseAddress 
)

Default constructor.

Parameters
[in]aChannelIndex of the current streaming channel.
[in]aRegisterBaseAddressBase address for all the Trigger-related registers.

Member Function Documentation

◆ AddSelector()

void PvStreamingChannelSourceTrigger::AddSelector ( TriggerSelectorEnum  aSelectorIndex,
SelectorEntry  aSelector 
)

Adds a TriggerSelector to the map of selectors.

This function creates the appropriate GenApi enum entry for the TriggerSelector feature. The enum entry shown is the name given to the ITriggerSelector object.

Newly added selector should not used previously allocated index. If so, the added selector will replace the old one.

Life cycle of added selectors is managed by this class.

Parameters
[in]aSelectorIndexIndex of the selector to add, as per TriggerSelectorEnum.
[in]aSelectorThe selector to add to the map.

◆ AddSource()

void PvStreamingChannelSourceTrigger::AddSource ( uint32_t  aIndex,
const PvString aName 
)

Adds a TriggerSource to the list of sources.

This function creates the appropriate GenApi enum entry for the TriggerSource feature.

If required, the 'Software' entry has to be manually added. It also has to have its index set to '0'. All other entries are considered hardware triggers, and do not allow a software trigger to be generated by either call to FireTrigger, or TriggerSoftware ICommand.

All distinct entries must have a unique index. Similar entries between streaming channels should share the same index. It is the responsibility of the programmer to maintain the global list of indexes.

For example, if the 'Software' Source entry is assigned index 0, it has to be added in each streaming channel source where it is required by calling:

AddSource( 0, "Software" );

In that case, no other Source entry can be added with the index '0'.

Parameters
[in]aIndexIndex of the associated enum entry. Must be unique for all distinct entries.
[in]aNameName to display for the enum entry in TriggerSource.

◆ CreateGenApiFeatures()

void PvStreamingChannelSourceTrigger::CreateGenApiFeatures ( IPvRegisterMap aRegisterMap,
IPvGenApiFactory aFactory 
)
virtual

Creates all Trigger-related GenApi parameters if they are needed.

See also
IPvStreamingChannelSource::CreateGenApiFeatures
Parameters
[in]aRegisterMapThe register map of the device.
[in]aFactoryGenApi factory used to create the new GenApi features.

Reimplemented from IPvStreamingChannelSource.

◆ CreateRegisters()

void PvStreamingChannelSourceTrigger::CreateRegisters ( IPvRegisterMap aRegisterMap,
IPvRegisterFactory aFactory 
)
virtual

Creates all required Trigger-related registers .

See also
IPvStreamingChannelSource::CreateRegisters
Parameters
[in]aRegisterMapThe register map of the device.
[in]aFactoryRegister factory used to create the new registers.

Reimplemented from IPvStreamingChannelSource.

◆ FireTrigger()

void PvStreamingChannelSourceTrigger::FireTrigger ( ) const
virtual

Software trigger.

Fires a software trigger for the current TriggerSelector.

Trigger is fired only if TriggerSource is set to 'Software'.

◆ GetMode()

bool PvStreamingChannelSourceTrigger::GetMode ( ) const

Returns the TriggerMode of the current TriggerSelector.

Returns
True if TriggerMode is set to 'On'.

◆ GetSource()

uint32_t PvStreamingChannelSourceTrigger::GetSource ( ) const

Returns the enum entry index of TriggerSource for the current TriggerSelector.

\ return Index (0-based) of the currently selected TriggerSource.

◆ OnStreamingStart()

void PvStreamingChannelSourceTrigger::OnStreamingStart ( )
virtual

Notification that the GigE Vision controller has requested that the device start streaming on this channel.

Calls the Start() function of the current TriggerSelector.

See also
IPvStreamingChannelSource::OnStreamingStart

Implements IPvStreamingChannelSource.

◆ OnStreamingStop()

void PvStreamingChannelSourceTrigger::OnStreamingStop ( )
virtual

Notification that the GigE Vision controller has requested that the device stop streaming on this channel.

Calls the Stop() function of the current TriggerSelector.

See also
IPvStreamingChannelSource::OnStreamingStop

Implements IPvStreamingChannelSource.

◆ Persist()

PvResult PvStreamingChannelSourceTrigger::Persist ( IPvRegister aRegister,
IPvRegisterStore aStore 
)
virtual

Peristence request for selected registers for user-sets.

This interface callback is invoked when saving to or loading from registers in the context of user-sets.

Some features only use one register which maps to multiple objects or variables depending on the state of its selector(s). Those features require special persistence handling to be properly mapped to user sets.

To persist device-side selected registers the code needs to go through all possible selector values and call IPvRegisterStore::Persist with the register, the store and the a suffix to used to make the selected register instance unique. If a register is affected by more than one selector, all possible combinations must be walked-through.

See also
IPvRegisterEventSink::Persist
Parameters
[in]aRegisterRegister to persist.
[in]aStoreRegister store to use for persistence.
Returns
Includes:

Reimplemented from IPvRegisterEventSink.

◆ PostRetrieveBufferProc()

void PvStreamingChannelSourceTrigger::PostRetrieveBufferProc ( )
virtual

This is an advanced feature used mostly internally. For expert users only. It is higly recommended to not override but use the default implementation.

Reimplemented from IPvStreamingChannelSource.

◆ PreQueueBufferProc()

bool PvStreamingChannelSourceTrigger::PreQueueBufferProc ( )
virtual

This is an advanced feature used mostly internally. For expert users only. It is higly recommended to not override but use the default implementation.

Returns
True if the processing loop can proceed with queueing/retrieving next buffer.

Reimplemented from IPvStreamingChannelSource.

◆ PreRead()

PvResult PvStreamingChannelSourceTrigger::PreRead ( IPvRegister aRegister)
virtual

Pre-read register notification.

Handles the pre-read operations on the PvSoftDeviceGEV for Trigger-related registers created in this class.

See also
IPvRegisterEventSink::PreRead
Parameters
[in]aRegisterRegister to which the notification applies.
Returns
Includes:

Reimplemented from IPvRegisterEventSink.

◆ PreWrite()

PvResult PvStreamingChannelSourceTrigger::PreWrite ( IPvRegister aRegister)
virtual

Pre-write register notification.

Handles the pre-write operations on the PvSoftDeviceGEV for Trigger-related registers created in this class.

See also
IPvRegisterEventSink::PreWrite
Parameters
[in]aRegisterRegister to which the notification applies.
Returns
Includes:

Reimplemented from IPvRegisterEventSink.


The documentation for this class was generated from the following files:
PvStreamingChannelSourceTrigger::AddSource
void AddSource(uint32_t aIndex, const PvString &aName)
Adds a TriggerSource to the list of sources.
Definition: PvStreamingChannelSourceTrigger.cpp:451

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