Carma-platform v4.2.0
CARMA Platform is built on robot operating system (ROS) and utilizes open source software (OSS) that enables Cooperative Driving Automation (CDA) features to allow Automated Driving Systems to interact and cooperate with infrastructure and other vehicles through communication.
base_subsystem_controller_config.hpp
Go to the documentation of this file.
1#pragma once
2
3/*
4 * Copyright (C) 2021 LEIDOS.
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
7 * use this file except in compliance with the License. You may obtain a copy of
8 * the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15 * License for the specific language governing permissions and limitations under
16 * the License.
17 */
18
19#include <iostream>
20#include <vector>
21
23{
28 {
30 std::vector<std::string> required_subsystem_nodes;
31
33 // but which are required to be operational for the subsystem to function
34 std::vector<std::string> unmanaged_required_nodes;
35
37 std::string subsystem_namespace = "/false_namespace";
38
41
43 int call_timeout_ms = 1000;
44
47
48 // Stream operator for this config
49 friend std::ostream &operator<<(std::ostream &output, const BaseSubSystemControllerConfig &c)
50 {
51
52 output << "BaseSubSystemControllerConfig { " << std::endl
53 << "service_timeout_ms: " << c.service_timeout_ms << std::endl
54 << "call_timeout_ms: " << c.call_timeout_ms << std::endl
55 << "subsystem_namespace: " << c.subsystem_namespace << std::endl
56 << "full_subsystem_required: " << c.full_subsystem_required << std::endl
57 << "unmanaged_required_nodes: [ " << std::endl;
58
59 for (auto node : c.unmanaged_required_nodes)
60 output << node << " ";
61
62 output << "] " << std::endl << "required_subsystem_nodes: [ ";
63
64 for (auto node : c.required_subsystem_nodes)
65 output << node << " ";
66
67 output << "] " << std::endl
68 << "}" << std::endl;
69 return output;
70 }
71 };
72
73} // namespace subsystem_controllers
Stuct containing the algorithm configuration values for the BaseSubsystemController.
std::vector< std::string > required_subsystem_nodes
List of nodes to consider required and who's failure shall result in system shutdown.
bool full_subsystem_required
If this flag is true then all nodes under subsystem_namespace are treated as required in addition to ...
std::string subsystem_namespace
Node Namespace. Any node under this namespace shall have its lifecycle managed by this controller.
friend std::ostream & operator<<(std::ostream &output, const BaseSubSystemControllerConfig &c)
std::vector< std::string > unmanaged_required_nodes
List of nodes which will not be directly managed by this subsystem controller.