ADTF  3.18.2
adtf_runtime.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 #include <adtfucom3/adtf_ucom3.h>
11 
12 namespace adtf
13 {
14 namespace base
15 {
16 namespace ant
17 {
18 
23 enum tADTFRunLevel : int8_t
24 {
28  RL_System = 1,
39 
43 };
44 
45 }
46 
47 namespace quiet
48 {
49 
54 class cADTFRuntime : public ucom::catwo::object<ucom::ant::detail::cRuntime, IADTFRuntime>
55 {
56  A_UTILS_D(cADTFRuntime);
57 
58  public:
65  cADTFRuntime(const adtf::util::cCommandLine& oCommandline);
66 
67  // called with tADTFRunLevel range
68  tResult SetRunLevel(int8_t i8RunlevelToChangeTo, bool bWait=true) override;
69 
70  // returns values within tADTFRunLevel range
71  int8_t GetRunLevel() const override;
72 
73  tResult SetMicroRunLevel(tADTFMicroRunLevel nRunlevelToChangeTo, bool bWait=true) override;
74 
75  tADTFMicroRunLevel GetMicroRunLevel() const override;
76 
77  // called with tADTFRunLevel range
78  tResult RegisterObject(const ucom::ant::iobject_ptr<ucom::ant::IObject>& pObject,
79  const char* strNameOID,
80  int8_t nRunLevel,
81  uint32_t ui32Flags = 0) override;
82 
83  // called with tADTFRunLevel range
84  tResult RegisterPlugin(const char* strUrl,
85  int8_t nRunLevel,
87  uint32_t ui32Flags=0) override;
105  tResult Exec(int8_t i8FirstRunlevelToSet, std::function<void()> fnStartup);
114  tResult Exec(int8_t i8FirstRunlevelToSet, std::function<void()> fnStartup, bool bContinueInCaseOfError);
115  tResult Exec(int8_t i8FirstRunlevelToSet);
116 
117  tResult ExecMicro(tADTFMicroRunLevel nFirstMicroRunlevelToSet, std::function<void()> fnStartup, bool bContinueInCaseOfError);
118 
119  protected:
120  // this is called from the base class with our micro runlevel identifiers.
121  const char* GetRunLevelString(int8_t i8Runlevel) const override;
122 
123  // this is called from the base class with our micro runlevel identifiers.
124  tResult ChangeRunLevel(int8_t i8RunLevelToChangeTo) override;
125 
126  bool StartedCompletedImplementation() const;
127 };
128 
129 }
130 
131 namespace spider
132 {
133 
137 class cADTFRuntime: public ucom::catwo::object<quiet::cADTFRuntime, ucom::spider::IRuntimeStartup>
138 {
139 public:
141  using base_type::base_type;
142 
143  bool StartupCompleted() const override;
144 };
145 
146 }
147 
148 using ant::tADTFRunLevel;
152 
153 }
154 }
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Definition of the Basic ADTF Runtime the Launcher will be used to create an ADTF System.
Definition: adtf_runtime.h:55
tResult Exec(int8_t i8FirstRunlevelToSet, std::function< void()> fnStartup)
Launches the system and create a adtf::base::ant::cADTFRuntime.
tResult Exec(int8_t i8FirstRunlevelToSet, std::function< void()> fnStartup, bool bContinueInCaseOfError)
ucom::catwo::object< ucom::ant::detail::cRuntime, IADTFRuntime > base_type
base type
Definition: adtf_runtime.h:60
cADTFRuntime(const adtf::util::cCommandLine &oCommandline)
CTOR with commandline arguments.
@ RL_Shutdown
The system is shut down.
Definition: runtime_intf.h:124
@ RL_Internal
Invalid run level that signals unmanaged modules.
Definition: runtime_intf.h:127
Base object pointer to realize binary compatible reference counting in interface methods.
Use this template if you want to implement an ucom::ant::IObject based Interface and/or subclass an e...
Definition: object.h:379
tADTFRunLevel
The ADTF Runtime Level State are used to define a ADTF Runtime specialization for a adtf::ucom::ant::...
Definition: adtf_runtime.h:24
@ RL_Shutdown
The system is shut down.
Definition: adtf_runtime.h:26
@ RL_Internal
internal runlevel Is not for users !
Definition: adtf_runtime.h:42
@ RL_Max
maximum level that can be reached
Definition: adtf_runtime.h:38
@ RL_Session
The session level.
Definition: adtf_runtime.h:30
@ RL_FilterGraph
The Filtergraph level.
Definition: adtf_runtime.h:34
@ RL_StreamingGraph
The Streaminggraph level.
Definition: adtf_runtime.h:32
@ RL_System
The system level.
Definition: adtf_runtime.h:28
@ RL_Running
The Running level.
Definition: adtf_runtime.h:36
Namespace for entire ADTF SDK.