Project

General

Profile

Actions

Support Request #11254

closed

Basic API questions about Sample Stream, Runner and getting the instance name

Added by hidden almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Customer:
AUDI
Department:
EF
Requester's Priority:
Normal
Support Level:
2nd Level
Resolution:
Solved Issue
Product Issue Numbers:
Affected Products:
Platform:
Topic:
ADTF::Common
FAQ Links:

Description

Supportanfrage

I have some question where I could not find concrete answers to them in the documentation.
May it would be a good change to extend a FAQ page from them.
Questions:

  1. What does a "sample stream" exactly do? which functionality does it have?
  2. Why will a runner input always be created for each input pin? can we disable this? what is its benefit when my filter is data driven?
  3. Is there a simple function to return a filter instance name (e.g. adtf2 OIGetInstanceName)?
    -- the GetName(base::ant::IString&& ) returns an error code, so I have to save the filter name as member variable

Lösung

What does a "sample stream" exactly do? which functionality does it have?

ADTF 3.x differs between Control Flow (Runner Pipe) and Streaming (Data Pipe).
The connection between two data pins to transport data (Samples) is a Sample Stream, which handles the data queue, so that reader could access the data, it is not the job of a filter to distribute and hold the data.
Please have a look here:

Note: There is a typo in the text -> The shown SampleStream is connected to 1 writer and 2 readers... as there are always only single inputs as restriction in any components in ADTF.

Why will a runner input always be created for each input pin? can we disable this? what is its benefit when my filter is data driven?

It is the visualization how things work regarding triggers, there is also possibilty to manipulate it.
But we are planning to hide these data triggers or better visualize the inner connection.
But the understanding is very important to differ, imagine you are having a mixed triggered filter and the guy who designs the session has to know the purpose and options given by the programer.

If you pass tTrue (which is the default) for bDataInTrigger in your CreateInputPin call, a Runner that calls the Process/ProcessInput Methods will be created for you and thus be shown within the CE. If you do not want to act on data triggers, just pass tFalse.
passing False, will not influence the reader in any way. Just to be sure: please keep it mind that you should not perform any long running operations in an external sample queue and must not forward or create any samples on outpus within your Push() implementation. That's what Runners are for!

If a filter should be data triggered or time triggered is fully dependent on the use case and cannot be answered globally.

Is there a simple function to return a filter instance name (e.g. adtf2 OIGetInstanceName)?
-- the GetName(base::ant::IString&& ) returns an error code, so I have to save the filter name as member variable

Only the Session Manager knows the instance name so he is your provider.
Please have a look here:

You have to use and get it by a property:

property_variable<cString> m_strName = "$(THIS_OBJECT_NAME)" 

Another convinience option to retrieve the full name of a graph object/Filter instance use the adtf::streaming::ant::get_named_graph_object_full_name() function: https://support.digitalwerk.net/adtf/v3/adtf_html/namespaceadtf_1_1streaming_1_1ant.html#ae0fe96ba02c9da6f7072f9447055c7a2

Please note, that both the Macro-Property and the get_named_graph_object_full_name() function will not work within the Constructor of your Filter, but in any function afterwards (i.e. Init())


Related issues

Related to Public Support - Support Request #11618: Receiving name of current filter instanceClosedActions
Actions #1

Updated by hidden almost 4 years ago

  • Status changed from New to Customer Feedback Required
  • Topic set to ADTF::Common
  • Customer set to AUDI
  • Department set to EF

Hi Samer,

What does a "sample stream" exactly do? which functionality does it have?

ADTF 3.x differs between Control Flow (Runner Pipe) and Streaming (Data Pipe).
The connection between two data pins to transport data (Samples) is a Sample Stream, which handles the data queue, so that reader could access the data, it is not the job of a filter to distribute and hold the data.
Please have a look here:

Note: There is a typo in the text -> The shown SampleStream is connected to 1 writer and 2 readers... as there are always only single inputs as restriction in any components in ADTF.

Why will a runner input always be created for each input pin? can we disable this? what is its benefit when my filter is data driven?

It is the visualization how things work regarding triggers, there is also possibilty to manipulate it.
But we are planning to hide these data triggers or better visualize the inner connection.
But the understanding is very important to differ, imagine you are having a mixed triggered filter and the guy who designs the session has to know the purpose and options given by the programer.

Is there a simple function to return a filter instance name (e.g. adtf2 OIGetInstanceName)?
-- the GetName(base::ant::IString&& ) returns an error code, so I have to save the filter name as member variable

Only the Session Manager knows the instance name so he is your provider.
Please have a look here:

You have to use and get it by a property:

property_variable<cString> m_strName = "$(THIS_OBJECT_NAME)" 

Does this help your understanding ?

Please let us know what is missing in documentation.
Please have in mind we are working on a big picture overview how things happen.
If you have any recomendations, don't hesitate to contact us.

Actions #2

Updated by hidden almost 4 years ago

Hi Samer,

additionally to the remarks of Florian:

to retrieve the full name of a graph object/Filter instance use the adtf::streaming::ant::get_named_graph_object_full_name() function: https://support.digitalwerk.net/adtf/v3/adtf_html/namespaceadtf_1_1streaming_1_1ant.html#ae0fe96ba02c9da6f7072f9447055c7a2

Please note, that both the Macro-Property and the get_named_graph_object_full_name() function will not work within the Constructor of your Filter, but in any function afterwards (i.e. Init())

Why will a runner input always be created for each input pin? can we disable this? what is its benefit when my filter is data driven?

If you pass tTrue (which is the default) for bDataInTrigger in your CreateInputPin call, a Runner that calls the Process/ProcessInput Methods will be created for you and thus be shown within the CE. If you do not want to act on data triggers, just pass tFalse.

If a filter should be data triggered or time triggered is fully dependent on the use case and cannot be answered globally.

Actions #3

Updated by hidden almost 4 years ago

Thank you both for the answers!

If you pass tTrue (which is the default) for bDataInTrigger in your CreateInputPin call, a Runner that calls the Process/ProcessInput Methods will be created for you and thus be shown within the CE. If you do not want to act on data triggers, just pass tFalse.

@Martin: if I passed false, will this affect the events for a listener (e.g. external sample queue on the same input reader)?

Actions #4

Updated by hidden almost 4 years ago

  • Status changed from Customer Feedback Required to In Progress
Actions #5

Updated by hidden almost 4 years ago

No, passing False, will not influence the reader in any way. Just to be sure: please keep it mind that you should not perform any long running operations in an external sample queue and must not forward or create any samples on outpus within your Push() implementation. That's what Runners are for!

Actions #6

Updated by hidden almost 4 years ago

  • Subject changed from Some General Questions For Understanding to Basic API questions about Sample Stream, Runner and getting the instance name
  • Description updated (diff)
  • Status changed from In Progress to To Be Closed
  • Private changed from Yes to No
  • Resolution set to Solved Issue
  • Project changed from 11 to Public Support
Actions #7

Updated by hidden almost 4 years ago

Thanks for the helpful info!
The ticket can be closed

Actions #8

Updated by hidden over 3 years ago

Actions #11

Updated by hidden over 3 years ago

  • Status changed from To Be Closed to Closed
Actions

Also available in: Atom PDF