ADTF  3.14.3
cADTFRuntime

Definition of the Basic ADTF Runtime the Launcher will be used to create an ADTF System. More...

Inheritance diagram for cADTFRuntime:
[legend]

Public Types

typedef ucom::ant::runtime< tADTFRunLevel::RL_Max > base_type
 base type
 

Public Member Functions

 cADTFRuntime ()
 CTOR.
 
 cADTFRuntime (const adtf::util::cCommandLine &oCommandline)
 CTOR with commandline arguments. More...
 
const char * GetRunLevelString (int8_t i8Runlevel) const override
 Get the runlevel description by runlevel. More...
 
tResult SetRunLevel (int8_t i8RunlevelToChangeTo, bool bWait=true) override
 
tResult Exec (int8_t i8FirstRunlevelToSet, std::function< void()> fnStartup)
 Launches the system and create a adtf::base::ant::cADTFRuntime. More...
 
tResult Exec (int8_t i8FirstRunlevelToSet, std::function< void()> fnStartup, bool bContinueInCaseOfError)
 
tResult Exec (int8_t i8FirstRunlevelToSet)
 
- Public Member Functions inherited from runtime< LAST_RUN_LEVEL >
 runtime ()
 CTOR.
 
 runtime (const adtf::util::cCommandLine &oCommandline)
 CTOR. More...
 
- Public Member Functions inherited from cRuntime
tResult Exec (int8_t i8FirstRunlevelToChange, std::function< void()> fnStartup)
 
tResult SetRunLevel (int8_t i8RunlevelToChangeTo, bool bWait=true) override
 
int8_t GetRunLevel () const override
 Get current run level. More...
 
tResult RegisterObject (const iobject_ptr< IObject > &pObject, const char *strNameOID, int8_t nRunLevel, uint32_t ui32Flags=0) override
 
tResult UnregisterObject (const iobject_ptr< IObject > &pObject, const tChar *strNameOID="") override
 
tResult GetObjects (iobject_enum< IObject > &lstOfObjects) const override
 Implements the IRuntime::GetObjects. More...
 
tResult RegisterPlugin (const char *strUrl, int8_t nRunLevel, iobject_ptr< IPluginInfo > &pPluginInfo, uint32_t ui32Flags=0) override
 
tResult UnregisterPlugin (const iobject_ptr< IPluginInfo > &pPluginInfo, uint32_t ui32Flags=0) override
 
tResult UnregisterAllPlugins (int8_t nRunLevel, uint32_t ui32Flags=0) override
 
tResult GetPlugins (iobject_enum< const IPluginInfo > &lstPluginInfos) const override
 
tResult RegisterClassFactory (const iobject_ptr< const IClassFactory > &pClassFactory, uint32_t ui32Flags=0) override
 
tResult UnregisterClassFactory (const iobject_ptr< const IClassFactory > &pClassFactory) override
 
tResult GetClasses (iobject_enum< const IClassInfo > &lstOfClasses) const override
 
tResult GetClassFactories (iobject_enum< const IClassFactory > &lstOfClasses) const override
 
tResult RegisterHook (IRuntimeHook &pHook) override
 Register a Hook.
 
tResult UnregisterHook (IRuntimeHook &pHook) override
 Unregister a Hook.
 
tResult GetObject (iobject_ptr< IObject > &pObject, const char *strNameOID) const override
 
tResult GetObject (iobject_ptr< IObject > &pObject) const override
 
tResult CreateInstance (const char *strCID, iobject_ptr< IObject > &oObject, const tChar *strNameOfObject="") const override
 
- Public Member Functions inherited from object< IRuntime >
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object. More...
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying. More...
 
void Destroy () const override
 Destruct and deallocate instantiations of type IObject. More...
 
- Public Member Functions inherited from IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 Marks the IObject to be castable with the ucom_cast() More...
 

Protected Member Functions

tResult ChangeRunLevel (int8_t i8RunLevelToChangeTo) override
 
- Protected Member Functions inherited from IObject
 ~IObject ()=default
 Protected destructor --> Use implemented Destroy() instead of delete!
 

Private Member Functions

 A_UTILS_D (cADTFRuntime)
 

Detailed Description

Definition of the Basic ADTF Runtime the Launcher will be used to create an ADTF System.

See System Definition to understand runlevels of ADTF.

Definition at line 83 of file adtf_runtime.h.

Constructor & Destructor Documentation

◆ cADTFRuntime()

cADTFRuntime ( const adtf::util::cCommandLine &  oCommandline)

CTOR with commandline arguments.

Parameters
[in]oCommandlinecommandline for some ptions

Member Function Documentation

◆ Exec() [1/2]

tResult Exec ( int8_t  i8FirstRunlevelToSet,
std::function< void()>  fnStartup 
)

Launches the system and create a adtf::base::ant::cADTFRuntime.

The System main loop is executed until the runlevel RL_Shutdown is set.

If a IApplication is registered while reaching nFirstRunLevel the blocking Exec call is forwarded to the IApplication::Exec. If the runlevel change to i8FirstRunlevelToSet fails, the function returns. The main loop will not be executed.

Parameters
[in]i8FirstRunlevelToSetFirst run level to reach to startup.
[in]fnStartupStartup function which will be called after main loop is started.
Returns
Standard Result Code
See also
adtf::base::ant::cADTFRuntime.

◆ Exec() [2/2]

Exec ( int8_t  i8FirstRunlevelToSet,
std::function< void()>  fnStartup,
bool  bContinueInCaseOfError 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Remarks
If bContinueInCaseOfError is set and an error occurred in runlevel RLSession or above then keep running at one runlevel below the erroneous one. Otherwise return as mentioned above.
Parameters
[in]bContinueInCaseOfErrorIn case of an error, continue running at one level below the runlevel where the error occurred.

◆ GetRunLevelString()

const char* GetRunLevelString ( int8_t  i8Runlevel) const
inlineoverridevirtual

Get the runlevel description by runlevel.

Parameters
i8Runlevel[in] runlevel teh description is for.
Returns
The string of the runlevel description.
Return values
Emptynull-terminated string if runlevel can not be mapped.

Reimplemented from runtime< LAST_RUN_LEVEL >.

Definition at line 97 of file adtf_runtime.h.

References tADTFRunLevelDescription::GetDescription().


Copyright © Audi Electronics Venture GmbH. All rights reserved. (Generated on Thu Jun 9 2022 by doxygen 1.9.1)