ADTF  3.18.2
stream_meta_type_substreams

Use cSubStreamTypes to create a Stream Type instance for this Stream Meta Type - see also Substreams. More...

Public Member Functions

 stream_meta_type_substreams ()=default
 Default CTOR.
 

Static Public Member Functions

static void SetProperties (const adtf::ucom::ant::iobject_ptr< adtf::base::ant::IProperties > &pProperties)
 Sets the default properties to the given pProperties. More...
 
static tResult IsCompatible (const adtf::streaming::ant::IStreamType &oTypeToCheck, const adtf::streaming::ant::IStreamType &oTypeExpected)
 Compares the oTypeExpected Stream Type with the oTypeToCheck - see Default Stream Meta Types in ADTF for a summary of implementations. More...
 
static bool HasSubStreams (const ant::IStreamType &oStreamType)
 
static void ListSubStreams (const ant::IStreamType &oStreamType, std::function< void(const char *)> fnCallback)
 List all available Substreams. More...
 
static void ListSubStreams (const ant::IStreamType &oStreamType, std::function< void(const char *, uint32_t)> fnCallback)
 List all available Substreams. More...
 
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)
 List all available Substreams. More...
 
static uint32_t GetSubStreamId (const ant::IStreamType &oStreamType, const char *strSubStreamName)
 Returns the Substream id of a given Substream. More...
 
static ucom::ant::object_ptr< const ant::IStreamTypeGetSubStreamType (const ant::IStreamType &oStreamType, const char *strSubStreamName)
 Extracts the Stream Type of a specific Substream. More...
 
static void GetRequestProperties (base::ant::IProperties &oProperties, const ant::IStreamType &oStreamType, const char *strSubStreamName="")
 Extracts the common or Substream specific request Properties. More...
 

Static Public Attributes

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

Detailed Description

Use cSubStreamTypes to create a Stream Type instance for this Stream Meta Type - see also Substreams.

This concept class for describing "adtf/substreams" Stream Types is not used for the genrator class Stream Meta Type. 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. Have a look at Substreams.

Definition at line 31 of file streammetatypesubstreams.h.

Member Function Documentation

◆ GetRequestProperties()

static void 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 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> 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 HasSubStreams ( const ant::IStreamType oStreamType)
static
Parameters
[in]oStreamTypeThe Stream Type
Returns
True if the stream type has substreams

◆ IsCompatible()

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

Compares the oTypeExpected Stream Type with the oTypeToCheck - see Default Stream Meta Types in ADTF for a summary of implementations.

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)
Remarks
For a complete definition of the delivered default types and the information of which Stream Type is compatible to another one then see Default Stream Meta Types in ADTF.
Parameters
[in]oTypeToCheckThe incoming type to check.
[in]oTypeExpectedThe expected type which values are more significant.
Return values
ERR_NOERRORtypes are compatible
See also
Default Stream Meta Types in ADTF, AcceptType and IsCompatible implementations.

◆ ListSubStreams() [1/3]

static void 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 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 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 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

constexpr const tChar* const 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.

Definition at line 45 of file streammetatypesubstreams.h.

◆ SubStreamsRequestProperties

constexpr const tChar* const SubStreamsRequestProperties = "substreams_request_properties"
staticconstexpr

The name of the substreams request property.

This Property determine if substreams are requestable and currently requested.

Definition at line 50 of file streammetatypesubstreams.h.