CVB++ 15.0
Loading...
Searching...
No Matches

Class for a GenDC container descriptor. More...

#include <decl_gendc_descriptor.hpp>

Public Member Functions

Version GetVersion () const
 Return the GenDC descriptor standards version.
 
GenDcDescriptorFlag GetFlags () const
 Return the flags of this GenDC container.
 
std::uint32_t GetHeaderSize () const
 Return the size of this GenDC container descriptor.
 
std::uint64_t GetContainerId () const
 Return the identifier of GenDC container.
 
GenDcDescriptorVariableField GetVariableFields () const
 Return the flags identifying the variable fields of this GenDC container.
 
std::uint64_t GetDataSize () const
 Return the size of the GenDC data.
 
std::int64_t GetDataOffset () const
 Return the offset of the GenDC data.
 
std::uint32_t GetDescriptorSize () const
 Return the size of the GenDC container descriptor.
 
const std::vector< GenDcComponent > & GetComponents () const
 Return the component descriptors of this GenDC container.
 
std::vector< GenDcComponent > & GetComponents ()
 Return the component descriptors of this GenDC container.
 
size_t CalculateFlowCount () const
 Return the count of flows the container is transported in.
 
void SetFlags (GenDcDescriptorFlag flags)
 Set the flags of this GenDC container.
 
void SetContainerId (std::uint64_t id)
 Set the identifier of GenDC container.
 
void SetVariableFields (GenDcDescriptorVariableField fields)
 Set the flags identifying the variable fields of this GenDC container.
 
void SetDataSize (std::uint32_t size)
 Set the size of the GenDC data.
 
std::size_t GetSerializedSize () const
 Get the size in bytes of this GenDC descriptor when serialized.
 
void Serialize (std::uint8_t *buffer, std::size_t size) const
 Serialize this GenDC descriptor into a provided buffer.
 
std::vector< std::uint8_tSerialize () const
 Serialize this GenDC descriptor into a new buffer.
 
void * Handle () const noexcept
 Return the Handle to the internal resource.
 

Static Public Member Functions

static std::unique_ptr< GenDcDescriptorCreate (const GenDcDescriptorConfig &descriptorConfig)
 Create a GenDC descriptor.
 
static std::unique_ptr< GenDcDescriptorFromHandle (HandleGuard< GenDcDescriptor > &&guard)
 Creates a GenDC descriptor from a classic API handle.
 

Detailed Description

Class for a GenDC container descriptor.

Member Function Documentation

◆ CalculateFlowCount()

size_t CalculateFlowCount ( ) const
inline

Return the count of flows the container is transported in.

Returns
Number of flows used by this container.
Exceptions
Anyexception derived from std::exception including CvbException

◆ Create()

std::unique_ptr< GenDcDescriptor > Create ( const GenDcDescriptorConfig & descriptorConfig)
inlinestatic

Create a GenDC descriptor.

Parameters
[in]descriptorConfigConfiguration object specifying components and parts.
Returns
A pointer to the GenDC descriptor object.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ FromHandle()

std::unique_ptr< GenDcDescriptor > FromHandle ( HandleGuard< GenDcDescriptor > && guard)
inlinestatic

Creates a GenDC descriptor from a classic API handle.

Parameters
[in]guardLife time guard for C-API handle.
Returns
A pointer to the GenDC descriptor object.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ GetComponents() [1/2]

std::vector< GenDcComponent > & GetComponents ( )
inline

Return the component descriptors of this GenDC container.

Returns
Vector of component descriptors in this GenDC container.
Exceptions
Anyexception derived from std::exception including CvbException.
Note
This method is only supported for user-created GenDC Descriptors.

◆ GetComponents() [2/2]

const std::vector< GenDcComponent > & GetComponents ( ) const
inline

Return the component descriptors of this GenDC container.

Returns
Vector of component descriptors in this GenDC container.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ GetContainerId()

std::uint64_t GetContainerId ( ) const
inline

Return the identifier of GenDC container.

Returns
Container identifier. Strictly monotonically incrementing by 1 with each transmitted GenDC Container.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ GetDataOffset()

std::int64_t GetDataOffset ( ) const
inline

Return the offset of the GenDC data.

Returns
Offset in bytes of the start of the entire GenDC Container's data section relative to the start of the GenDC Container's Descriptor.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ GetDataSize()

std::uint64_t GetDataSize ( ) const
inline

Return the size of the GenDC data.

Returns
Maximum size of the entire GenDC Container's data section in bytes.
Exceptions
Anyexception derived from std::exception including CvbException.
Note
Does not include the size of the GenDC Container Descriptor.

◆ GetDescriptorSize()

std::uint32_t GetDescriptorSize ( ) const
inline

Return the size of the GenDC container descriptor.

Returns
Size of the Container Descriptor in bytes.
Exceptions
Anyexception derived from std::exception including CvbException.
Note
This represents the cumulative size of the GenDC Container Header, all the GenDC Component Headers and their GenDC Part Headers.

◆ GetFlags()

GenDcDescriptorFlag GetFlags ( ) const
inline

Return the flags of this GenDC container.

Returns
Flags specifying the characteristics and format of the GenDC container.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ GetHeaderSize()

std::uint32_t GetHeaderSize ( ) const
inline

Return the size of this GenDC container descriptor.

Returns
Size of the GenDC container header in bytes including the variable sized ComponentOffset array.
Exceptions
Anyexception derived from std::exception including CvbException.
Note
the GenDC Container's component headers are not included.

◆ GetSerializedSize()

std::size_t GetSerializedSize ( ) const
inline

Get the size in bytes of this GenDC descriptor when serialized.

Returns
Size in bytes of this GenDC descriptor in serialized form.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ GetVariableFields()

GenDcDescriptorVariableField GetVariableFields ( ) const
inline

Return the flags identifying the variable fields of this GenDC container.

Returns
Flags specifying which type of data information might vary during the GenDC Container reception
Exceptions
Anyexception derived from std::exception including CvbException.
Note
If any of these flags is set, the Container Descriptor is preliminary or prefetched and might change. An updated final Descriptor must be received before the Descriptor can be fully and definitively interpreted.

◆ GetVersion()

Version GetVersion ( ) const
inline

Return the GenDC descriptor standards version.

Returns
GenDC standards version of this GenDC descriptor.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Handle()

void * Handle ( ) const
inlinenoexcept

Return the Handle to the internal resource.

This function returns a pointer to the internal resource associated with the GenDC descriptor.

◆ Serialize() [1/2]

std::vector< std::uint8_t > Serialize ( ) const
inline

Serialize this GenDC descriptor into a new buffer.

Returns
: A buffer containing the serialized GenDC descriptor.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Serialize() [2/2]

void Serialize ( std::uint8_t * buffer,
std::size_t size ) const
inline

Serialize this GenDC descriptor into a provided buffer.

Parameters
[in]bufferA pointer to the beginning of a byte buffer to serialize into.
[in]sizeSize in bytes of the provided buffer.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ SetContainerId()

void SetContainerId ( std::uint64_t id)
inline

Set the identifier of GenDC container.

Parameters
[in]idContainer identifier. Strictly monotonically incrementing by 1 with each transmitted GenDC Container.
Exceptions
Anyexception derived from std::exception including CvbException.
Note
This method is only supported for user-created GenDC Descriptors.

◆ SetDataSize()

void SetDataSize ( std::uint32_t size)
inline

Set the size of the GenDC data.

Parameters
[in]sizeMaximum size of the entire GenDC Container's data section in bytes.
Exceptions
Anyexception derived from std::exception including CvbException.
Note
This method is only supported for user-created GenDC Descriptors.
Does not include the size of the GenDC Container Descriptor.

◆ SetFlags()

void SetFlags ( GenDcDescriptorFlag flags)
inline

Set the flags of this GenDC container.

Parameters
[in]flagsFlags specifying the characteristics and format of the GenDC container.
Exceptions
Anyexception derived from std::exception including CvbException.
Note
This method is only supported for user-created GenDC Descriptors.

◆ SetVariableFields()

void SetVariableFields ( GenDcDescriptorVariableField fields)
inline

Set the flags identifying the variable fields of this GenDC container.

Parameters
[in]fieldsFlags specifying which type of data information might vary during the GenDC Container reception
Exceptions
Anyexception derived from std::exception including CvbException.
Note
This method is only supported for user-created GenDC Descriptors.
If any of these flags is set, the Container Descriptor is preliminary or prefetched and might change. An updated final Descriptor must be received before the Descriptor can be fully and definitively interpreted.