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 | AddSelectorTriggerCallback (TriggerSelectorEnum aIndex, IPvTriggerCallback *aCallback) |
| Bind in an implementation of the IPvTriggerCallback class. 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 | GetGevSCPSPacketSizeInfo (uint32_t &aMax) const |
| Get the customized max value for GevSCPSPacketSize. 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 PvBuffer * | AllocBuffer ()=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... | |
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.
| PvStreamingChannelSourceTrigger::PvStreamingChannelSourceTrigger | ( | uint32_t | aChannel, |
| uint32_t | aRegisterBaseAddress | ||
| ) |
Default constructor.
| [in] | aChannel | Index of the current streaming channel. |
| [in] | aRegisterBaseAddress | Base address for all the Trigger-related registers. |
| 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.
| [in] | aSelectorIndex | Index of the selector to add, as per TriggerSelectorEnum. |
| [in] | aSelector | The selector to add to the map. |
| void PvStreamingChannelSourceTrigger::AddSelectorTriggerCallback | ( | TriggerSelectorEnum | aIndex, |
| IPvTriggerCallback * | aCallback | ||
| ) |
Bind in an implementation of the IPvTriggerCallback class.
| [in] | aIndex | Which Trigger selector should this callback be for |
| [in] | aCallback | Class which implements the IPvTriggerCallback interface |
| 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:
In that case, no other Source entry can be added with the index '0'.
| [in] | aIndex | Index of the associated enum entry. Must be unique for all distinct entries. |
| [in] | aName | Name to display for the enum entry in TriggerSource. |
|
virtual |
Creates all Trigger-related GenApi parameters if they are needed.
| [in] | aRegisterMap | The register map of the device. |
| [in] | aFactory | GenApi factory used to create the new GenApi features. |
Reimplemented from IPvStreamingChannelSource.
|
virtual |
Creates all required Trigger-related registers .
| [in] | aRegisterMap | The register map of the device. |
| [in] | aFactory | Register factory used to create the new registers. |
Reimplemented from IPvStreamingChannelSource.
|
virtual |
Software trigger.
Fires a software trigger for the current TriggerSelector.
Trigger is fired only if TriggerSource is set to 'Software'.
| bool PvStreamingChannelSourceTrigger::GetMode | ( | ) | const |
Returns the TriggerMode of the current TriggerSelector.
| 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.
|
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.
Implements IPvStreamingChannelSource.
|
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.
Implements IPvStreamingChannelSource.
|
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.
| [in] | aRegister | Register to persist. |
| [in] | aStore | Register store to use for persistence. |
Reimplemented from IPvRegisterEventSink.
|
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.
|
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.
|
virtual |
Pre-read register notification.
Handles the pre-read operations on the PvSoftDeviceGEV for Trigger-related registers created in this class.
| [in] | aRegister | Register to which the notification applies. |
Reimplemented from IPvRegisterEventSink.
|
virtual |
Pre-write register notification.
Handles the pre-write operations on the PvSoftDeviceGEV for Trigger-related registers created in this class.
| [in] | aRegister | Register to which the notification applies. |
Reimplemented from IPvRegisterEventSink.
Copyright (c) 2002-2024 Pleora Technologies Inc.
www.pleora.com