ADTF  3.18.2
cRuntimeabstract

The class cRuntime builds the standard implementation of the uCOM runtime environment. More...

Inheritance diagram for cRuntime:
[legend]

Public Member Functions

 cRuntime (int8_t nLastRunlevel)
 
 cRuntime (int8_t nLastRunlevel, const adtf::util::cCommandLine &oCommandline)
 CTOR. More...
 
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

virtual ~cRuntime ()
 DTOR.
 
virtual const char * GetRunLevelString (int8_t i8Runlevel) const =0
 Logging Hook to retrieve logging message for the desired runtime changes. More...
 
virtual tResult ChangeRunLevel (int8_t i8RunLevelToChangeTo)
 
tResult CallRuntimeHooks (int nHookId, uint32_t ui32Param1=0, uint32_t ui32Param2=0, void *pvData=NULL, int szData=0, const iobject_ptr< IObject > &pObject=object_ptr< IObject >())
 
tResult NotifyAllObjects (int nEventId, uint32_t ui32Param1=0, uint32_t ui32Param2=0, void *pvData=NULL, int szData=0, bool bBackwards=false)
 
void SetEventFilter (std::function< tResult(int, uint32_t, uint32_t, void *, int, const iobject_ptr< IObject > &)> fnHookFilter, std::function< tResult(int, uint32_t, uint32_t, void *, int, bool)> fnEventFilter)
 
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 (cRuntime)
 dptr impl
 

Detailed Description

The class cRuntime builds the standard implementation of the uCOM runtime environment.

Definition at line 72 of file runtime.h.

Constructor & Destructor Documentation

◆ cRuntime()

cRuntime ( int8_t  nLastRunlevel,
const adtf::util::cCommandLine &  oCommandline 
)

CTOR.

Parameters
[in]nLastRunlevelhighest runlevel can be reached
[in]oCommandlineCommandline of the application instantiated the runtime

Member Function Documentation

◆ GetObjects()

tResult GetObjects ( iobject_enum< IObject > &  lstOfObjects) const
override

Implements the IRuntime::GetObjects.

Parameters
[out]lstOfObjectspointer to a iobject_enum where to push the objects
Returns

◆ GetRunLevel()

int8_t GetRunLevel ( ) const
override

Get current run level.

The GetRunLevel method returns the current run level.

Returns
Returns the current run level.
Note
rtsafe

◆ GetRunLevelString()

virtual const char* GetRunLevelString ( int8_t  i8Runlevel) const
protectedpure virtual

Logging Hook to retrieve logging message for the desired runtime changes.

Parameters
i8Runlevel[in] Runlevel the logging want a readable name for
Returns
The readable name for the runlevel

Implemented in runtime< LAST_RUN_LEVEL >, and runtime< tTestRL::RL_Running >.