|
ADTF
|
#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 & | operator= (const cADTFSystem &)=delete |
| copy operator | |
| cADTFSystem (cADTFSystem &&)=delete | |
| move CTOR | |
| cADTFSystem & | operator= (cADTFSystem &&)=delete |
| move operator | |
ADTF System Creation Class
|
protecteddelete |
pimpl
copy CTOR
| 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.
| [in] | bEnable | enable or disable. |
| [in] | eLevel | level of auto quit. |
| void adtf::system::ant::cADTFSystem::EnableLogging | ( | bool | bEnable = true | ) |
Enables the logging core object creation.
Per default the creation is disabled.
| [in] | bEnable | enable or disable. |
| void adtf::system::ant::cADTFSystem::EnableMacroResolver | ( | bool | bEnable = true | ) |
Enables macro resolver core object creation.
Per default the creation is disabled.
| [in] | bEnable | enable or disable. |
| void adtf::system::ant::cADTFSystem::EnableProfiler | ( | bool | bEnable = true, |
| unsigned int | nPort = 28077, | ||
| const char * | strDumpFile = nullptr ) |
Enables the profiler.
| [in] | bEnable | enable or disable. |
| [in] | nPort | The listening port that the GUI can connect on, 0 = disable remote profiling. |
| [in] | strDumpFile | If set, profiling will be enabled right from the start and profiling data will be dumped to the given file during shutdown. |
| 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.
| [in] | bEnable | enable or disable. |
| void adtf::system::ant::cADTFSystem::EnableSampleStreamTracer | ( | bool | bEnable = true | ) |
Enables the sample stream tracer core object creation.
Per default the creation is disabled.
| [in] | bEnable | enable or disable. |
| 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.
| [in] | bEnable | enable or disable. |
| 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.
| [in] | nFirstRunLevel | First run level to reach to startup. |
| [in] | oCommandLine | Commandline passed to the created cADTFRuntime. |
| [in] | fnStartup | Startup function which will be called after main loop is started. |
| ERR_INVALID_STATE | a runtime is already created within singleton _runtime |
| tResult adtf::system::ant::cADTFSystem::ExecMicro | ( | adtf::base::quiet::IADTFRuntime::tADTFMicroRunLevel | nFirstMicroRunLevel, |
| const adtf::util::cCommandLine & | oCommandLine, | ||
| std::function< void()> | fnStartup, | ||
| bool | bContinueInCaseOfError ) |
nFirstMicroRunLevel specifies the initial runlevel as a micro runlevel. 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. | tResult adtf::system::ant::cADTFSystem::Launch | ( | adtf::ucom::ant::IRuntime & | oRuntime | ) |
Launches the system and its core objects to an existing runtime.
| [in] | oRuntime | runtime to lnch the core objects to. |
| tResult adtf::system::ant::cADTFSystem::Launch | ( | const adtf::util::cCommandLine & | oCommandLine | ) |
Launches the system and create a adtf::base::cADTFRuntime.
| [in] | oCommandLine | Commandline passed to the created cADTFRuntime. |
| ERR_INVALID_STATE | a runtime is already created within singleton _runtime |
| 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.
| [in] | fnInitFunction | The additional init function. |
| 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.
| [in] | strCorePluginPath | Path to the core plugin |
| void adtf::system::ant::cADTFSystem::SetADTFDIR | ( | const util::cFilename & | strADTFDIR | ) |
Sets the environment variable ADTF_DIR.
| [in] | strADTFDIR | ADTF_DIR variable |
| 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.
| [in] | nStdOutLogLevel | LogLevel for the stdout. (see tLogLevel). |
| [in] | nStdErrLogLevel | LogLevel for the stderr. (see tLogLevel). |
| [in] | nDebugLogLevel | LogLevel for the OutputDebugString withing Visual Studio. (see tLogLevel). |
| [in] | tmQueueProcessingInterval | Interval for asynchronously logging outputs. by default it is set to 0 (synchronously enabled) |
| 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
| [in] | nStdOutMinLogLevel | Minimum LogLevel for the stdout. (see tLogLevel). |
| [in] | nStdOutMaxLogLevel | Maximum LogLevel for the stdout. (see tLogLevel). |
| [in] | nStdErrMinLogLevel | Minimum LogLevel for the stderr. (see tLogLevel). |
| [in] | nStdErrMaxLogLevel | Maximum LogLevel for the stderr. (see tLogLevel). |
| [in] | nDebugMinLogLevel | Minimum LogLevel for the OutputDebugString withing Visual Studio. (see tLogLevel). |
| [in] | nDebugMaxLogLevel | Maximum LogLevel for the OutputDebugString withing Visual Studio. (see tLogLevel). |
| [in] | tmQueueProcessingInterval | Interval for asynchronously logging outputs. by default it is set to 0 (synchronously enabled) |
| 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.
| [in] | strRPCUrl | URL to set. |
| 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.
| [in] | strSessionManagerCID | Class id of the session manager to create. |