forked from ros2/rcl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add in the APIs to enable service introspection. This PR adds in the rcl implementation of service introspection. In particular, what it adds in are the implementations of enabling and disabling service introspection, as well as creating the publisher when the introspection is enabled. The idea here is that by default, clients and services are created just like they were before. However, we add an additional API where the user can choose to configure service introspection, either to turn it OFF, send out METADATA, or send out CONTENTS (and METADATA). There are 4 different events that can get sent out if introspection is configured for METADATA or CONTENTS; REQUEST_SENT (from the client), REQUEST_RECEIVED (from the service), RESPONSE_SENT (from the service), or RESPONSE_RECEIVED (from the client). For each of these, a separate message is sent out a topic called <service_name>_service_event , so an outside observer can listen. Signed-off-by: Brian Chen <[email protected]> Signed-off-by: Ivan Santiago Paunovic <[email protected]> Signed-off-by: Chris Lalancette <[email protected]>
- Loading branch information
1 parent
79cb1e6
commit d166131
Showing
13 changed files
with
1,702 additions
and
58 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
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
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,31 @@ | ||
// Copyright 2022 Open Source Robotics Foundation, Inc. | ||
// | ||
// 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 RCL__SERVICE_INTROSPECTION_H_ | ||
#define RCL__SERVICE_INTROSPECTION_H_ | ||
|
||
#define RCL_SERVICE_INTROSPECTION_TOPIC_POSTFIX "/_service_event" | ||
|
||
/// The introspection state for a client or service. | ||
typedef enum rcl_service_introspection_state_e | ||
{ | ||
/// Introspection disabled | ||
RCL_SERVICE_INTROSPECTION_OFF, | ||
/// Introspect metadata only | ||
RCL_SERVICE_INTROSPECTION_METADATA, | ||
/// Introspection metadata and contents | ||
RCL_SERVICE_INTROSPECTION_CONTENTS, | ||
} rcl_service_introspection_state_t; | ||
|
||
#endif // RCL__SERVICE_INTROSPECTION_H_ |
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
Oops, something went wrong.