Skip to content

Commit

Permalink
iox-eclipse-iceoryx#1533 Introduce the 'roudi_env' namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Sep 7, 2023
1 parent 6e159a4 commit 6e5784c
Show file tree
Hide file tree
Showing 29 changed files with 53 additions and 37 deletions.
1 change: 1 addition & 0 deletions iceoryx_binding_c/test/moduletests/test_chunk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ namespace
{
using namespace iox;
using namespace iox::mepoo;
using namespace iox::roudi_env;
using namespace iox::testing;

class Chunk_test : public RouDi_GTest
Expand Down
1 change: 1 addition & 0 deletions iceoryx_binding_c/test/moduletests/test_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ namespace
{
using namespace iox;
using namespace iox::runtime;
using namespace iox::roudi_env;
using namespace iox::testing;

class iox_node_test : public RouDi_GTest
Expand Down
1 change: 1 addition & 0 deletions iceoryx_binding_c/test/moduletests/test_publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ namespace
{
using namespace ::testing;
using namespace iox::testing;
using namespace iox::roudi_env;
using namespace iox::capro;
using namespace iox::cxx;
using namespace iox::mepoo;
Expand Down
1 change: 1 addition & 0 deletions iceoryx_binding_c/test/moduletests/test_runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ namespace
{
using namespace iox;
using namespace iox::runtime;
using namespace iox::roudi_env;
using namespace iox::testing;

class BindingC_Runtime_test : public RouDi_GTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

using namespace iox;
using namespace iox::runtime;
using namespace iox::roudi_env;
using namespace iox::testing;

extern "C" {
Expand Down
1 change: 1 addition & 0 deletions iceoryx_binding_c/test/moduletests/test_subscriber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

using namespace iox;
using namespace iox::popo;
using namespace iox::roudi_env;
using namespace iox::testing;

extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class PoshRuntimeImpl : public PoshRuntime

protected:
friend class PoshRuntime;
friend class roudi::RuntimeTestInterface;
friend class roudi_env::RuntimeTestInterface;

// Protected constructor for IPC setup
PoshRuntimeImpl(optional<const RuntimeName_t*> name,
Expand Down
6 changes: 3 additions & 3 deletions iceoryx_posh/include/iceoryx_posh/runtime/posh_runtime.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@

namespace iox
{
namespace roudi
namespace roudi_env
{
class RuntimeTestInterface;
} // namespace roudi
} // namespace roudi_env

namespace runtime
{
Expand Down Expand Up @@ -159,7 +159,7 @@ class PoshRuntime
virtual bool sendRequestToRouDi(const IpcMessage& msg, IpcMessage& answer) noexcept = 0;

protected:
friend class roudi::RuntimeTestInterface;
friend class roudi_env::RuntimeTestInterface;
using factory_t = PoshRuntime& (*)(optional<const RuntimeName_t*>);

// Protected constructor for derived classes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

namespace iox
{
namespace testing
namespace roudi_env
{
/// @brief Builder for a minimal RouDiConfig_t with only one MemPool. This significantly speeds up tests which create a
/// shared memory.
Expand All @@ -44,7 +44,7 @@ class MinimalRouDiConfigBuilder
/// @brief creates the previously configured RouDiConfig_t
RouDiConfig_t create() const noexcept;
};
} // namespace testing
} // namespace roudi_env
} // namespace iox

#endif // IOX_POSH_ROUDI_ENV_MINIMAL_ROUDI_CONFIG_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ namespace iox
namespace roudi
{
class RouDi;
}
namespace roudi_env
{

class RouDiEnvironment
{
Expand Down Expand Up @@ -73,11 +76,11 @@ class RouDiEnvironment
#else
iox::units::Duration m_interOpWaitingTimeout{iox::units::Duration::fromMilliseconds(200)};
#endif
std::unique_ptr<IceOryxRouDiComponents> m_roudiComponents;
std::unique_ptr<RouDi> m_roudiApp;
std::unique_ptr<roudi::IceOryxRouDiComponents> m_roudiComponents;
std::unique_ptr<roudi::RouDi> m_roudiApp;
};

} // namespace roudi
} // namespace roudi_env
} // namespace iox

#endif // IOX_POSH_ROUDI_ENV_ROUDI_ENVIRONMENT_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace runtime
{
class PoshRuntime;
}
namespace roudi
namespace roudi_env
{
class RuntimeTestInterface
{
Expand Down Expand Up @@ -83,7 +83,7 @@ class RuntimeTestInterface
void eraseRuntime(const RuntimeName_t& name);
};

} // namespace roudi
} // namespace roudi_env
} // namespace iox

#endif // IOX_POSH_ROUDI_ENVIRONMENT_RUNTIME_TEST_INTERFACE_HPP
4 changes: 2 additions & 2 deletions iceoryx_posh/roudi_env/source/minimal_roudi_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace iox
{
namespace testing
namespace roudi_env
{
RouDiConfig_t MinimalRouDiConfigBuilder::create() const noexcept
{
Expand All @@ -33,5 +33,5 @@ RouDiConfig_t MinimalRouDiConfigBuilder::create() const noexcept

return roudiConfig;
}
} // namespace testing
} // namespace roudi_env
} // namespace iox
13 changes: 7 additions & 6 deletions iceoryx_posh/roudi_env/source/roudi_environment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

namespace iox
{
namespace roudi
namespace roudi_env
{
RouDiEnvironment::RouDiEnvironment(BaseCTor, const uint16_t uniqueRouDiId)
{
Expand All @@ -38,10 +38,11 @@ RouDiEnvironment::RouDiEnvironment(const RouDiConfig_t& roudiConfig,
const uint16_t uniqueRouDiId)
: RouDiEnvironment(BaseCTor::BASE, uniqueRouDiId)
{
m_roudiComponents = std::unique_ptr<IceOryxRouDiComponents>(new IceOryxRouDiComponents(roudiConfig));
m_roudiApp = std::unique_ptr<RouDi>(new RouDi(m_roudiComponents->rouDiMemoryManager,
m_roudiComponents->portManager,
RouDi::RoudiStartupParameters{monitoringMode, false}));
m_roudiComponents = std::unique_ptr<roudi::IceOryxRouDiComponents>(new roudi::IceOryxRouDiComponents(roudiConfig));
m_roudiApp =
std::unique_ptr<roudi::RouDi>(new roudi::RouDi(m_roudiComponents->rouDiMemoryManager,
m_roudiComponents->portManager,
roudi::RouDi::RoudiStartupParameters{monitoringMode, false}));
}

RouDiEnvironment::~RouDiEnvironment()
Expand Down Expand Up @@ -75,5 +76,5 @@ void RouDiEnvironment::CleanupRuntimes()
m_runtimes.cleanupRuntimes();
}

} // namespace roudi
} // namespace roudi_env
} // namespace iox
4 changes: 2 additions & 2 deletions iceoryx_posh/roudi_env/source/runtime_test_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

namespace iox
{
namespace roudi
namespace roudi_env
{
using runtime::PoshRuntime;

Expand Down Expand Up @@ -124,5 +124,5 @@ PoshRuntime& RuntimeTestInterface::runtimeFactoryGetInstance(optional<const Runt
return *RuntimeTestInterface::t_activeRuntime;
}

} // namespace roudi
} // namespace roudi_env
} // namespace iox
2 changes: 1 addition & 1 deletion iceoryx_posh/test/integrationtests/test_client_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ using namespace ::testing;
using namespace iox::popo;
using namespace iox::capro;
using namespace iox::runtime;
using namespace iox::testing;
using namespace iox::roudi_env;

class DummyRequest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace
using namespace ::testing;

using namespace iox::gw;
using namespace iox::testing;
using namespace iox::roudi_env;

class InterfacePortRequestStackBlowup_test : public RouDi_GTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ using namespace ::testing;
using namespace iox::popo;
using namespace iox::capro;
using namespace iox::runtime;
using namespace iox::testing;
using namespace iox::roudi_env;

void onSampleReceivedCallback(Subscriber<int>* subscriber IOX_MAYBE_UNUSED)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ using namespace ::testing;
using namespace iox;
using namespace iox::popo;
using namespace iox::cxx;
using namespace iox::testing;
using namespace iox::roudi_env;

template <typename T>
struct ComplexDataType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
namespace
{
using namespace ::testing;
using namespace iox::roudi;
using namespace iox::testing;
using namespace iox::roudi_env;

class RouDiEnvironment_test : public Test
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,10 @@ using namespace iox::runtime;
using namespace iox::cxx;
using namespace iox::popo;
using namespace iox::capro;
using namespace iox::testing;
using namespace iox::roudi_env;
using iox::capro::IdString_t;
using iox::capro::ServiceDescription;
using iox::popo::MessagingPattern;
using iox::roudi::RouDiEnvironment;

using ServiceContainer = std::vector<ServiceDescription>;

Expand Down
2 changes: 1 addition & 1 deletion iceoryx_posh/test/moduletests/test_posh_runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ using namespace iox::capro;
using namespace iox::cxx;
using namespace iox;
using namespace iox::popo;
using namespace iox::testing;
using namespace iox::roudi_env;
using iox::roudi::RouDiEnvironment;

class PoshRuntime_test : public Test
Expand Down
2 changes: 1 addition & 1 deletion iceoryx_posh/test/moduletests/test_posh_runtime_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace
using namespace ::testing;
using namespace iox::runtime;
using namespace iox::roudi;
using namespace iox::testing;
using namespace iox::roudi_env;
using namespace iox;

/// @brief Test goal: This test suit verifies class node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace
using namespace ::testing;
using namespace iox::runtime;
using namespace iox::roudi;
using namespace iox::testing;
using namespace iox::roudi_env;
using namespace iox;

/// @brief Test goal: This test suit verifies class posh_runtime_single_process
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace
{
using namespace ::testing;

using namespace iox::testing;
using namespace iox::roudi_env;
using iox::roudi::IceOryxRouDiMemoryManager;

/// @brief This test file verifies that the BaseClass IceoryxRouDiMemoryManager is tested
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ using namespace iox::capro;
using namespace iox::cxx;
using namespace iox::popo;
using namespace iox::roudi;
using namespace iox::testing;
using namespace iox::roudi_env;

using iox::runtime::PortConfigInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ using namespace iox::roudi;
using namespace iox::popo;
using namespace iox::runtime;
using namespace iox::posix;
using namespace iox::testing;
using namespace iox::roudi_env;
using namespace iox::version;

class ProcessManager_test : public Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,12 @@

#include "iceoryx_posh/roudi_env/roudi_environment.hpp"

namespace iox
{
namespace roudi
{
using roudi_env::RouDiEnvironment;
}
} // namespace iox

#endif // IOX_POSH_ROUDI_ENVIRONMENT_ROUDI_ENVIRONMENT_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

using namespace ::testing;

class RouDi_GTest : public iox::roudi::RouDiEnvironment, public Test
class RouDi_GTest : public iox::roudi_env::RouDiEnvironment, public Test
{
public:
RouDi_GTest() = default;
Expand Down
2 changes: 1 addition & 1 deletion iceoryx_posh/testing/source/roudi_gtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
#include "iceoryx_posh/testing/roudi_gtest.hpp"

RouDi_GTest::RouDi_GTest(const iox::RouDiConfig_t& roudiConfig)
: iox::roudi::RouDiEnvironment(roudiConfig)
: iox::roudi_env::RouDiEnvironment(roudiConfig)
{
}

0 comments on commit 6e5784c

Please sign in to comment.