This repository has been archived by the owner on Jun 10, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add system_metrics_collector package (#2)
Add strict compile flags
- Loading branch information
Showing
4 changed files
with
89 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
# system_metrics_collector | ||
|
||
Note: _This is currently an **experimental** package._ | ||
|
||
## MetricsMessage | ||
|
||
This message is used to publish the statistics of measured data points, e.g. system cpu %, system free memory, message age, etc. | ||
|
||
## License | ||
The source code is released under an Apache 2.0. | ||
|
||
Maintainer: ROS Tooling Working Group, ros-tooling@googlegroups.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
cmake_minimum_required(VERSION 3.5) | ||
project(system_metrics_collector) | ||
|
||
# Default to C99 | ||
if(NOT CMAKE_C_STANDARD) | ||
set(CMAKE_C_STANDARD 99) | ||
endif() | ||
|
||
# Default to C++14 | ||
if(NOT CMAKE_CXX_STANDARD) | ||
set(CMAKE_CXX_STANDARD 14) | ||
endif() | ||
|
||
# Enable strict compiler flags if possible. | ||
include(CheckCXXCompilerFlag) | ||
# Removed -Wmissing-declarations until gmock is ignored | ||
set(FLAGS -pedantic -Wno-long-long -Wall -Wextra -Wcast-qual -Wformat -Wwrite-strings -Wcast-align -Wno-error=cast-align) | ||
foreach(FLAG ${FLAGS}) | ||
check_cxx_compiler_flag(${FLAG} R${FLAG}) | ||
if(${R${FLAG}}) | ||
set(WARNING_CXX_FLAGS "${WARNING_CXX_FLAGS} ${FLAG}") | ||
endif() | ||
endforeach() | ||
|
||
# find dependencies | ||
find_package(ament_cmake REQUIRED) | ||
find_package(rclcpp REQUIRED) | ||
find_package(rcutils REQUIRED) | ||
find_package(metrics_statistics_msgs REQUIRED) | ||
|
||
if(BUILD_TESTING) | ||
find_package(ament_lint_auto REQUIRED) | ||
# the following line skips the linter which checks for copyrights | ||
# uncomment the line when a copyright and license is not present in all source files | ||
#set(ament_cmake_copyright_FOUND TRUE) | ||
# the following line skips cpplint (only works in a git repo) | ||
# uncomment the line when this package is not in a git repo | ||
#set(ament_cmake_cpplint_FOUND TRUE) | ||
ament_lint_auto_find_test_dependencies() | ||
endif() | ||
|
||
ament_package() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0"?> | ||
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<package format="3"> | ||
<name>system_metrics_collector</name> | ||
<version>0.0.0</version> | ||
<description>Node and aggregation utilities to measure and publish system metrics.</description> | ||
<maintainer email="ros-tooling@googlegroups.com">ROS Tooling Working Group</maintainer> | ||
<license>Apache License 2.0</license> | ||
|
||
<buildtool_depend>ament_cmake</buildtool_depend> | ||
|
||
<build_depend>rclcpp</build_depend> | ||
<build_depend>rcutils</build_depend> | ||
<build_depend>metrics_statistics_msgs</build_depend> | ||
|
||
<exec_depend>rclcpp</exec_depend> | ||
<exec_depend>rcutils</exec_depend> | ||
<exec_depend>metrics_statistics_msgs</exec_depend> | ||
|
||
<test_depend>ament_lint_auto</test_depend> | ||
<test_depend>ament_lint_common</test_depend> | ||
|
||
<export> | ||
<build_type>ament_cmake</build_type> | ||
</export> | ||
</package> |