Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,45 @@
#define IOX_POSH_POPO_PORTS_PUB_SUB_PORT_TYPES_HPP

#include "iceoryx_posh/iceoryx_posh_types.hpp"
#include "iceoryx_posh/internal/popo/building_blocks/chunk_distributor_data.hpp"
#include "iceoryx_posh/internal/popo/building_blocks/chunk_receiver_data.hpp"
#include "iceoryx_posh/internal/popo/building_blocks/chunk_sender_data.hpp"
#include "iceoryx_posh/internal/popo/building_blocks/locking_policy.hpp"
#include "iceoryx_posh/popo/enum_trigger_type.hpp"

namespace iox
{
namespace popo
{
/// @todo iox-#1051 move definitions for publish subscribe communication here
// ==================== Subscriber types ====================

using SubscriberChunkQueueData_t = ChunkQueueData<DefaultChunkQueueConfig, ThreadSafePolicy>;

using SubscriberChunkReceiverData_t =
ChunkReceiverData<MAX_CHUNKS_HELD_PER_SUBSCRIBER_SIMULTANEOUSLY, SubscriberChunkQueueData_t>;

// ==================== Publisher types ====================

using PublisherChunkQueueData_t = SubscriberChunkQueueData_t;

using PublisherChunkDistributorData_t =
ChunkDistributorData<DefaultChunkDistributorConfig, ThreadSafePolicy, ChunkQueuePusher<PublisherChunkQueueData_t>>;

using PublisherChunkSenderData_t =
ChunkSenderData<MAX_CHUNKS_ALLOCATED_PER_PUBLISHER_SIMULTANEOUSLY, PublisherChunkDistributorData_t>;

// ==================== Event and State enums ====================

enum class SubscriberEvent : EventEnumIdentifier
{
DATA_RECEIVED
};

enum class SubscriberState : StateEnumIdentifier
{
HAS_DATA
};
Comment on lines +49 to +57
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is added here, it needs to be removed from base_subscriber.hpp


} // namespace popo
} // namespace iox

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@
#include "iceoryx_posh/capro/service_description.hpp"
#include "iceoryx_posh/iceoryx_posh_types.hpp"
#include "iceoryx_posh/internal/mepoo/memory_manager.hpp"
#include "iceoryx_posh/internal/popo/building_blocks/chunk_distributor_data.hpp"
#include "iceoryx_posh/internal/popo/building_blocks/chunk_sender_data.hpp"
#include "iceoryx_posh/internal/popo/building_blocks/locking_policy.hpp"
#include "iceoryx_posh/internal/popo/ports/base_port_data.hpp"
#include "iceoryx_posh/internal/popo/ports/subscriber_port_data.hpp"
#include "iceoryx_posh/internal/popo/ports/pub_sub_port_types.hpp"
#include "iceoryx_posh/mepoo/memory_info.hpp"
#include "iceoryx_posh/popo/publisher_options.hpp"
#include "iox/atomic.hpp"
Expand All @@ -44,11 +41,9 @@ struct PublisherPortData : public BasePortData
const PublisherOptions& publisherOptions,
const mepoo::MemoryInfo& memoryInfo = mepoo::MemoryInfo()) noexcept;

using ChunkQueueData_t = SubscriberPortData::ChunkQueueData_t;
using ChunkDistributorData_t =
ChunkDistributorData<DefaultChunkDistributorConfig, ThreadSafePolicy, ChunkQueuePusher<ChunkQueueData_t>>;
using ChunkSenderData_t =
ChunkSenderData<MAX_CHUNKS_ALLOCATED_PER_PUBLISHER_SIMULTANEOUSLY, ChunkDistributorData_t>;
using ChunkQueueData_t = PublisherChunkQueueData_t;
using ChunkDistributorData_t = PublisherChunkDistributorData_t;
using ChunkSenderData_t = PublisherChunkSenderData_t;

ChunkSenderData_t m_chunkSenderData;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ struct SubscriberPortData : public BasePortData
const SubscriberOptions& subscriberOptions,
const mepoo::MemoryInfo& memoryInfo = mepoo::MemoryInfo()) noexcept;

/// @todo iox-#1051 remove these aliases here and only depend on pub_sub_port_types.hpp
/// (move relevant types and constants there)
using ChunkQueueData_t = iox::popo::SubscriberChunkQueueData_t;
using ChunkReceiverData_t = iox::popo::SubscriberChunkReceiverData_t;
using ChunkQueueData_t = SubscriberChunkQueueData_t;
using ChunkReceiverData_t = SubscriberChunkReceiverData_t;

ChunkReceiverData_t m_chunkReceiverData;

Expand Down
Loading