Skip to content

Commit 0bd9128

Browse files
authored
Example Refactor: Request-Reply (#5014)
* Refs #21188: Update header guards in other examples Signed-off-by: eduponz <[email protected]> * Refs #21188: CLIParser and example skeleton Signed-off-by: eduponz <[email protected]> * Refs #21188: Add IDL and type support Signed-off-by: eduponz <[email protected]> * Refs #21188: Add Server initialization Signed-off-by: eduponz <[email protected]> * Refs #21188: Add Server on_subscription_matched Signed-off-by: eduponz <[email protected]> * Refs #21188: Add Client initialization Signed-off-by: eduponz <[email protected]> * Refs #21188: Add Client on_publication_matched Signed-off-by: eduponz <[email protected]> * Refs #21188: Uncrustify Signed-off-by: eduponz <[email protected]> * Refs #21188: Code grouping Signed-off-by: eduponz <[email protected]> * Refs #21188: Refactor matched status and create a utils header Signed-off-by: eduponz <[email protected]> * Refs #21188: Client waits until a server is fully matched Signed-off-by: eduponz <[email protected]> * Refs #21188: Server runs until it is stopped Signed-off-by: eduponz <[email protected]> * Refs #21188: Client sends requests which are put in a queue Signed-off-by: eduponz <[email protected]> * Refs #21188: Rename reply z to result Signed-off-by: eduponz <[email protected]> * Refs #21188: Server sends reply and client waits for it Signed-off-by: eduponz <[email protected]> * Refs #21188: Move type support to dedicated directory Signed-off-by: eduponz <[email protected]> * Refs #21188: Server reply history cleanup when possible Signed-off-by: eduponz <[email protected]> * Refs #21188: Client uses CFT to only receive replies to its requests Signed-off-by: eduponz <[email protected]> * Refs #21188: Client waits before sending request Signed-off-by: eduponz <[email protected]> * Refs #21188: Add logging utils Signed-off-by: eduponz <[email protected]> * Refs #21188: Client SIGINT exit before any server has matched Signed-off-by: eduponz <[email protected]> * Refs #21188: Add debug logging Signed-off-by: eduponz <[email protected]> * Refs #21188: Add request ID to log messages Signed-off-by: eduponz <[email protected]> * Refs #21188: Add small TODO for follow-up PR to fulfil Signed-off-by: eduponz <[email protected]> * Refs #21188: Add context to log messages Signed-off-by: eduponz <[email protected]> * Refs #21188: Add tests Signed-off-by: eduponz <[email protected]> * Refs #21188: Add README.md Signed-off-by: eduponz <[email protected]> * Refs #21188: Add versions Signed-off-by: eduponz <[email protected]> * Refs #21188: Remove old example Signed-off-by: eduponz <[email protected]> * Refs #21188: Address minor Eliana's comments Signed-off-by: eduponz <[email protected]> * Refs #21188: Remove operation param from CLI. Client always requests + Signed-off-by: eduponz <[email protected]> * Refs #21188: Add space between doxygen @param and direction specifier Signed-off-by: eduponz <[email protected]> * Refs #21188: Client sends 1 request per operation and waits for all replies Signed-off-by: eduponz <[email protected]> * Refs #21188: Fix data race on reader filter removal Signed-off-by: eduponz <[email protected]> * Refs #21188: Unmatch participant on participant removed Signed-off-by: eduponz <[email protected]> * Refs #21188: Add DomainParticipantFactory::get_participant_extended_qos_from_default_profile Signed-off-by: eduponz <[email protected]> * Refs #21188: Server ignores non-client participants Signed-off-by: eduponz <[email protected]> * Refs #21188: Client ignores non-server participants Signed-off-by: eduponz <[email protected]> * Refs #21188: Improve client log Signed-off-by: eduponz <[email protected]> * Refs #21188: Update tests Signed-off-by: eduponz <[email protected]> * Refs #21188: Increase timeouts for CI testing Signed-off-by: eduponz <[email protected]> * Refs #21188: Adjust for change in write return type Signed-off-by: eduponz <[email protected]> * Refs #21188: Fix data race between requests_status_ init and update Signed-off-by: eduponz <[email protected]> * Refs #21188: Take timeouts back to 3s Signed-off-by: eduponz <[email protected]> * Refs #21188: Remove compose name from clients to cope with different docker compose versions Signed-off-by: eduponz <[email protected]> * Refs #21188: Apply Eliana's suggestions Signed-off-by: eduponz <[email protected]> --------- Signed-off-by: eduponz <[email protected]>
1 parent cc62caf commit 0bd9128

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+3896
-1334
lines changed

examples/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ add_subdirectory(cpp/dds)
2121
add_subdirectory(cpp/delivery_mechanisms)
2222
add_subdirectory(cpp/discovery_server)
2323
add_subdirectory(cpp/hello_world)
24+
add_subdirectory(cpp/request_reply)
2425
add_subdirectory(cpp/rtps)
2526
add_subdirectory(cpp/xtypes)
2627

examples/cpp/content_filter/CLIParser.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#ifndef FASTDDS_EXAMPLES_CPP_CONTENT_FILTER__CLIPARSER_HPP
16+
#define FASTDDS_EXAMPLES_CPP_CONTENT_FILTER__CLIPARSER_HPP
17+
1518
#include <csignal>
1619
#include <cstdlib>
1720
#include <iostream>
1821
#include <thread>
1922

2023
#include <fastdds/dds/log/Log.hpp>
2124

22-
#ifndef FASTDDS_EXAMPLES_CPP_CONTENT_FILTER__CLIPARSER_HPP
23-
#define FASTDDS_EXAMPLES_CPP_CONTENT_FILTER__CLIPARSER_HPP
24-
2525
namespace eprosima {
2626
namespace fastdds {
2727
namespace examples {

examples/cpp/content_filter/CustomContentFilter.hpp

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
#ifndef FASTDDS_EXAMPLES_CPP_CONTENT_FILTER__CUSTOMCONTENTFILTER_HPP
216
#define FASTDDS_EXAMPLES_CPP_CONTENT_FILTER__CUSTOMCONTENTFILTER_HPP
317

examples/cpp/content_filter/CustomContentFilterFactory.hpp

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
#ifndef FASTDDS_EXAMPLES_CPP_CONTENT_FILTER__CUSTOMCONTENTFILTERFACTORY_HPP
216
#define FASTDDS_EXAMPLES_CPP_CONTENT_FILTER__CUSTOMCONTENTFILTERFACTORY_HPP
317

examples/cpp/dds/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ add_subdirectory(HelloWorldExampleDataSharing)
1818
add_subdirectory(HelloWorldExampleSharedMem)
1919
add_subdirectory(HelloWorldExampleTCP)
2020
add_subdirectory(Keys)
21-
add_subdirectory(RequestReplyExample)
2221
add_subdirectory(StaticHelloWorldExample)
2322
add_subdirectory(WriterLoansExample)
2423
add_subdirectory(ZeroCopyExample)

examples/cpp/dds/RequestReplyExample/CMakeLists.txt

-71
This file was deleted.

0 commit comments

Comments
 (0)