Skip to content

Commit

Permalink
Refs #20567: Make DBQueue private
Browse files Browse the repository at this point in the history
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
  • Loading branch information
EduPonz committed Mar 12, 2024
1 parent 8d844a7 commit da50d6d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
8 changes: 4 additions & 4 deletions src/cpp/fastdds/log/Log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
#include <memory>
#include <mutex>

#include <fastrtps/utils/DBQueue.h>

#include <fastdds/dds/log/Colors.hpp>
#include <fastdds/dds/log/Log.hpp>
#include <fastdds/dds/log/OStreamConsumer.hpp>
#include <fastdds/dds/log/StdoutConsumer.hpp>
#include <fastdds/dds/log/StdoutErrConsumer.hpp>
#include <fastdds/dds/log/Colors.hpp>

#include <utils/DBQueue.hpp>
#include <utils/SystemInfo.hpp>
#include <utils/thread.hpp>
#include <utils/threading.hpp>
Expand Down Expand Up @@ -341,7 +341,7 @@ struct LogResources
return true;
}

fastrtps::DBQueue<Log::Entry> logs_;
DBQueue<Log::Entry> logs_;
std::vector<std::unique_ptr<LogConsumer>> consumers_;
eprosima::thread logging_thread_;

Expand Down
16 changes: 8 additions & 8 deletions src/cpp/rtps/builtin/discovery/database/DiscoveryDataBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@
#include <set>
#include <vector>

#include <nlohmann/json.hpp>

#include <fastdds/rtps/common/CacheChange.h>
#include <fastdds/rtps/history/WriterHistory.h>
#include <fastdds/rtps/writer/ReaderProxy.h>
#include <fastdds/rtps/common/CacheChange.h>
#include <fastrtps/utils/DBQueue.h>

#include <rtps/builtin/discovery/database/DiscoveryDataFilter.hpp>
#include <rtps/builtin/discovery/database/DiscoveryParticipantInfo.hpp>
#include <rtps/builtin/discovery/database/DiscoveryEndpointInfo.hpp>
#include <rtps/builtin/discovery/database/DiscoveryDataQueueInfo.hpp>

#include <nlohmann/json.hpp>
#include <rtps/builtin/discovery/database/DiscoveryEndpointInfo.hpp>
#include <rtps/builtin/discovery/database/DiscoveryParticipantInfo.hpp>
#include <utils/DBQueue.hpp>

namespace eprosima {
namespace fastdds {
Expand Down Expand Up @@ -520,9 +520,9 @@ class DiscoveryDataBase
////////////////
// Variables

fastrtps::DBQueue<eprosima::fastdds::rtps::ddb::DiscoveryPDPDataQueueInfo> pdp_data_queue_;
DBQueue<eprosima::fastdds::rtps::ddb::DiscoveryPDPDataQueueInfo> pdp_data_queue_;

fastrtps::DBQueue<eprosima::fastdds::rtps::ddb::DiscoveryEDPDataQueueInfo> edp_data_queue_;
DBQueue<eprosima::fastdds::rtps::ddb::DiscoveryEDPDataQueueInfo> edp_data_queue_;

//! Covenient per-topic mapping of readers and writers to speed-up queries
std::map<std::string, std::vector<eprosima::fastrtps::rtps::GUID_t>> readers_by_topic_;
Expand Down
4 changes: 2 additions & 2 deletions src/cpp/rtps/transport/shared_mem/SharedMemLog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

#include <fastdds/rtps/attributes/ThreadSettings.hpp>
#include <fastdds/rtps/common/Locator.h>
#include <fastrtps/utils/DBQueue.h>

#include <rtps/transport/shared_mem/SharedMemManager.hpp>
#include <utils/DBQueue.hpp>
#include <utils/SystemInfo.hpp>
#include <utils/thread.hpp>
#include <utils/threading.hpp>
Expand Down Expand Up @@ -334,7 +334,7 @@ class PacketsLog

struct Resources
{
eprosima::fastrtps::DBQueue<typename TPacketConsumer::Pkt> logs;
DBQueue<typename TPacketConsumer::Pkt> logs;
std::vector<std::unique_ptr<SHMPacketFileConsumer>> consumers;
eprosima::thread logging_thread;

Expand Down
14 changes: 7 additions & 7 deletions include/fastrtps/utils/DBQueue.h → src/cpp/utils/DBQueue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#ifndef DBQUEUE_H
#define DBQUEUE_H
#ifndef _FASTDDS_DBQUEUE_HPP
#define _FASTDDS_DBQUEUE_HPP

#include <queue>
#include <mutex>
#include <memory>
#include <condition_variable>
#include <memory>
#include <mutex>
#include <queue>

namespace eprosima {
namespace fastrtps {
namespace fastdds {

/**
* Double buffered, threadsafe queue for MPSC (multi-producer, single-consumer) comms.
Expand Down Expand Up @@ -151,7 +151,7 @@ class DBQueue
};


} // namespace fastrtps
} // namespace fastdds
} // namespace eprosima

#endif // ifndef DBQUEUE_H

0 comments on commit da50d6d

Please sign in to comment.