Apollo  6.0
Open source self driving car software
module_argument.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2018 The Apollo Authors. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *****************************************************************************/
16 
17 #ifndef CYBER_MAINBOARD_MODULE_ARGUMENT_H_
18 #define CYBER_MAINBOARD_MODULE_ARGUMENT_H_
19 
20 #include <list>
21 #include <string>
22 
24 #include "cyber/common/log.h"
25 #include "cyber/common/types.h"
26 
27 namespace apollo {
28 namespace cyber {
29 namespace mainboard {
30 
31 static const char DEFAULT_process_group_[] = "mainboard_default";
32 static const char DEFAULT_sched_name_[] = "CYBER_DEFAULT";
33 
35  public:
36  ModuleArgument() = default;
37  virtual ~ModuleArgument() = default;
38  void DisplayUsage();
39  void ParseArgument(int argc, char* const argv[]);
40  void GetOptions(const int argc, char* const argv[]);
41  const std::string& GetBinaryName() const;
42  const std::string& GetProcessGroup() const;
43  const std::string& GetSchedName() const;
44  const std::list<std::string>& GetDAGConfList() const;
45 
46  private:
47  std::list<std::string> dag_conf_list_;
48  std::string binary_name_;
49  std::string process_group_;
50  std::string sched_name_;
51 };
52 
53 inline const std::string& ModuleArgument::GetBinaryName() const {
54  return binary_name_;
55 }
56 
57 inline const std::string& ModuleArgument::GetProcessGroup() const {
58  return process_group_;
59 }
60 
61 inline const std::string& ModuleArgument::GetSchedName() const {
62  return sched_name_;
63 }
64 
65 inline const std::list<std::string>& ModuleArgument::GetDAGConfList() const {
66  return dag_conf_list_;
67 }
68 
69 } // namespace mainboard
70 } // namespace cyber
71 } // namespace apollo
72 
73 #endif // CYBER_MAINBOARD_MODULE_ARGUMENT_H_
const std::string & GetProcessGroup() const
Definition: module_argument.h:57
const std::list< std::string > & GetDAGConfList() const
Definition: module_argument.h:65
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
const std::string & GetSchedName() const
Definition: module_argument.h:61
const std::string & GetBinaryName() const
Definition: module_argument.h:53
void ParseArgument(int argc, char *const argv[])
Definition: module_argument.h:34
void GetOptions(const int argc, char *const argv[])