Skip to content

Commit

Permalink
Add interfaces for logging service. (#154)
Browse files Browse the repository at this point in the history
* Add interfaces for logging service.

Signed-off-by: Lei Liu <[email protected]>
Signed-off-by: Barry Xu <[email protected]>
  • Loading branch information
llapx authored Apr 17, 2023
1 parent 35e5116 commit fda8865
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 1 deletion.
4 changes: 4 additions & 0 deletions rcl_interfaces/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,16 @@ rosidl_generate_interfaces(${PROJECT_NAME}
"msg/ParameterType.msg"
"msg/ParameterValue.msg"
"msg/SetParametersResult.msg"
"msg/LoggerLevel.msg"
"msg/SetLoggerLevelsResult.msg"
"srv/DescribeParameters.srv"
"srv/GetParameters.srv"
"srv/GetParameterTypes.srv"
"srv/ListParameters.srv"
"srv/SetParametersAtomically.srv"
"srv/SetParameters.srv"
"srv/GetLoggerLevels.srv"
"srv/SetLoggerLevels.srv"
DEPENDENCIES builtin_interfaces
)

Expand Down
9 changes: 8 additions & 1 deletion rcl_interfaces/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ The ROS API for a node will be as follows inside the node's namespace.
* List the parameters on this node matching the filters.
* `set_parameters`: `SetParameters`
* Set parameters on this node.
* `get_logger_levels`: `GetLoggerLevels`
* Get the logger levels of nodes which are in the same process space.
* `set_logger_levels`: `SetLoggerLevels`
* Set the logger levels of nodes which are in the same process space.

## Messages (.msg)
* [FloatingPointRange](msg/FloatingPointRange.msg): Represents bounds and a step value for a floating point typed parameter
Expand All @@ -46,14 +50,17 @@ The ROS API for a node will be as follows inside the node's namespace.
* [ParameterType](msg/ParameterType.msg): Enum definitions for denoting a parameter value's type
* [ParameterValue](msg/ParameterValue.msg): The associated value and type of a parameter
* [SetParameterResult](msg/SetParametersResult.msg): Result message indicating whether a set parameters event succeeded
* [SetLoggerLevelsResult](msg/SetLoggerLevelsResult.msg): Result message indicating whether a set logger level event succeeded

## Services (.srv)
* [DescribeParameters](srv/DescribeParameters.srv): Request a list of descriptions for a specified list of parameters.
* [GetParameters](srv/GetParameters.srv): Get the values of a specific list of parameters
* [GetParameterTypes](srv/GetParametersTypes.srv): Get the enum type of a list of parameters
* [ListParameters](srv/ListParameters.srv): Get the list of parameters given a list of prefixes
* [SetParameters](srv/SetParameters.srv): Add or change a list of parameters individually
* [SetParametersAtomically](srv/SetParametersAtomically.srv): Add or change all parameters in a list or none at all.
* [SetParametersAtomically](srv/SetParametersAtomically.srv): Add or change all parameters in a list or none at all
* [GetLoggerLevels](srv/GetLoggerLevels.srv): Get the logger levels of a specific list of nodes which are in the same process space
* [SetLoggerLevels](srv/SetLoggerLevels.srv): Change a list of logger levels of nodes which are in the same process space

## Quality Declaration
This package claims to be in the **Quality Level 1** category, see the [Quality Declaration](QUALITY_DECLARATION.md) for more details.
14 changes: 14 additions & 0 deletions rcl_interfaces/msg/LoggerLevel.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# All available logger levels; these correspond to the enum in rcutils/logger.h

uint8 LOG_LEVEL_UNKNOWN = 0
uint8 LOG_LEVEL_DEBUG = 10
uint8 LOG_LEVEL_INFO = 20
uint8 LOG_LEVEL_WARN = 30
uint8 LOG_LEVEL_ERROR = 40
uint8 LOG_LEVEL_FATAL = 50

# The logger name.
string name

# The logger level
uint32 level
5 changes: 5 additions & 0 deletions rcl_interfaces/msg/SetLoggerLevelsResult.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# True when succeed, false when failed.
bool successful

# Reason why the setting was either successful or a failure.
string reason
7 changes: 7 additions & 0 deletions rcl_interfaces/srv/GetLoggerLevels.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# A list of logger names to get.
string[] names

---
# List of logger levels which is the same order as the provided names. If a
# logger was not yet set, the value will have 'unknown' as the value.
LoggerLevel[] levels
6 changes: 6 additions & 0 deletions rcl_interfaces/srv/SetLoggerLevels.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# A list of loggers to set.
LoggerLevel[] levels

---
# Indicates whether setting each logger succeeded or not and why.
SetLoggerLevelsResult[] results

0 comments on commit fda8865

Please sign in to comment.