metrics_collector_parameter_helper.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2019 Amazon.com, Inc. or its affiliates. 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  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #pragma once
17 
21 #include <ros/ros.h>
22 #include <unordered_set>
23 #include <iostream>
24 
25 
26 namespace Aws {
27 namespace CloudWatchMetrics {
28 namespace Utils {
29 
30 const std::string kNodeParamMonitorTopicsListKey("aws_monitored_metric_topics");
31 const std::string kNodeParamMetricNamespaceKey = "aws_metrics_namespace";
32 const std::string kNodeParamDefaultMetricDimensionsKey = "aws_default_metric_dimensions";
33 const std::string kNodeName = "cloudwatch_metrics_collector";
34 const char kNodeParamPublishFrequencyKey[] = "publish_frequency";
35 
37 constexpr char kNodeParamBatchMaxQueueSize[] = "batch_max_queue_size";
38 constexpr char kNodeParamBatchTriggerPublishSize[] = "batch_trigger_publish_size";
39 constexpr char kNodeParamFileMaxQueueSize[] = "file_max_queue_size";
40 constexpr char kNodeParamFileUploadBatchSize[] = "file_upload_batch_size";
41 constexpr char kNodeParamStreamMaxQueueSize[] = "stream_max_queue_size";
42 
44 constexpr char kNodeParamFileExtension[] = "file_extension";
45 constexpr char kNodeParamFilePrefix[] = "file_prefix";
46 constexpr char kNodeParamMaximumFileSize[] = "maximum_file_size";
47 constexpr char kNodeParamStorageDirectory[] = "storage_directory";
48 constexpr char kNodeParamStorageLimit[] = "storage_limit";
49 
50 constexpr int kNodeSubQueueSize = 100;
53 const std::string kNodeDefaultMetricNamespace = "ROS";
54 const std::string kNodeDefaulMetricsTopic = "metrics";
56 const std::string kNodeParamMetricDatumStorageResolutionKey = "storage_resolution";
58 
59 
69  const std::shared_ptr<Aws::Client::ParameterReaderInterface>& parameter_reader,
70  double & publish_frequency);
71 
79  const std::shared_ptr<Aws::Client::ParameterReaderInterface>& parameter_reader,
80  std::string & metric_namespace);
81 
90  const std::shared_ptr<Aws::Client::ParameterReaderInterface>& parameter_reader,
91  Aws::String & dimensions_param,
92  std::map<std::string, std::string> & metric_dims);
100  const std::shared_ptr<Aws::Client::ParameterReaderInterface>& parameter_reader,
101  int & storage_resolution);
102 
103 void ReadTopics(std::vector<std::string> & topics);
104 
114  const std::shared_ptr<Aws::Client::ParameterReaderInterface>& parameter_reader,
115  Aws::CloudWatchMetrics::CloudWatchOptions & cloudwatch_options);
116 
126  const std::shared_ptr<Aws::Client::ParameterReaderInterface>& parameter_reader,
127  Aws::DataFlow::UploaderOptions & uploader_options);
128 
138  const std::shared_ptr<Aws::Client::ParameterReaderInterface>& parameter_reader,
139  Aws::FileManagement::FileManagerStrategyOptions & file_manager_strategy_options);
140 
151 void ReadOption(
152  const std::shared_ptr<Aws::Client::ParameterReaderInterface>& parameter_reader,
153  const std::string & option_key,
154  const std::string & default_value,
155  std::string & option_value);
156 
167 void ReadOption(
168  const std::shared_ptr<Aws::Client::ParameterReaderInterface>& parameter_reader,
169  const std::string & option_key,
170  const size_t & default_value,
171  size_t & option_value);
172 
173 } // namespace Utils
174 } // namespace CloudWatchMetrics
175 } // namespace Aws
void ReadCloudWatchOptions(const std::shared_ptr< Aws::Client::ParameterReaderInterface > &parameter_reader, Aws::CloudWatchMetrics::CloudWatchOptions &cloudwatch_options)
void ReadUploaderOptions(const std::shared_ptr< Aws::Client::ParameterReaderInterface > &parameter_reader, Aws::DataFlow::UploaderOptions &uploader_options)
void ReadOption(const std::shared_ptr< Aws::Client::ParameterReaderInterface > &parameter_reader, const std::string &option_key, const std::string &default_value, std::string &option_value)
void ReadMetricNamespace(const std::shared_ptr< Aws::Client::ParameterReaderInterface > &parameter_reader, std::string &metric_namespace)
def default_value(type_)
void ReadTopics(std::vector< std::string > &topics)
const std::string kNodeParamMonitorTopicsListKey("aws_monitored_metric_topics")
void ReadPublishFrequency(const std::shared_ptr< Aws::Client::ParameterReaderInterface > &parameter_reader, double &publish_frequency)
void ReadFileManagerStrategyOptions(const std::shared_ptr< Aws::Client::ParameterReaderInterface > &parameter_reader, Aws::FileManagement::FileManagerStrategyOptions &file_manager_strategy_options)
const std::set< int > kNodeParamMetricDatumStorageResolutionValidValues
void ReadStorageResolution(const std::shared_ptr< Aws::Client::ParameterReaderInterface > &parameter_reader, int &storage_resolution)
void ReadMetricDimensions(const std::shared_ptr< Aws::Client::ParameterReaderInterface > &parameter_reader, Aws::String &dimensions_param, std::map< std::string, std::string > &metric_dims)


cloudwatch_metrics_collector
Author(s): AWS RoboMaker
autogenerated on Fri Mar 5 2021 03:38:40