Pleora Technologies Inc. eBUS SDK v6.5.1.6797 API



PvStreamingChannelSourceDefault.h
1 // *****************************************************************************
2 //
3 // Copyright (c) 2018, Pleora Technologies Inc., All rights reserved.
4 //
5 // *****************************************************************************
6 
7 #ifndef __PVSTREAMINGCHANNELSOURCEDEFAULT_H__
8 #define __PVSTREAMINGCHANNELSOURCEDEFAULT_H__
9 
10 #include <PvSoftDeviceGEVInterfaces.h>
11 
12 
29 class PV_VIRTUAL_DEVICE_API PvStreamingChannelSourceDefault
31 {
32 public:
33 
42  PvStreamingChannelSourceDefault( uint32_t aWidth = 640, uint32_t aHeight = 480, PvPixelType aPixelType = PvPixelMono8, size_t aBufferCount = 16 );
43 
48 
56  virtual uint32_t GetWidth() const;
57 
65  virtual uint32_t GetHeight() const;
66 
74  virtual uint32_t GetOffsetX() const;
75 
83  virtual uint32_t GetOffsetY() const;
84 
92  virtual PvPixelType GetPixelType() const;
93 
105  virtual void GetWidthInfo( uint32_t &aMin, uint32_t &aMax, uint32_t &aInc ) const;
106 
118  virtual void GetHeightInfo( uint32_t &aMin, uint32_t &aMax, uint32_t &aInc ) const;
119 
136  virtual uint32_t GetChunksSize() const;
137 
152  virtual uint32_t GetPayloadSize() const;
153 
162  virtual PvScanType GetScanType() const;
163 
172  virtual bool GetChunkModeActive() const;
173 
188  virtual bool GetChunkEnable( uint32_t aChunkID ) const;
189 
215  virtual PvResult GetSupportedPixelType( int aIndex, PvPixelType &aPixelType ) const;
216 
245  virtual PvResult GetSupportedChunk( int aIndex, uint32_t &aID, PvString &aName ) const;
246 
264  virtual PvResult SetWidth( uint32_t aWidth );
265 
283  virtual PvResult SetHeight( uint32_t aHeight );
284 
298  virtual PvResult SetOffsetX( uint32_t aOffsetX );
299 
313  virtual PvResult SetOffsetY( uint32_t aOffsetY );
314 
332  virtual PvResult SetPixelType( PvPixelType aPixelType );
333 
348  virtual PvResult SetChunkModeActive( bool aEnabled );
349 
365  virtual PvResult SetChunkEnable( uint32_t aChunkID, bool aEnabled );
366 
373  virtual void OnOpen( const PvString &aDestIP, uint16_t aDestPort );
374 
378  virtual void OnClose();
379 
383  virtual void OnStreamingStart();
384 
388  virtual void OnStreamingStop();
389 
410  virtual PvBuffer *AllocBuffer();
411 
420  virtual void FreeBuffer( PvBuffer *aBuffer );
421 
431  virtual void AbortQueuedBuffers();
432 
449  virtual void CreateRegisters( IPvRegisterMap *aRegisterMap, IPvRegisterFactory *aFactory );
450 
511  virtual void CreateGenApiFeatures( IPvRegisterMap *aRegisterMap, IPvGenApiFactory *aFactory );
512 
528  virtual bool IsPayloadTypeSupported( PvPayloadType aPayloadType );
529 
546  virtual void SetMultiPartAllowed( bool aAllowed );
547 
565  virtual void SetLargeLeaderTrailerEnabled( bool aEnabled, uint32_t aMaxMultiPartCount );
566 
601  virtual PvResult SetTestPayloadFormatMode( PvPayloadType aPayloadType );
602 
603 private:
604 
605  size_t mBufferCount;
606  size_t mBufferAllocated;
607 
608  uint32_t mStaticWidth;
609  uint32_t mStaticHeight;
610  PvPixelType mStaticPixelType;
611 
612 };
613 
614 
615 #endif // __PVSTREAMINGCHANNELSOURCEDEFAULT_H__
PvResult
Result information.
Definition: PvResult.h:29
IPvRegisterMap
Register map interface for a software-based GigE Vision Device.
Definition: PvSoftDeviceGEVInterfaces.h:1951
IPvStreamingChannelSource::SetTestPayloadFormatMode
virtual PvResult SetTestPayloadFormatMode(PvPayloadType aPayloadType)
When called, the streaming source has to ensure it can stream buffers of the specified payload type.
Definition: PvSoftDeviceGEVInterfaces.h:1437
IPvStreamingChannelSource::GetScanType
virtual PvScanType GetScanType() const =0
Returns the scan type that is used by the streaming source.
IPvStreamingChannelSource::FreeBuffer
virtual void FreeBuffer(PvBuffer *aBuffer)=0
Request by the PvSoftDeviceGEV to free or release a buffer allocated with AllocBuffer.
IPvStreamingChannelSource::OnStreamingStop
virtual void OnStreamingStop()=0
Notification that the GigE Vision controller has requested that the device stop streaming on this cha...
PvStreamingChannelSourceDefault
A default implementation for the IPvStreamingSourceChannelSource interface.
Definition: PvStreamingChannelSourceDefault.h:29
IPvGenApiFactory
GenApi factory used to add custom GenApi parameters to a software-based GigE Vision Device GenICam XM...
Definition: PvSoftDeviceGEVInterfaces.h:2066
IPvStreamingChannelSource::OnStreamingStart
virtual void OnStreamingStart()=0
Notification that the GigE Vision controller has requested that the device start streaming on this ch...
IPvStreamingChannelSource::SetPixelType
virtual PvResult SetPixelType(PvPixelType aPixelType)=0
Request from the PvSoftDeviceGEV to change the image pixel type.
IPvStreamingChannelSource::SetHeight
virtual PvResult SetHeight(uint32_t aHeight)=0
Request from the PvSoftDeviceGEV to change the image height.
IPvStreamingChannelSource::OnClose
virtual void OnClose()=0
Notification from the PvSoftDeviceGEV that this streaming channel has been closed.
IPvStreamingChannelSource::GetSupportedPixelType
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 ...
IPvStreamingChannelSource::GetChunkEnable
virtual bool GetChunkEnable(uint32_t aChunkID) const =0
Returns the current chunk enabled state.
IPvStreamingChannelSource::GetChunkModeActive
virtual bool GetChunkModeActive() const =0
Indicates whether the current master chunk mode is active.
IPvStreamingChannelSource::SetLargeLeaderTrailerEnabled
virtual void SetLargeLeaderTrailerEnabled(bool aEnabled, uint32_t aMaxMultiPartCount)
Sets whether the streaming source which transmit multi-part data uses large data leader and trailer p...
Definition: PvSoftDeviceGEVInterfaces.h:1396
IPvStreamingChannelSource::GetPixelType
virtual PvPixelType GetPixelType() const =0
Returns the current pixel type.
IPvStreamingChannelSource::GetWidth
virtual uint32_t GetWidth() const =0
Returns the current image width.
PvString
String class.
Definition: PvString.h:25
IPvStreamingChannelSource::SetOffsetY
virtual PvResult SetOffsetY(uint32_t aOffsetY)=0
Request from the PvSoftDeviceGEV to change the image offset Y.
IPvRegisterFactory
Class used for register creation.
Definition: PvSoftDeviceGEVInterfaces.h:1895
IPvStreamingChannelSource::CreateRegisters
virtual void CreateRegisters(IPvRegisterMap *aRegisterMap, IPvRegisterFactory *aFactory)
When called, the streaming channel source should create its custom registers if they are needed.
Definition: PvSoftDeviceGEVInterfaces.h:1274
IPvStreamingChannelSource::GetWidthInfo
virtual void GetWidthInfo(uint32_t &aMin, uint32_t &aMax, uint32_t &aInc) const =0
Returns the stream channel width attributes.
IPvStreamingChannelSource::SetOffsetX
virtual PvResult SetOffsetX(uint32_t aOffsetX)=0
Request from the PvSoftDeviceGEV to change the image offset X.
IPvStreamingChannelSource::GetPayloadSize
virtual uint32_t GetPayloadSize() const =0
Stream channel payload size in bytes. Return zero to have it inferred from width, height and pixel fo...
PvPayloadType
PvPayloadType
GVSP payload type.
Definition: PvPayloadType.h:66
IPvStreamingChannelSource::CreateGenApiFeatures
virtual void CreateGenApiFeatures(IPvRegisterMap *aRegisterMap, IPvGenApiFactory *aFactory)
When called, the streaming channel source should create its custom GenApi parameters if they are need...
Definition: PvSoftDeviceGEVInterfaces.h:1340
IPvStreamingChannelSource::SetChunkModeActive
virtual PvResult SetChunkModeActive(bool aEnabled)=0
Set the master chunk mode active state.
IPvStreamingChannelSource::GetHeight
virtual uint32_t GetHeight() const =0
Returns the current image height.
IPvStreamingChannelSource::OnOpen
virtual void OnOpen(const PvString &aDestIP, uint16_t aDestPort)=0
Notification from the PvSoftDeviceGEV that this streaming channel has been opened.
IPvStreamingChannelSource::IsPayloadTypeSupported
virtual bool IsPayloadTypeSupported(PvPayloadType aPayloadType)
When called, the streaming source has to return whether the specificed payload type is supported or n...
Definition: PvSoftDeviceGEVInterfaces.h:1361
IPvStreamingChannelSource::GetOffsetY
virtual uint32_t GetOffsetY() const =0
Returns the current image offset Y.
IPvStreamingChannelSource::GetOffsetX
virtual uint32_t GetOffsetX() const =0
Returns the current image offset X.
IPvStreamingChannelSource::SetChunkEnable
virtual PvResult SetChunkEnable(uint32_t aChunkID, bool aEnabled)=0
Sets the chunk enabled state for a specific chunk type.
PvPixelType
PvPixelType
Definition: PvPixelType.h:57
IPvStreamingChannelSource::AllocBuffer
virtual PvBuffer * AllocBuffer()=0
Request by the PvSoftDeviceGEV to allocate a PvBuffer.
PvPixelMono8
@ PvPixelMono8
Definition: PvPixelType.h:61
IPvStreamingChannelSource::GetHeightInfo
virtual void GetHeightInfo(uint32_t &aMin, uint32_t &aMax, uint32_t &aInc) const =0
Returns the stream channel height attributes.
IPvStreamingChannelSource::SetMultiPartAllowed
virtual void SetMultiPartAllowed(bool aAllowed)
Sets whether the streaming source is allowed or not, but not forced, to transmit multi-part data.
Definition: PvSoftDeviceGEVInterfaces.h:1379
IPvStreamingChannelSource::GetChunksSize
virtual uint32_t GetChunksSize() const =0
Gets the stream channel chunk size attributes.
IPvStreamingChannelSource::AbortQueuedBuffers
virtual void AbortQueuedBuffers()=0
Request by the PvSoftDeviceGEV to abort all buffers queued for acquisition.
IPvStreamingChannelSource::GetSupportedChunk
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 X...
PvBuffer
Represents a block of GigE Vision or USB3 Vision data in memory.
Definition: PvBuffer.h:95
IPvStreamingChannelSource
Interface that is used by PvSoftDeviceGEV to query and report information from a streaming source imp...
Definition: PvSoftDeviceGEVInterfaces.h:787
IPvStreamingChannelSource::SetWidth
virtual PvResult SetWidth(uint32_t aWidth)=0
Request from the PvSoftDeviceGEV to change the image width.

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