ADTF
Loading...
Searching...
No Matches
adtf::base::cADTFRuntime Class Reference

#include <adtf_runtime.h>

Inherits adtf::ucom::catwo::object< ucom::cRuntime, IADTFRuntime, ucom::spider::IRuntimeStartup >.

Public Types

typedef ucom::catwo::object< ucom::cRuntime, IADTFRuntime, ucom::spider::IRuntimeStartupbase_type
 base type
 

Public Member Functions

 cADTFRuntime ()
 CTOR.
 
 cADTFRuntime (const adtf::util::cCommandLine &oCommandline)
 
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 CreateInstance (const char *strCID, ucom::ant::iobject_ptr< ucom::ant::IObject > &pObject, const char *strNameOfObject="") 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
 
bool StartupCompleted () const override
 
tResult Exec (int8_t i8FirstRunlevelToSet, std::function< void()> fnStartup)
 
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 adtf::ucom::catwo::object< ucom::cRuntime, IADTFRuntime, ucom::spider::IRuntimeStartup >
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
- Public Member Functions inherited from adtf::ucom::ant::IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 

Protected Member Functions

const char * GetRunLevelString (int8_t i8Runlevel) const override
 
- Protected Member Functions inherited from adtf::ucom::ant::IObject
 ~IObject ()=default
 Protected destructor --> Only the final implementation can be destroyed!
 

Detailed Description

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

Constructor & Destructor Documentation

◆ cADTFRuntime()

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

CTOR with commandline arguments

Parameters
[in]oCommandlinecommandline for some ptions

Member Function Documentation

◆ Exec() [1/2]

tResult adtf::base::cADTFRuntime::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]

tResult adtf::base::cADTFRuntime::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.

The documentation for this class was generated from the following file: