ADTF  3.18.2
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::catwo::object< ucom::ant::detail::cRuntime, IADTFRuntimebase_type
 base type
 

Public Member Functions

 cADTFRuntime ()
 CTOR.
 
 cADTFRuntime (const adtf::util::cCommandLine &oCommandline)
 CTOR with commandline arguments. More...
 
tResult SetRunLevel (int8_t i8RunlevelToChangeTo, bool bWait=true) override
 
int8_t GetRunLevel () const override
 
tResult SetMicroRunLevel (tADTFMicroRunLevel nRunlevelToChangeTo, bool bWait=true) override
 
tADTFMicroRunLevel GetMicroRunLevel () const override
 
tResult RegisterObject (const ucom::ant::iobject_ptr< ucom::ant::IObject > &pObject, const char *strNameOID, int8_t nRunLevel, uint32_t ui32Flags=0) override
 
tResult RegisterPlugin (const char *strUrl, int8_t nRunLevel, ucom::ant::iobject_ptr< ucom::ant::IPluginInfo > &pPluginInfo, uint32_t ui32Flags=0) 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)
 
tResult ExecMicro (tADTFMicroRunLevel nFirstMicroRunlevelToSet, std::function< void()> fnStartup, bool bContinueInCaseOfError)
 
- Public Member Functions inherited from object< ucom::ant::detail::cRuntime, IADTFRuntime >
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

const char * GetRunLevelString (int8_t i8Runlevel) const override
 
tResult ChangeRunLevel (int8_t i8RunLevelToChangeTo) override
 
bool StartedCompletedImplementation () const
 
- 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 54 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 (tADTFRunLevel).
[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.