Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[service introspection] Add ServiceEvent, ServiceEventInfo, ServiceEventType messages #141

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion rcl_interfaces/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ endif()
find_package(ament_cmake REQUIRED)
find_package(rosidl_default_generators REQUIRED)
find_package(builtin_interfaces REQUIRED)
find_package(unique_identifier_msgs REQUIRED)

rosidl_generate_interfaces(${PROJECT_NAME}
"msg/FloatingPointRange.msg"
Expand All @@ -25,14 +26,17 @@ rosidl_generate_interfaces(${PROJECT_NAME}
"msg/Parameter.msg"
"msg/ParameterType.msg"
"msg/ParameterValue.msg"
"msg/ServiceEvent.msg"
"msg/ServiceEventInfo.msg"
"msg/ServiceEventType.msg"
"msg/SetParametersResult.msg"
"srv/DescribeParameters.srv"
"srv/GetParameters.srv"
"srv/GetParameterTypes.srv"
"srv/ListParameters.srv"
"srv/SetParametersAtomically.srv"
"srv/SetParameters.srv"
DEPENDENCIES builtin_interfaces
DEPENDENCIES builtin_interfaces unique_identifier_msgs
)

install(FILES mapping_rules.yaml DESTINATION share/${PROJECT_NAME})
Expand Down
5 changes: 5 additions & 0 deletions rcl_interfaces/msg/ServiceEvent.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# See ServiceEventInfo
rcl_interfaces/ServiceEventInfo info

# Serialized Service_Request/Service_Response message
byte[] serialized_event
20 changes: 20 additions & 0 deletions rcl_interfaces/msg/ServiceEventInfo.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# The type of event this message represents
# See ServiceEventType for possible values
uint8 event_type

# Timestamp for when the event occurred (sent or received time)
builtin_interfaces/Time stamp

# Unique identifier for the client that sent the service request
# Note, this is only unique for the current session
unique_identifier_msgs/UUID client_id

# Sequence number for the request
# Combined with the client ID, this creates a unique ID for the service transaction
int64 sequence_number

# Name of the service, i.e. add_two_ints_service
string service_name

# Name of the service event, i.e. AddTwoInts_Request
string event_name
14 changes: 14 additions & 0 deletions rcl_interfaces/msg/ServiceEventType.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# An enumeration of service event types
# These are used to set the type value in ServiceEvent messages

# A service request was sent by a client
uint8 REQUEST_SENT=0

# A service request was recieved by a service
uint8 REQUEST_RECEIVED=1

# A service response was sent by a service
uint8 RESPONSE_SENT=2

# A service response was received by a client
uint8 RESPONSE_RECEIVED=3
1 change: 1 addition & 0 deletions rcl_interfaces/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<buildtool_depend>rosidl_default_generators</buildtool_depend>

<depend>builtin_interfaces</depend>
<depend>unique_identifier_msgs</depend>

<exec_depend>rosidl_default_runtime</exec_depend>

Expand Down