Pleora Technologies Inc. eBUS SDK v7.0.1.7536 API



Loading...
Searching...
No Matches
PvGenericDataContainer.h
Go to the documentation of this file.
1// *****************************************************************************
2//
3// Copyright (c) 2024, Pleora Technologies Inc., All rights reserved.
4//
5// *****************************************************************************
6
7#pragma once
8
9#include <PvGenDCLib.h>
10
11#include <PvGenDCInterfaces.h>
12#include <PvComponentType.h>
13
14#include <vector>
15
16// Forward declarations for GenDC headers (definitions are provided by the GenICam GenDC specification).
17struct GenDCComponentHeader;
18struct GenDCPartHeader;
19struct GenDCContainerHeader;
20
21
25
32
63
64
105
106
107#pragma pack(push)
108
112{
113 uint64_t Size; // Size of the 1D metadata part (in number of elements)
114 uint16_t Padding; // Size of the padding at the end of the part (in bytes)
115 uint16_t PaddingReserved; // Reserved for alignment and future use
116 uint32_t InfoReserved; // Reserved for future use
117 uint64_t InfoTypeSpecific; // Reserved for future use or set to the metadata
118 // layout ID for part type GenICam chunk/XML
119
120};
121
122
126{
127 uint64_t Size; // Size of the 1D part
128 uint16_t Padding; // Size of the padding at the end of the part
129 uint16_t PaddingReserved; // Reserved for alignement and future use
130 uint32_t InfoReserved; // Reserved for future use
131 uint64_t InfoTypeSpecific; // Reserved for future use
132
133};
134
135
139{
140 uint32_t SizeX; // X size of the 2D part (in pixels)
141 uint32_t SizeY; // Y size of the 2D part (in pixels)
142 uint32_t PaddingX; // Size of the padding at the end of each line (in bytes)
143 uint32_t PaddingY; // Size of the padding at the end of each line (in bytes)
144 uint32_t InfoReserved; // Reserved for future use
145
146};
147
148
151struct PV_GENDC_API PvGenDCPartH264Fields : public PvGenDCPart2DFields
152{
153 uint8_t Reserved; // Reserved for future use
154 uint8_t ProfileIDC; // Profile IDC sequence parameter set data attribute
155 struct H264Flags // This struct is identical to the H264Flags struct nested in GenDCInfoTypeSpecificH264
156 {
157 // Constraint set flag sequence
158 uint8_t CS_set0_flag : 1;
159 uint8_t CS_set1_flag : 1;
160 uint8_t CS_set2_flag : 1;
161 uint8_t CS_set3_flag : 1;
162 uint8_t PM : 2; // Packetization mode
163 uint8_t RF : 2; // Reserved flags
164 } Flags;
165 uint8_t LevelIDC; // Level IDC sequence parameter set data
166 uint16_t SpropInterleavingDepth;
167 uint16_t SpropMaxDonDiff;
168 uint32_t SpropDeintBufReq;
169 uint32_t SpropInitBufTime;
170
171};
172
173#pragma pack(pop)
174
179class PV_GENDC_API IPvGenericDataPart
180{
181public:
182
183 virtual ~IPvGenericDataPart() {}
184
193 virtual const GenDCPartHeader *GetHeader() const = 0;
194
203 virtual GenDCPartHeader *GetMutableHeader() = 0;
204
216 virtual uint16_t GetHeaderType() const = 0;
217
228
236 virtual uint16_t GetFlags() const = 0;
237
246 virtual uint32_t GetHeaderSize() const = 0;
247
255 virtual uint32_t GetFormat() const = 0;
256
267 virtual uint16_t GetFlowID() const = 0;
268
277 virtual uint64_t GetFlowOffset() const = 0;
278
287 virtual uint64_t GetDataSize() const = 0;
288
296 //virtual const IPvGenDCPartTypeFields * const GetTypeFields() const = 0;
297
307 virtual uint64_t GetDataOffset() const = 0;
308
314 virtual const uint8_t *GetDataPointer() const = 0;
315
321 virtual uint8_t *GetDataPointer() = 0;
322
333 virtual operator const IPvGenDCImage *() const = 0;
334
345 virtual operator const IPvGenDCChunkData *() const = 0;
346
356 virtual const IPvGenDCImage *GetGenDCImage() const = 0;
357
367 virtual const IPvGenDCChunkData *GetGenDCChunkData() const = 0;
368
379 virtual const IPvGenDCChunkWriter *GetGenDCChunkWriter() const = 0;
380
389 virtual uint64_t GetReceptionTime() const = 0;
390
401 virtual PvResult GetMetadataSpecificFields( PvGenDCPartMetadataFields &aMetadataFields ) const = 0;
402
413 virtual PvResult Get1DSpecificFields( PvGenDCPart1DFields& aSpecificFields ) const = 0;
414
425 virtual PvResult Get2DSpecificFields( PvGenDCPart2DFields &aSpecificFields ) const = 0;
426
436 virtual PvResult GetH264SpecificFields( PvGenDCPartH264Fields &aSpecificFields ) const = 0;
437
438};
439
440
445class PV_GENDC_API IPvGenericDataComponent
446{
447public:
448 virtual ~IPvGenericDataComponent() {}
449
458 virtual const GenDCComponentHeader *GetHeader() const = 0;
459
468 virtual GenDCComponentHeader *GetMutableHeader() = 0;
469
479 virtual uint16_t GetFlags() const = 0;
480
489 virtual uint32_t GetHeaderSize() const = 0;
490
497 virtual uint16_t GetGroupID() const = 0;
498
504 virtual uint16_t GetSourceID() const = 0;
505
511 virtual uint16_t GetRegionID() const = 0;
512
518 virtual uint32_t GetRegionOffsetX() const = 0;
519
525 virtual uint32_t GetRegionOffsetY() const = 0;
526
532 virtual uint64_t GetTimestamp() const = 0;
533
539 virtual uint64_t GetTypeID() const = 0;
540
549 virtual PvComponentType GetTypeIDEnum() const = 0;
550
563 virtual uint32_t GetFormat() const = 0;
564
573 virtual uint64_t GetPartHeaderOffset( uint32_t aIndex ) const = 0;
574
580 virtual uint32_t GetPartCount() const = 0;
581
589 virtual const IPvGenericDataPart *GetPart( uint32_t aIndex ) const = 0;
590
598 virtual IPvGenericDataPart *GetPart( uint32_t aIndex ) = 0;
599
607 virtual const IPvGenericDataPart *operator[]( uint32_t aIndex ) const = 0;
608
616 virtual IPvGenericDataPart *operator[]( uint32_t aIndex ) = 0;
617
630 virtual uint32_t AddPart( PvGenDCPartType aPartType, uint32_t aFlow ) = 0;
631};
632
633
647class PV_GENDC_API IPvGenericDataContainer
648{
649public:
650
651 virtual ~IPvGenericDataContainer() {}
652
658 virtual uint32_t GetComponentCount() const = 0;
659
667 virtual const IPvGenericDataComponent *GetComponent( uint32_t aIndex ) const = 0;
668
676 virtual IPvGenericDataComponent *GetComponent( uint32_t aIndex ) = 0;
677
685 virtual const IPvGenericDataComponent *operator[]( uint32_t aIndex ) const = 0;
686
694 virtual IPvGenericDataComponent *operator[]( uint32_t aIndex ) = 0;
695
704 virtual uint64_t GetDataSize() const = 0;
705
711 virtual uint64_t GetDescriptorSize() const = 0;
712
719 virtual bool IsValid() const = 0;
720
729 virtual const GenDCContainerHeader *GetHeader() const = 0;
730
739 virtual GenDCContainerHeader *GetMutableHeader() = 0;
740
751 virtual uint32_t AddComponent( PvComponentType aComponentType ) = 0;
752
753};
PvComponentType
Enumeration representing the data type of a data acquisition component. Component types are associate...
Definition PvComponentType.h:17
Interface definitions for GenDC parts that decouple from PvBuffer library.
PvGenDCVariableField
Definition PvGenericDataContainer.h:34
@ PvGenDCVFDataSize
If set as a GenDC variable field, the container data size can shrink during transmission.
Definition PvGenericDataContainer.h:37
@ PvGenDCVFComponentInvalid
If set as a GenDC variable field, the 'Invalid' flag of certain components can change during transmis...
Definition PvGenericDataContainer.h:57
@ PvGenDCVFSizeY
If set as a GenDC variable field, the container parts size and padding in the Y axis can change durin...
Definition PvGenericDataContainer.h:43
@ PvGenDCVFSizeX
If set as a GenDC variable field, the container parts size and padding in the X axis can change durin...
Definition PvGenericDataContainer.h:40
@ PvGenDCVFRegionOffset
If set as a GenDC variable field, the components offset can change during transmission.
Definition PvGenericDataContainer.h:46
@ PvGenDCVFComponentCount
If set as a GenDC variable field, the last components may not be transmitted.
Definition PvGenericDataContainer.h:54
@ PvGenDCVFReserved
If set as a GenDC variable field, the 'Reserved' flag of certain components can change during transmi...
Definition PvGenericDataContainer.h:60
@ PvGenDCVFFormat
If set as a GenDC variable field, the components format can change during transmission.
Definition PvGenericDataContainer.h:49
@ PvGenDCVFTimestamp
If set as a GenDC variable field, the components timestamp can change during transmission.
Definition PvGenericDataContainer.h:52
PvGenDCPartType
Definition PvGenericDataContainer.h:79
@ PvGenDCPart2DH264
H264 compressed image.
Definition PvGenericDataContainer.h:93
@ PvGenDCPartMetadataCustom
Custom metadata.
Definition PvGenericDataContainer.h:95
@ PvGenDCPart2DCustom
Custom 2D image.
Definition PvGenericDataContainer.h:99
@ PvGenDCPart2DJpeg2000
JPEG 2000 compressed image.
Definition PvGenericDataContainer.h:91
@ PvGenDCPartUnknown
Does not represent a part type.
Definition PvGenericDataContainer.h:103
@ PvGenDCPartCustom
Custom part.
Definition PvGenericDataContainer.h:101
@ PvGenDCPartMetadataGenICamXML
GenICam XML metadata.
Definition PvGenericDataContainer.h:83
@ PvGenDCPartMetadataGenICamChunk
GenICam chunk metadata.
Definition PvGenericDataContainer.h:81
@ PvGenDCPart2DJpeg
JPEG compressed image.
Definition PvGenericDataContainer.h:89
@ PvGenDCPart1D
1 dimensional array data.
Definition PvGenericDataContainer.h:85
@ PvGenDCPart1DCustom
Custom 1D image.
Definition PvGenericDataContainer.h:97
@ PvGenDCPart2D
Rectangular uncompressed image (monochrome or none planar).
Definition PvGenericDataContainer.h:87
Generic chunk data interface for GenDC parts.
Definition PvGenDCInterfaces.h:132
Generic chunk data writer interface for GenDC parts.
Definition PvGenDCInterfaces.h:214
Generic image interface for GenDC parts.
Definition PvGenDCInterfaces.h:33
One component in a GenDC container. A container can be formed by one or more components.
Definition PvGenericDataContainer.h:446
virtual uint64_t GetPartHeaderOffset(uint32_t aIndex) const =0
Returns the data offset for the part associated with the index.
virtual uint16_t GetRegionID() const =0
Returns the region identifier of this component.
virtual uint32_t GetHeaderSize() const =0
Returns the size of this component's header.
virtual IPvGenericDataPart * operator[](uint32_t aIndex)=0
Indexed part accessor.
virtual uint32_t GetRegionOffsetY() const =0
Returns the region offset in the Y axis for this component.
virtual uint16_t GetGroupID() const =0
Returns the group identifier of this component. Components sharing a group ID are related together in...
virtual uint16_t GetSourceID() const =0
Returns the identifier for the source that generated this component.
virtual const IPvGenericDataPart * GetPart(uint32_t aIndex) const =0
Indexed part const accessor.
virtual uint32_t GetPartCount() const =0
Returns the parts count included by this component.
virtual uint16_t GetFlags() const =0
Return the component's flags.
virtual GenDCComponentHeader * GetMutableHeader()=0
Returns a mutable pointer to the underlying GenDC component header.
virtual uint64_t GetTypeID() const =0
Returns the SFNC ComponentIdValue for this component.
virtual PvComponentType GetTypeIDEnum() const =0
Returns the SFNC ComponentIdValue for this component, as an enum.
virtual uint32_t GetRegionOffsetX() const =0
Returns the region offset in the X axis for this component.
virtual IPvGenericDataPart * GetPart(uint32_t aIndex)=0
Indexed part accessor.
virtual uint32_t GetFormat() const =0
Returns the SFNC pixel format for this component.
virtual uint32_t AddPart(PvGenDCPartType aPartType, uint32_t aFlow)=0
Creates a new part in the component.
virtual uint64_t GetTimestamp() const =0
Returns the data creation start timestamp for this component, in nanoseconds.
virtual const GenDCComponentHeader * GetHeader() const =0
Returns a const pointer to the underlying GenDC component header.
virtual const IPvGenericDataPart * operator[](uint32_t aIndex) const =0
Indexed part const accessor.
Interface used to read from a GenDC container.
Definition PvGenericDataContainer.h:648
virtual uint64_t GetDataSize() const =0
Gets the container's cumulative data size for all its parts, in bytes.
virtual uint32_t GetComponentCount() const =0
Component count of the GenDC container.
virtual GenDCContainerHeader * GetMutableHeader()=0
Returns a mutable pointer to the underlying GenDC container header.
virtual uint64_t GetDescriptorSize() const =0
Gets the container's cumulative headers sizes for all its components and parts, as well as the contai...
virtual const IPvGenericDataComponent * operator[](uint32_t aIndex) const =0
Indexed component const accessor.
virtual IPvGenericDataComponent * GetComponent(uint32_t aIndex)=0
Indexed component accessor.
virtual const GenDCContainerHeader * GetHeader() const =0
Returns a const pointer to the underlying GenDC container header.
virtual IPvGenericDataComponent * operator[](uint32_t aIndex)=0
Indexed component accessor.
virtual bool IsValid() const =0
Indicates if the container is valid. The container is valid if the container descriptor was processed...
virtual const IPvGenericDataComponent * GetComponent(uint32_t aIndex) const =0
Indexed component const accessor.
virtual uint32_t AddComponent(PvComponentType aComponentType)=0
Creates a new component in the container.
One part in a GenDC component; the smallest unit in a GenDC container.
Definition PvGenericDataContainer.h:180
virtual uint32_t GetFormat() const =0
Returns the pixel format value of this part.
virtual const IPvGenDCChunkWriter * GetGenDCChunkWriter() const =0
Returns a pointer to an IPvGenDCChunkWriter interface to the part, if the header type is chunk metada...
virtual PvResult Get1DSpecificFields(PvGenDCPart1DFields &aSpecificFields) const =0
Returns a PvGenDCPart1DFields struct, if the header type is 1D.
virtual uint64_t GetDataSize() const =0
Returns the part's data size in bytes.
virtual const GenDCPartHeader * GetHeader() const =0
Returns a const pointer to the underlying GenDC part header.
virtual uint8_t * GetDataPointer()=0
Returns the part's data pointer.
virtual PvResult Get2DSpecificFields(PvGenDCPart2DFields &aSpecificFields) const =0
Returns a PvGenDCPart2DFields struct, if the header type is 2D.
virtual uint16_t GetHeaderType() const =0
Returns the exact part's header type value, as an integer.
virtual uint64_t GetReceptionTime() const =0
Retrieves the reception time of the data container.
virtual uint16_t GetFlags() const =0
Returns the flags value for this part.
virtual const IPvGenDCImage * GetGenDCImage() const =0
Returns a pointer to an IPvGenDCImage interface to the part, if the header type is a 2D image.
virtual const IPvGenDCChunkData * GetGenDCChunkData() const =0
Returns a pointer to an IPvGenDCChunkData interface to the part, if the header type is chunk metadata...
virtual uint64_t GetFlowOffset() const =0
Returns this part's flow offset.
virtual PvGenDCPartType GetHeaderTypeEnum() const =0
Returns the part's header type, as an enum.
virtual PvResult GetMetadataSpecificFields(PvGenDCPartMetadataFields &aMetadataFields) const =0
Retrieves a PvGenDCPartMetadataFields struct, if the header type is metadata.
virtual uint64_t GetDataOffset() const =0
Returns an IPvGenDCPartTypeFields interface for this part.
virtual uint16_t GetFlowID() const =0
Returns this part's flow ID.
virtual PvResult GetH264SpecificFields(PvGenDCPartH264Fields &aSpecificFields) const =0
Returns a PvGenDCPartH264Fields struct, if the header type is H.264 compressed.
virtual GenDCPartHeader * GetMutableHeader()=0
Returns a mutable pointer to the underlying GenDC part header.
virtual uint32_t GetHeaderSize() const =0
Returns the size of this part's header.
virtual const uint8_t * GetDataPointer() const =0
Returns the part's data pointer (const).
Result information.
Definition PvResult.h:30
Specific part fields for the 1D array type.
Definition PvGenericDataContainer.h:126
Specific part fields for the 2D uncompressed, JPEG and JPEG2000 types.
Definition PvGenericDataContainer.h:139
Definition PvGenericDataContainer.h:156
Specific part fields for the H.264 compressed image type.
Definition PvGenericDataContainer.h:152
Specific part fields for the metadata type.
Definition PvGenericDataContainer.h:112

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