ADTF
Loading...
Searching...
No Matches
adtf::system::cADTFSystem Class Referencefinal

#include <adtf_system.h>

Public Member Functions

 cADTFSystem ()
 CTOR.
 
 ~cADTFSystem ()
 DTOR.
 
void EnableSessionManagerCreation (bool bEnable=true)
 
void EnableLogging (bool bEnable=true)
 
void EnableRPCObjectRegistry (bool bEnable=true)
 
void EnableMacroResolver (bool bEnable=true)
 
void EnableProfiler (bool bEnable=true, unsigned int nPort=28077, const char *strDumpFile=nullptr)
 
void EnableSampleStreamTracer (bool bEnable=true)
 
void EnableAutoQuit (bool bEnable=true, base::tADTFRunLevel eLevel=base::tADTFRunLevel::RL_Running)
 
void SetSessionManagerCID (const util::cString &strSessionManagerCID)
 
void SetADTFDIR (const util::cFilename &strADTFDIR)
 
void SetADTFCorePlugin (const util::cFilename &strCorePluginPath)
 
void SetLoggingParameter (unsigned int nStdOutLogLevel, unsigned int nStdErrLogLevel, unsigned int nDebugLogLevel, tTimeStamp tmQueueProcessingInterval)
 
void SetLoggingParameter (unsigned int nStdOutMinLogLevel, unsigned int nStdOutMaxLogLevel, unsigned int nStdErrMinLogLevel, unsigned int nStdErrMaxLogLevel, unsigned int nDebugMinLogLevel, unsigned int nDebugMaxLogLevel, tTimeStamp tmQueueProcessingInterval)
 
void SetAdditionalInitFunction (std::function< tResult()> fnInitFunction)
 
void SetRPCURL (const util::cString &strRPCUrl)
 
tResult Launch (adtf::ucom::ant::IRuntime &oRuntime)
 
tResult Launch (const adtf::util::cCommandLine &oCommandLine)
 
tResult Exec (int8_t nFirstRunLevel, const adtf::util::cCommandLine &oCommandLine, std::function< void()> fnStartup)
 
tResult Exec (int8_t nFirstRunLevel, const adtf::util::cCommandLine &oCommandLine, std::function< void()> fnStartup, bool bContinueInCaseOfError)
 
tResult ExecMicro (adtf::base::quiet::IADTFRuntime::tADTFMicroRunLevel nFirstMicroRunLevel, const adtf::util::cCommandLine &oCommandLine, std::function< void()> fnStartup, bool bContinueInCaseOfError)
 

Protected Member Functions

 cADTFSystem (const cADTFSystem &)=delete
 pimpl
 
 cADTFSystem (cADTFSystem &&)=delete
 move CTOR
 
cADTFSystemoperator= (const cADTFSystem &)=delete
 copy operator
 
cADTFSystemoperator= (cADTFSystem &&)=delete
 move operator
 

Detailed Description

ADTF System Creation Class

Constructor & Destructor Documentation

◆ cADTFSystem()

adtf::system::ant::cADTFSystem::cADTFSystem ( const cADTFSystem & )
protecteddelete

pimpl

copy CTOR

Member Function Documentation

◆ EnableAutoQuit()

void adtf::system::ant::cADTFSystem::EnableAutoQuit ( bool bEnable = true,
base::tADTFRunLevel eLevel = base::tADTFRunLevel::RL_Running )

Enables to shutdown automatically if the given runlevel is left by decrementing.

Per default the AutoQuit is disabled.

Parameters
[in]bEnableenable or disable.
[in]eLevellevel of auto quit.

◆ EnableLogging()

void adtf::system::ant::cADTFSystem::EnableLogging ( bool bEnable = true)

Enables the logging core object creation.

Per default the creation is disabled.

Parameters
[in]bEnableenable or disable.
See also
adtf::services::ant::ILogging, SetLoggingParameter.

◆ EnableMacroResolver()

void adtf::system::ant::cADTFSystem::EnableMacroResolver ( bool bEnable = true)

Enables macro resolver core object creation.

Per default the creation is disabled.

Parameters
[in]bEnableenable or disable.
See also
adtf::services::IMacroResolver.

◆ EnableProfiler()

void adtf::system::ant::cADTFSystem::EnableProfiler ( bool bEnable = true,
unsigned int nPort = 28077,
const char * strDumpFile = nullptr )

Enables the profiler.

Parameters
[in]bEnableenable or disable.
[in]nPortThe listening port that the GUI can connect on, 0 = disable remote profiling.
[in]strDumpFileIf set, profiling will be enabled right from the start and profiling data will be dumped to the given file during shutdown.

◆ EnableRPCObjectRegistry()

void adtf::system::ant::cADTFSystem::EnableRPCObjectRegistry ( bool bEnable = true)

Enables the rpc object registry core object creation.

Per default the creation is disabled. Per default the URL ADTF_REMOTE_DEFAULT_HOST_URL is used.

Parameters
[in]bEnableenable or disable.
See also
adtf::services::ant::IRPCObjectServerRegistry, SetRPCURL.

◆ EnableSampleStreamTracer()

void adtf::system::ant::cADTFSystem::EnableSampleStreamTracer ( bool bEnable = true)

Enables the sample stream tracer core object creation.

Per default the creation is disabled.

Parameters
[in]bEnableenable or disable.
See also
adtf::services::bat::ISampleStreamTracer.

◆ EnableSessionManagerCreation()

void adtf::system::ant::cADTFSystem::EnableSessionManagerCreation ( bool bEnable = true)

Enables the session manager core object creation.

Per default the creation is disabled. Per default the CID used to create is CID_ADTF_SESSION_MANAGER.

Parameters
[in]bEnableenable or disable.
See also
adtf::services::ant::ISessionManager, SetSessionManagerCID.

◆ Exec()

tResult adtf::system::ant::cADTFSystem::Exec ( int8_t nFirstRunLevel,
const adtf::util::cCommandLine & oCommandLine,
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 nFirstRunLevel fails, the function returns. The main loop will not be executed.

Parameters
[in]nFirstRunLevelFirst run level to reach to startup.
[in]oCommandLineCommandline passed to the created cADTFRuntime.
[in]fnStartupStartup function which will be called after main loop is started.
Returns
Standard Result Code
Return values
ERR_INVALID_STATEa runtime is already created within singleton _runtime
See also
adtf::base::ant::cADTFRuntime.

◆ ExecMicro()

tResult adtf::system::ant::cADTFSystem::ExecMicro ( adtf::base::quiet::IADTFRuntime::tADTFMicroRunLevel nFirstMicroRunLevel,
const adtf::util::cCommandLine & oCommandLine,
std::function< void()> fnStartup,
bool bContinueInCaseOfError )

Remarks
nFirstMicroRunLevel specifies the initial runlevel as a micro runlevel.
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.

◆ Launch() [1/2]

tResult adtf::system::ant::cADTFSystem::Launch ( adtf::ucom::ant::IRuntime & oRuntime)

Launches the system and its core objects to an existing runtime.

Parameters
[in]oRuntimeruntime to lnch the core objects to.
Returns
Standard Result Code

◆ Launch() [2/2]

tResult adtf::system::ant::cADTFSystem::Launch ( const adtf::util::cCommandLine & oCommandLine)

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

Parameters
[in]oCommandLineCommandline passed to the created cADTFRuntime.
Returns
Standard Result Code
Return values
ERR_INVALID_STATEa runtime is already created within singleton _runtime
See also
adtf::base::cADTFRuntime.

◆ SetAdditionalInitFunction()

void adtf::system::ant::cADTFSystem::SetAdditionalInitFunction ( std::function< tResult()> fnInitFunction)

Adds an additional Initialization function that is called right atfer the logging has been set up.

Parameters
[in]fnInitFunctionThe additional init function.

◆ SetADTFCorePlugin()

void adtf::system::ant::cADTFSystem::SetADTFCorePlugin ( const util::cFilename & strCorePluginPath)

Sets the path to the adtf_core.plugin which contains the the core objects implementations. These core objects are essentials to define the ADTF System.

Parameters
[in]strCorePluginPathPath to the core plugin

◆ SetADTFDIR()

void adtf::system::ant::cADTFSystem::SetADTFDIR ( const util::cFilename & strADTFDIR)

Sets the environment variable ADTF_DIR.

Parameters
[in]strADTFDIRADTF_DIR variable

◆ SetLoggingParameter() [1/2]

void adtf::system::ant::cADTFSystem::SetLoggingParameter ( unsigned int nStdOutLogLevel,
unsigned int nStdErrLogLevel,
unsigned int nDebugLogLevel,
tTimeStamp tmQueueProcessingInterval )

Sets the logging parameter of the Logging serive These core objects define the ADTF System.

Parameters
[in]nStdOutLogLevelLogLevel for the stdout. (see tLogLevel).
[in]nStdErrLogLevelLogLevel for the stderr. (see tLogLevel).
[in]nDebugLogLevelLogLevel for the OutputDebugString withing Visual Studio. (see tLogLevel).
[in]tmQueueProcessingIntervalInterval for asynchronously logging outputs. by default it is set to 0 (synchronously enabled)
See also
adtf::services::ant::ILogging, EnableLogging.

◆ SetLoggingParameter() [2/2]

void adtf::system::ant::cADTFSystem::SetLoggingParameter ( unsigned int nStdOutMinLogLevel,
unsigned int nStdOutMaxLogLevel,
unsigned int nStdErrMinLogLevel,
unsigned int nStdErrMaxLogLevel,
unsigned int nDebugMinLogLevel,
unsigned int nDebugMaxLogLevel,
tTimeStamp tmQueueProcessingInterval )

Sets the log levels that are output via a specific channel

Parameters
[in]nStdOutMinLogLevelMinimum LogLevel for the stdout. (see tLogLevel).
[in]nStdOutMaxLogLevelMaximum LogLevel for the stdout. (see tLogLevel).
[in]nStdErrMinLogLevelMinimum LogLevel for the stderr. (see tLogLevel).
[in]nStdErrMaxLogLevelMaximum LogLevel for the stderr. (see tLogLevel).
[in]nDebugMinLogLevelMinimum LogLevel for the OutputDebugString withing Visual Studio. (see tLogLevel).
[in]nDebugMaxLogLevelMaximum LogLevel for the OutputDebugString withing Visual Studio. (see tLogLevel).
[in]tmQueueProcessingIntervalInterval for asynchronously logging outputs. by default it is set to 0 (synchronously enabled)
See also
adtf::services::ant::ILogging, EnableLogging.

◆ SetRPCURL()

void adtf::system::ant::cADTFSystem::SetRPCURL ( const util::cString & strRPCUrl)

Sets the URL for the rpc object registry core object.

Per default the URL ADTF_REMOTE_DEFAULT_HOST_URL is used.

Parameters
[in]strRPCUrlURL to set.
See also
adtf::services::ant::IRPCObjectServerRegistry, EnableRPCObjectRegistry.

◆ SetSessionManagerCID()

void adtf::system::ant::cADTFSystem::SetSessionManagerCID ( const util::cString & strSessionManagerCID)

Sets the class id used for creation of the session manager core object (EnableSessionManagerCreation).

Per default the class id is set to CID_ADTF_SESSION_MANAGER.

Parameters
[in]strSessionManagerCIDClass id of the session manager to create.
See also
adtf::services::ant::ISessionManager, EnableSessionManagerCreation.

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