Program Listing for File lifecycle_utils.hpp
↰ Return to documentation for file (include/nav2_util/lifecycle_utils.hpp
)
// Copyright (c) 2018 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef NAV2_UTIL__LIFECYCLE_UTILS_HPP_
#define NAV2_UTIL__LIFECYCLE_UTILS_HPP_
#include <vector>
#include <string>
#include <chrono>
#include "nav2_util/string_utils.hpp"
namespace nav2_util
{
void startup_lifecycle_nodes(
const std::vector<std::string> & node_names,
const std::chrono::seconds service_call_timeout = std::chrono::seconds::max(),
const int retries = 3);
void startup_lifecycle_nodes(
const std::string & nodes,
const std::chrono::seconds service_call_timeout = std::chrono::seconds::max(),
const int retries = 3)
{
startup_lifecycle_nodes(split(nodes, ':'), service_call_timeout, retries);
}
void reset_lifecycle_nodes(
const std::vector<std::string> & node_names,
const std::chrono::seconds service_call_timeout = std::chrono::seconds::max(),
const int retries = 3);
void reset_lifecycle_nodes(
const std::string & nodes,
const std::chrono::seconds service_call_timeout = std::chrono::seconds::max(),
const int retries = 3)
{
reset_lifecycle_nodes(split(nodes, ':'), service_call_timeout, retries);
}
} // namespace nav2_util
#endif // NAV2_UTIL__LIFECYCLE_UTILS_HPP_