ADTF
Loading...
Searching...
No Matches
adtf::streaming::stream_meta_type_substreams Struct Reference

Use cSubStreamTypes to create a Stream Type instance for this Stream Meta Type. More...

#include <streammetatypesubstreams.h>

Public Member Functions

 stream_meta_type_substreams ()=default
 

Static Public Member Functions

static void SetProperties (const adtf::ucom::ant::iobject_ptr< adtf::base::ant::IProperties > &pProperties)
 
static tResult IsCompatible (const adtf::streaming::ant::IStreamType &oTypeToCheck, const adtf::streaming::ant::IStreamType &oTypeExpected)
 Compares the oTypeExpected Stream Type with the oTypeToCheck.
 
static bool HasSubStreams (const ant::IStreamType &oStreamType)
 
static void ListSubStreams (const ant::IStreamType &oStreamType, std::function< void(const char *)> fnCallback)
 
static void ListSubStreams (const ant::IStreamType &oStreamType, std::function< void(const char *, uint32_t)> fnCallback)
 
static void ListSubStreams (const ant::IStreamType &oStreamType, std::function< void(std::string_view strName, uint32_t nId, const ucom::ant::iobject_ptr< const ant::IStreamType > &pType)> fnCallback)
 
static uint32_t GetSubStreamId (const ant::IStreamType &oStreamType, const char *strSubStreamName)
 
static ucom::ant::object_ptr< const ant::IStreamTypeGetSubStreamType (const ant::IStreamType &oStreamType, const char *strSubStreamName)
 
static void GetRequestProperties (base::ant::IProperties &oProperties, const ant::IStreamType &oStreamType, const char *strSubStreamName="")
 

Static Public Attributes

static constexpr const char *const MetaTypeName = "adtf/substreams"
 The unique name of this meta type.
 
static constexpr const char *const SubStreams = "substreams"
 The name of the substreams property.
 
static constexpr const char *const SubStreamsRequestProperties = "substreams_request_properties"
 The name of the substreams request property.
 

Detailed Description

Use cSubStreamTypes to create a Stream Type instance for this Stream Meta Type.

This concept class for describing "adtf/substreams" Stream Types is not used for the genrator class. Use the cSubStreamTypes implemetation instead. Data Pipes using Substreams will use this type to identify each single sample which will belong to a specific substream and its sub type.

Constructor & Destructor Documentation

◆ stream_meta_type_substreams()

adtf::streaming::hollow::stream_meta_type_substreams::stream_meta_type_substreams ( )
default

Default CTOR.

Member Function Documentation

◆ GetRequestProperties()

static void adtf::streaming::hollow::stream_meta_type_substreams::GetRequestProperties ( base::ant::IProperties & oProperties,
const ant::IStreamType & oStreamType,
const char * strSubStreamName = "" )
static

Extracts the common or Substream specific request Properties.

Parameters
[out]oPropertiesThe request Properties will be added to this object.
[in]oStreamTypeThe Stream Type.
[in]strSubStreamNameThe name of the Substream. If empty the common request properties will be retrieved.

◆ GetSubStreamId()

static uint32_t adtf::streaming::hollow::stream_meta_type_substreams::GetSubStreamId ( const ant::IStreamType & oStreamType,
const char * strSubStreamName )
static

Returns the Substream id of a given Substream.

Parameters
[in]oStreamTypeThe Stream Type.
[in]strSubStreamNameThe name of the Substream.
Returns
The Substream id.
Exceptions
tResultin case that the id could not be retrieved.

◆ GetSubStreamType()

static ucom::ant::object_ptr< const ant::IStreamType > adtf::streaming::hollow::stream_meta_type_substreams::GetSubStreamType ( const ant::IStreamType & oStreamType,
const char * strSubStreamName )
static

Extracts the Stream Type of a specific Substream.

Parameters
[in]oStreamTypeThe Stream Type.
[in]strSubStreamNameThe name of the Substream.
Returns
The Stream Type.
Exceptions
tResultin case that Stream Type could not be retrieved.

◆ HasSubStreams()

static bool adtf::streaming::hollow::stream_meta_type_substreams::HasSubStreams ( const ant::IStreamType & oStreamType)
static
Parameters
[in]oStreamTypeThe Stream Type
Returns
True if the stream type has substreams

◆ IsCompatible()

static tResult adtf::streaming::hollow::stream_meta_type_substreams::IsCompatible ( const adtf::streaming::ant::IStreamType & oTypeToCheck,
const adtf::streaming::ant::IStreamType & oTypeExpected )
static

Compares the oTypeExpected Stream Type with the oTypeToCheck.

This implementation of IsCompatible will accept all other Meta Types and will return ERR_NOERROR only if:

  • Property SubStreams are equal
  • the all existing SubstreamName in oTypeExpected also exists in oTypeToCheck (Currently no the metatype of the Substream ist not checked)
Parameters
[in]oTypeToCheckThe incoming type to check.
[in]oTypeExpectedThe expected type which values are more significant.
Return values
ERR_NOERRORtypes are compatible

◆ ListSubStreams() [1/3]

static void adtf::streaming::hollow::stream_meta_type_substreams::ListSubStreams ( const ant::IStreamType & oStreamType,
std::function< void(const char *)> fnCallback )
static

List all available Substreams.

Parameters
[in]oStreamTypeThe Stream Type
[out]fnCallbackThis is called for each available Substream with the stream name.

◆ ListSubStreams() [2/3]

static void adtf::streaming::hollow::stream_meta_type_substreams::ListSubStreams ( const ant::IStreamType & oStreamType,
std::function< void(const char *, uint32_t)> fnCallback )
static

List all available Substreams.

Parameters
[in]oStreamTypeThe Stream Type
[out]fnCallbackThis is called for each available Substream with the stream name and id.

◆ ListSubStreams() [3/3]

static void adtf::streaming::hollow::stream_meta_type_substreams::ListSubStreams ( const ant::IStreamType & oStreamType,
std::function< void(std::string_view strName, uint32_t nId, const ucom::ant::iobject_ptr< const ant::IStreamType > &pType)> fnCallback )
static

List all available Substreams.

Parameters
[in]oStreamTypeThe Stream Type
[out]fnCallbackThis is called for each available Substream with the stream name, id and type (strName is null-terminated).

◆ SetProperties()

static void adtf::streaming::hollow::stream_meta_type_substreams::SetProperties ( const adtf::ucom::ant::iobject_ptr< adtf::base::ant::IProperties > & pProperties)
static

Sets the default properties to the given pProperties.

Parameters
pPropertiesThe properties where to set the default properties to

Member Data Documentation

◆ SubStreams

const char* const adtf::streaming::hollow::stream_meta_type_substreams::SubStreams = "substreams"
staticconstexpr

The name of the substreams property.

This Property determine if substreams are supported or not (true or false). Subproperties will identify the concreate Substream Type.

◆ SubStreamsRequestProperties

const char* const adtf::streaming::hollow::stream_meta_type_substreams::SubStreamsRequestProperties = "substreams_request_properties"
staticconstexpr

The name of the substreams request property.

This Property determine if substreams are requestable and currently requested.


The documentation for this struct was generated from the following file: