17 #ifndef ADTF_TESTING_ADTF_DIR
18 #define ADTF_TESTING_ADTF_DIR ""
21 #ifndef ADTF_TESTING_PLUGIN_DIRECTORIES
22 #define ADTF_TESTING_PLUGIN_DIRECTORIES ""
25 #ifndef ADTF_TESTING_SOURCE_DIR
26 #define ADTF_TESTING_SOURCE_DIR ""
78 const std::vector<std::string>& oPlugins = {},
79 bool bCreateSessionManager =
false,
80 const std::string& strAdtfDirectory = ADTF_TESTING_ADTF_DIR,
81 const std::string& strPluginDirectories = ADTF_TESTING_PLUGIN_DIRECTORIES);
93 const std::vector<std::string>& oPlugins,
94 bool bCreateSessionManager,
95 bool bCreateLoggingService,
96 const std::string& strAdtfDirectory = ADTF_TESTING_ADTF_DIR,
97 const std::string& strPluginDirectories = ADTF_TESTING_PLUGIN_DIRECTORIES);
109 const std::string& strTestSourceDirectory = ADTF_TESTING_SOURCE_DIR);
116 static void SetMacro(
const std::string& strName,
const std::string& strValue);
139 bool bCreateServices =
true,
151 const std::string& strObjectId,
165 const std::string& strClassId,
166 const std::string& strObjectId,
179 const std::string& strObjectId,
181 const std::map<std::string, std::string>& oProperties);
195 const std::string& strClassId,
196 const std::string& strObjectId,
198 const std::map<std::string, std::string>& oProperties);
201 class cImplementation;
202 std::unique_ptr<cImplementation> m_pImplementation;
253 const std::string& strAdtfDirectory = ADTF_TESTING_ADTF_DIR,
254 const std::string& strPluginDirectories = ADTF_TESTING_PLUGIN_DIRECTORIES);
264 bool bCreateLoggingService,
265 const std::string& strAdtfDirectory = ADTF_TESTING_ADTF_DIR,
266 const std::string& strPluginDirectories = ADTF_TESTING_PLUGIN_DIRECTORIES);
303 void Exec(int8_t nInitialRunlevel, std::function<
void()> fnStartup);
312 void ExecTest(int8_t nInitialRunlevel, std::function<
void()> fnTest);
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
This class allows you to create a test system based on an ADTF session.
ucom::ant::object_ptr< services::ant::ISession > GetSession()
ucom::ant::object_ptr< streaming::ant::IStreamingGraph > GetStreamingGraph()
void Exec(std::chrono::microseconds tmTimeout)
Executes a session for a given amount of time.
void ExecTest(int8_t nInitialRunlevel, std::function< void()> fnTest)
Execute a session, call a test function and shutdown the session afterwards.
ucom::ant::object_ptr< streaming::ant::IFilterGraph > GetFilterGraph()
void CreateSession(const std::string &strFileName)
Load and create a session.
void Exec(int8_t nInitialRunlevel, std::function< void()> fnStartup)
Executes a session and call the a callback function when ready.
void SetEnvironmentFile(const std::string &strFileName)
Set the adtfenvironment.
cSessionTestSystem(const std::string &strUrl, bool bCreateLoggingService, const std::string &strAdtfDirectory=ADTF_TESTING_ADTF_DIR, const std::string &strPluginDirectories=ADTF_TESTING_PLUGIN_DIRECTORIES)
Constructs a test system.
ucom::ant::object_ptr< streaming::ant::INamedGraphObject > GetGraphObject(const std::string &name)
Retrieve a graph object from the streaming/filter graph.
cSessionTestSystem(const std::string &strUrl="", const std::string &strAdtfDirectory=ADTF_TESTING_ADTF_DIR, const std::string &strPluginDirectories=ADTF_TESTING_PLUGIN_DIRECTORIES)
Constructs a test system.
This class enables you to setup an ADTF system where you can test your filters and services.
void LoadPlugin(const std::string &strPluginFileName, bool bCreateServices=true, base::ant::tADTFRunLevel nServicesRunlevel=base::tADTFRunLevel::RL_System)
Load a plugin and optionally create instances of all found ADTF Service classes.
base::ant::tADTFRunLevel GetRunLevel() const
Helper function that returns the current runlevel.
ucom::ant::object_ptr< ucom::ant::IService > CreateService(const std::string &strClassId, const std::string &strObjectId, base::ant::tADTFRunLevel nRunlevel=base::tADTFRunLevel::RL_System)
Create a service instance.
static void SetMacro(const std::string &strName, const std::string &strValue)
Set a macro value.
void SetRunLevel(base::ant::tADTFRunLevel eRunlevel)
Helper function that changes the runlevel and throws errors via an exception.
cTestSystem(const std::string &strUrl="", const std::vector< std::string > &oPlugins={}, bool bCreateSessionManager=false, const std::string &strAdtfDirectory=ADTF_TESTING_ADTF_DIR, const std::string &strPluginDirectories=ADTF_TESTING_PLUGIN_DIRECTORIES)
Constructs a test system.
ucom::ant::object_ptr< ucom::ant::IService > CreateService(const std::string &strClassId, const std::string &strObjectId, base::ant::tADTFRunLevel nRunlevel, const std::map< std::string, std::string > &oProperties)
Create a service instance with properties.
~cTestSystem()
Destructor.
static void SetCurDirectory(const std::string &strRelativePath, const std::string &strTestSourceDirectory=ADTF_TESTING_SOURCE_DIR)
Helper function to change the current working directory relative to the source directory.
ucom::ant::object_ptr< ucom::ant::IService > CreateService(const std::string &strPluginFileName, const std::string &strClassId, const std::string &strObjectId, base::ant::tADTFRunLevel nRunlevel, const std::map< std::string, std::string > &oProperties)
Load a plugin and create a service instance with properties.
cTestSystem(const std::string &strUrl, const std::vector< std::string > &oPlugins, bool bCreateSessionManager, bool bCreateLoggingService, const std::string &strAdtfDirectory=ADTF_TESTING_ADTF_DIR, const std::string &strPluginDirectories=ADTF_TESTING_PLUGIN_DIRECTORIES)
Constructs a test system.
ucom::ant::object_ptr< ucom::ant::IService > CreateService(const std::string &strPluginFileName, const std::string &strClassId, const std::string &strObjectId, base::ant::tADTFRunLevel nRunlevel=base::tADTFRunLevel::RL_System)
Loads a plugin and creates a service instance.
Object pointer implementation used for reference counting on objects of type IObject.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
std::chrono::microseconds microseconds
Compatibility to C++11 std::chrono::microseconds
tADTFRunLevel
The ADTF Runtime Level State are used to define a ADTF Runtime specialization for a adtf::ucom::ant::...
Namespace for entire ADTF SDK.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.