diff --git a/ecal/core/include/ecal/ecal_publisher.h b/ecal/core/include/ecal/ecal_publisher.h index 7620f45..da458ea 100644 --- a/ecal/core/include/ecal/ecal_publisher.h +++ b/ecal/core/include/ecal/ecal_publisher.h @@ -84,7 +84,7 @@ namespace eCAL * @param data_type_info_ Topic data type information (encoding, type, descriptor). * @param config_ Optional configuration parameters. **/ - ECAL_API CPublisher(const std::string& topic_name_, const SDataTypeInformation& data_type_info_, const PubConfig& config_ = {}); + ECAL_API CPublisher(const std::string& topic_name_, const SDataTypeInformation& data_type_info_, const Publisher::Configuration& config_ = {}); /** * @brief Constructor. @@ -92,7 +92,7 @@ namespace eCAL * @param topic_name_ Unique topic name. * @param config_ Optional configuration parameters. **/ - ECAL_API explicit CPublisher(const std::string& topic_name_, const PubConfig& config_ = {}); + ECAL_API explicit CPublisher(const std::string& topic_name_, const Publisher::Configuration& config_ = {}); /** * @brief Destructor. @@ -128,7 +128,7 @@ namespace eCAL * * @return True if it succeeds, false if it fails. **/ - ECAL_API bool Create(const std::string& topic_name_, const SDataTypeInformation& data_type_info_, const PubConfig& config_ = {}); + ECAL_API bool Create(const std::string& topic_name_, const SDataTypeInformation& data_type_info_, const Publisher::Configuration& config_ = {}); /** * @brief Creates this object. diff --git a/ecal/core/include/ecal/ecal_publisher_config.h b/ecal/core/include/ecal/ecal_publisher_config.h index d77b030..58b1fb1 100644 --- a/ecal/core/include/ecal/ecal_publisher_config.h +++ b/ecal/core/include/ecal/ecal_publisher_config.h @@ -30,37 +30,49 @@ namespace eCAL { - struct ECAL_API SHMPubConfig + namespace Publisher { - TLayer::eSendMode send_mode = TLayer::smode_auto; //!< shm layer send mode (default auto) - bool zero_copy_mode = false; //!< enable zero copy shared memory transport mode - int acknowledge_timeout_ms = 0; /*!< force connected subscribers to send acknowledge event after processing the message - the publisher send call is blocked on this event with this timeout (0 == no handshake) */ - size_t memfile_min_size_bytes = 4096; //!< default memory file size for new publisher - size_t memfile_reserve_percent = 50; //!< dynamic file size reserve before recreating memory file if topic size changes - size_t memfile_buffer_count = 1; //!< maximum number of used buffers (needs to be greater than 1, default = 1) - }; + namespace SHM + { + struct ECAL_API Configuration + { + TLayer::eSendMode send_mode = TLayer::smode_auto; //!< shm layer send mode (default auto) + bool zero_copy_mode = false; //!< enable zero copy shared memory transport mode + int acknowledge_timeout_ms = 0; /*!< force connected subscribers to send acknowledge event after processing the message + the publisher send call is blocked on this event with this timeout (0 == no handshake) */ + size_t memfile_min_size_bytes = 4096; //!< default memory file size for new publisher + size_t memfile_reserve_percent = 50; //!< dynamic file size reserve before recreating memory file if topic size changes + size_t memfile_buffer_count = 1; //!< maximum number of used buffers (needs to be greater than 1, default = 1) + }; + } - struct ECAL_API UDPPubConfig - { - TLayer::eSendMode send_mode = TLayer::smode_auto; //!< udp layer send mode (default auto) - int sndbuf_size_bytes = (5*1024*1024); //!< udp send buffer size in bytes (default 5MB) - }; + namespace UDP + { + struct ECAL_API Configuration + { + TLayer::eSendMode send_mode = TLayer::smode_auto; //!< udp layer send mode (default auto) + int sndbuf_size_bytes = (5*1024*1024); //!< udp send buffer size in bytes (default 5MB) + }; + } - struct ECAL_API TCPPubConfig - { - TLayer::eSendMode send_mode = TLayer::smode_off; //!< tcp layer send mode (default off) - }; + namespace TCP + { + struct ECAL_API Configuration + { + TLayer::eSendMode send_mode = TLayer::smode_off; //!< tcp layer send mode (default off) + }; + } - struct ECAL_API PubConfig - { - PubConfig(); + struct ECAL_API Configuration + { + Configuration(); - SHMPubConfig shm; - UDPPubConfig udp; - TCPPubConfig tcp; + SHM::Configuration shm; + UDP::Configuration udp; + TCP::Configuration tcp; - bool share_topic_type = true; //!< share topic type via registration - bool share_topic_description = true; //!< share topic description via registration - }; + bool share_topic_type = true; //!< share topic type via registration + bool share_topic_description = true; //!< share topic description via registration + }; + } } diff --git a/ecal/core/include/ecal/msg/capnproto/publisher.h b/ecal/core/include/ecal/msg/capnproto/publisher.h index 35ff623..bf6b3d6 100644 --- a/ecal/core/include/ecal/msg/capnproto/publisher.h +++ b/ecal/core/include/ecal/msg/capnproto/publisher.h @@ -101,7 +101,7 @@ namespace eCAL * @param topic_name_ Unique topic name. * @param config_ Optional configuration parameters. **/ - CPublisher(const std::string& topic_name_, const eCAL::PubConfig& config_ = {}) + CPublisher(const std::string& topic_name_, const eCAL::Publisher::Configuration& config_ = {}) : eCAL::CPublisher(topic_name_, GetDataTypeInformation(), config_) , builder(std::make_unique()) , root_builder(builder->initRoot()) @@ -150,7 +150,7 @@ namespace eCAL * * @return True if it succeeds, false if it fails. **/ - bool Create(const std::string& topic_name_, const eCAL::PubConfig& config_ = {}) + bool Create(const std::string& topic_name_, const eCAL::Publisher::Configuration& config_ = {}) { return(eCAL::CPublisher::Create(topic_name_, GetDataTypeInformation(), config_)); } diff --git a/ecal/core/include/ecal/msg/flatbuffers/publisher.h b/ecal/core/include/ecal/msg/flatbuffers/publisher.h index caae741..6e9e836 100644 --- a/ecal/core/include/ecal/msg/flatbuffers/publisher.h +++ b/ecal/core/include/ecal/msg/flatbuffers/publisher.h @@ -53,7 +53,7 @@ namespace eCAL * @param topic_name_ Unique topic name. * @param config_ Optional configuration parameters. **/ - CPublisher(const std::string& topic_name_, const eCAL::PubConfig& config_ = {}) : CMsgPublisher(topic_name_, GetDataTypeInformation(), config_) + CPublisher(const std::string& topic_name_, const eCAL::Publisher::Configuration& config_ = {}) : CMsgPublisher(topic_name_, GetDataTypeInformation(), config_) { } @@ -85,7 +85,7 @@ namespace eCAL * * @return True if it succeeds, false if it fails. **/ - bool Create(const std::string& topic_name_, const eCAL::PubConfig& config_ = {}) + bool Create(const std::string& topic_name_, const eCAL::Publisher::Configuration& config_ = {}) { return(CMsgPublisher::Create(topic_name_, GetDataTypeInformation(), config_)); } diff --git a/ecal/core/include/ecal/msg/messagepack/publisher.h b/ecal/core/include/ecal/msg/messagepack/publisher.h index 983e004..70a7298 100644 --- a/ecal/core/include/ecal/msg/messagepack/publisher.h +++ b/ecal/core/include/ecal/msg/messagepack/publisher.h @@ -56,7 +56,7 @@ namespace eCAL * @param topic_name_ Unique topic name. * @param config_ Optional configuration parameters. **/ - CPublisher(const std::string& topic_name_, const eCAL::PubConfig& config_ = {}) : CMsgPublisher(topic_name_, GetDataTypeInformation(), config_) + CPublisher(const std::string& topic_name_, const eCAL::Publisher::Configuration& config_ = {}) : CMsgPublisher(topic_name_, GetDataTypeInformation(), config_) { } @@ -88,7 +88,7 @@ namespace eCAL * * @return True if it succeeds, false if it fails. **/ - bool Create(const std::string& topic_name_, const eCAL::PubConfig& config_ = {}) + bool Create(const std::string& topic_name_, const eCAL::Publisher::Configuration& config_ = {}) { return(CMsgPublisher::Create(topic_name_, GetDataTypeInformation(), config_)); } diff --git a/ecal/core/include/ecal/msg/protobuf/dynamic_publisher.h b/ecal/core/include/ecal/msg/protobuf/dynamic_publisher.h index 7982f71..1a7ca4f 100644 --- a/ecal/core/include/ecal/msg/protobuf/dynamic_publisher.h +++ b/ecal/core/include/ecal/msg/protobuf/dynamic_publisher.h @@ -62,7 +62,7 @@ namespace eCAL * @param msg_ Protobuf message object. * @param config_ Optional configuration parameters. **/ - CDynamicPublisher(const std::string& topic_name_, const std::shared_ptr& msg_, const eCAL::PubConfig& config_ = {}) + CDynamicPublisher(const std::string& topic_name_, const std::shared_ptr& msg_, const eCAL::Publisher::Configuration& config_ = {}) : CMsgPublisher(topic_name_, GetTopicInformationFromMessage(msg_.get()), config_) , m_msg{ msg_ } {} diff --git a/ecal/core/include/ecal/msg/protobuf/publisher.h b/ecal/core/include/ecal/msg/protobuf/publisher.h index fba961f..e583292 100644 --- a/ecal/core/include/ecal/msg/protobuf/publisher.h +++ b/ecal/core/include/ecal/msg/protobuf/publisher.h @@ -107,7 +107,7 @@ namespace eCAL // where the vtable is not created yet, or it's destructed. // Probably we can handle the Message publishers differently. One message publisher class and then one class for payloads and getting type // descriptor information. - explicit CPublisher(const std::string& topic_name_, const eCAL::PubConfig& config_ = {}) : eCAL::CPublisher(topic_name_, CPublisher::GetDataTypeInformation(), config_) + explicit CPublisher(const std::string& topic_name_, const eCAL::Publisher::Configuration& config_ = {}) : eCAL::CPublisher(topic_name_, CPublisher::GetDataTypeInformation(), config_) { } @@ -144,7 +144,7 @@ namespace eCAL * * @return True if it succeeds, false if it fails. **/ - bool Create(const std::string& topic_name_, const eCAL::PubConfig& config_ = {}) + bool Create(const std::string& topic_name_, const eCAL::Publisher::Configuration& config_ = {}) { return(eCAL::CPublisher::Create(topic_name_, GetDataTypeInformation(), config_)); } diff --git a/ecal/core/include/ecal/msg/publisher.h b/ecal/core/include/ecal/msg/publisher.h index 7c6cbb9..5f3b062 100644 --- a/ecal/core/include/ecal/msg/publisher.h +++ b/ecal/core/include/ecal/msg/publisher.h @@ -63,7 +63,7 @@ namespace eCAL * @param data_type_info_ Topic data type information (encoding, type, descriptor). * @param config_ Optional configuration parameters. **/ - CMsgPublisher(const std::string& topic_name_, const struct SDataTypeInformation& data_type_info_, const PubConfig& config_ = {}) : CPublisher(topic_name_, data_type_info_, config_) + CMsgPublisher(const std::string& topic_name_, const struct SDataTypeInformation& data_type_info_, const Publisher::Configuration& config_ = {}) : CPublisher(topic_name_, data_type_info_, config_) { } @@ -74,7 +74,7 @@ namespace eCAL * @param topic_name_ Unique topic name. * @param config_ Optional configuration parameters. **/ - explicit CMsgPublisher(const std::string& topic_name_, const PubConfig& config_ = {}) : CMsgPublisher(topic_name_, GetDataTypeInformation(), config_) + explicit CMsgPublisher(const std::string& topic_name_, const Publisher::Configuration& config_ = {}) : CMsgPublisher(topic_name_, GetDataTypeInformation(), config_) { } @@ -109,7 +109,7 @@ namespace eCAL * * @return True if it succeeds, false if it fails. **/ - bool Create(const std::string& topic_name_, const struct SDataTypeInformation& data_type_info_, const PubConfig& config_ = {}) + bool Create(const std::string& topic_name_, const struct SDataTypeInformation& data_type_info_, const Publisher::Configuration& config_ = {}) { return(CPublisher::Create(topic_name_, data_type_info_, config_)); } diff --git a/ecal/core/include/ecal/msg/string/publisher.h b/ecal/core/include/ecal/msg/string/publisher.h index f90a916..f1d45d5 100644 --- a/ecal/core/include/ecal/msg/string/publisher.h +++ b/ecal/core/include/ecal/msg/string/publisher.h @@ -60,7 +60,7 @@ namespace eCAL // call the function via its class because it's a virtual function that is called in constructor/destructor,- // where the vtable is not created yet, or it's destructed. - explicit CPublisher(const std::string& topic_name_, const eCAL::PubConfig& config_ = {}) : CMsgPublisher(topic_name_, GetDataTypeInformation(), config_) + explicit CPublisher(const std::string& topic_name_, const eCAL::Publisher::Configuration& config_ = {}) : CMsgPublisher(topic_name_, GetDataTypeInformation(), config_) { } @@ -92,7 +92,7 @@ namespace eCAL * * @return True if it succeeds, false if it fails. **/ - bool Create(const std::string& topic_name_, const eCAL::PubConfig& config_ = {}) + bool Create(const std::string& topic_name_, const eCAL::Publisher::Configuration& config_ = {}) { return(CMsgPublisher::Create(topic_name_, GetDataTypeInformation(), config_)); } diff --git a/ecal/core/src/pubsub/ecal_publisher.cpp b/ecal/core/src/pubsub/ecal_publisher.cpp index e4f8230..e9087c7 100644 --- a/ecal/core/src/pubsub/ecal_publisher.cpp +++ b/ecal/core/src/pubsub/ecal_publisher.cpp @@ -43,13 +43,13 @@ namespace eCAL { } - CPublisher::CPublisher(const std::string& topic_name_, const SDataTypeInformation& data_type_info_, const PubConfig& config_) + CPublisher::CPublisher(const std::string& topic_name_, const SDataTypeInformation& data_type_info_, const Publisher::Configuration& config_) : CPublisher() { CPublisher::Create(topic_name_, data_type_info_, config_); } - CPublisher::CPublisher(const std::string& topic_name_, const PubConfig& config_) + CPublisher::CPublisher(const std::string& topic_name_, const Publisher::Configuration& config_) : CPublisher(topic_name_, SDataTypeInformation{}, config_) {} @@ -90,7 +90,7 @@ namespace eCAL return *this; } - bool CPublisher::Create(const std::string& topic_name_, const SDataTypeInformation& data_type_info_, const PubConfig& config_) + bool CPublisher::Create(const std::string& topic_name_, const SDataTypeInformation& data_type_info_, const Publisher::Configuration& config_) { if (m_created) return(false); if (topic_name_.empty()) return(false); diff --git a/ecal/core/src/pubsub/ecal_publisher_config.cpp b/ecal/core/src/pubsub/ecal_publisher_config.cpp index c6dcee3..77bde4e 100644 --- a/ecal/core/src/pubsub/ecal_publisher_config.cpp +++ b/ecal/core/src/pubsub/ecal_publisher_config.cpp @@ -26,24 +26,27 @@ namespace eCAL { - PubConfig::PubConfig() : - share_topic_type(eCAL::Config::IsTopicTypeSharingEnabled()), - share_topic_description(eCAL::Config::IsTopicDescriptionSharingEnabled()) + namespace Publisher { - // shm config - shm.send_mode = eCAL::Config::GetPublisherShmMode(); - shm.zero_copy_mode = eCAL::Config::IsMemfileZerocopyEnabled(); - shm.acknowledge_timeout_ms = eCAL::Config::GetMemfileAckTimeoutMs(); + Configuration::Configuration() : + share_topic_type(eCAL::Config::IsTopicTypeSharingEnabled()), + share_topic_description(eCAL::Config::IsTopicDescriptionSharingEnabled()) + { + // shm config + shm.send_mode = eCAL::Config::GetPublisherShmMode(); + shm.zero_copy_mode = eCAL::Config::IsMemfileZerocopyEnabled(); + shm.acknowledge_timeout_ms = eCAL::Config::GetMemfileAckTimeoutMs(); - shm.memfile_min_size_bytes = eCAL::Config::GetMemfileMinsizeBytes(); - shm.memfile_reserve_percent = eCAL::Config::GetMemfileOverprovisioningPercentage(); - shm.memfile_buffer_count = eCAL::Config::GetMemfileBufferCount(); + shm.memfile_min_size_bytes = eCAL::Config::GetMemfileMinsizeBytes(); + shm.memfile_reserve_percent = eCAL::Config::GetMemfileOverprovisioningPercentage(); + shm.memfile_buffer_count = eCAL::Config::GetMemfileBufferCount(); - // udp config - udp.send_mode = eCAL::Config::GetPublisherUdpMulticastMode(); - udp.sndbuf_size_bytes = eCAL::Config::GetUdpMulticastSndBufSizeBytes(); + // udp config + udp.send_mode = eCAL::Config::GetPublisherUdpMulticastMode(); + udp.sndbuf_size_bytes = eCAL::Config::GetUdpMulticastSndBufSizeBytes(); - // tcp config - tcp.send_mode = eCAL::Config::GetPublisherTcpMode(); + // tcp config + tcp.send_mode = eCAL::Config::GetPublisherTcpMode(); + } } } diff --git a/ecal/core/src/readwrite/ecal_writer.cpp b/ecal/core/src/readwrite/ecal_writer.cpp index 98ef61f..0fa45d9 100644 --- a/ecal/core/src/readwrite/ecal_writer.cpp +++ b/ecal/core/src/readwrite/ecal_writer.cpp @@ -67,7 +67,7 @@ namespace std namespace eCAL { - CDataWriter::CDataWriter(const std::string& topic_name_, const SDataTypeInformation& topic_info_, const PubConfig& config_) : + CDataWriter::CDataWriter(const std::string& topic_name_, const SDataTypeInformation& topic_info_, const Publisher::Configuration& config_) : m_host_name(Process::GetHostName()), m_host_group_name(Process::GetHostGroupName()), m_pid(Process::GetProcessID()), diff --git a/ecal/core/src/readwrite/ecal_writer.h b/ecal/core/src/readwrite/ecal_writer.h index 2b6a8e1..9b42689 100644 --- a/ecal/core/src/readwrite/ecal_writer.h +++ b/ecal/core/src/readwrite/ecal_writer.h @@ -85,7 +85,7 @@ namespace eCAL } }; - CDataWriter(const std::string& topic_name_, const SDataTypeInformation& topic_info_, const PubConfig& config_ = {}); + CDataWriter(const std::string& topic_name_, const SDataTypeInformation& topic_info_, const Publisher::Configuration& config_ = {}); ~CDataWriter(); bool SetDataTypeInformation(const SDataTypeInformation& topic_info_); @@ -148,7 +148,7 @@ namespace eCAL SDataTypeInformation m_topic_info; std::map m_attr; size_t m_topic_size; - PubConfig m_config; + Publisher::Configuration m_config; std::vector m_payload_buffer; diff --git a/ecal/core/src/readwrite/shm/ecal_writer_shm.cpp b/ecal/core/src/readwrite/shm/ecal_writer_shm.cpp index c343fbf..3483e3f 100644 --- a/ecal/core/src/readwrite/shm/ecal_writer_shm.cpp +++ b/ecal/core/src/readwrite/shm/ecal_writer_shm.cpp @@ -32,7 +32,7 @@ namespace eCAL { const std::string CDataWriterSHM::m_memfile_base_name = "ecal_"; - CDataWriterSHM::CDataWriterSHM(const std::string& /*host_name_*/, const std::string& topic_name_, const std::string& /*topic_id_*/, const SHMPubConfig& shm_config_) : + CDataWriterSHM::CDataWriterSHM(const std::string& /*host_name_*/, const std::string& topic_name_, const std::string& /*topic_id_*/, const Publisher::SHM::Configuration& shm_config_) : m_config(shm_config_) { m_topic_name = topic_name_; diff --git a/ecal/core/src/readwrite/shm/ecal_writer_shm.h b/ecal/core/src/readwrite/shm/ecal_writer_shm.h index 2d3ad9e..e53115d 100644 --- a/ecal/core/src/readwrite/shm/ecal_writer_shm.h +++ b/ecal/core/src/readwrite/shm/ecal_writer_shm.h @@ -38,7 +38,7 @@ namespace eCAL class CDataWriterSHM : public CDataWriterBase { public: - CDataWriterSHM(const std::string& host_name_, const std::string& topic_name_, const std::string& topic_id_, const SHMPubConfig& shm_config_); + CDataWriterSHM(const std::string& host_name_, const std::string& topic_name_, const std::string& topic_id_, const Publisher::SHM::Configuration& shm_config_); SWriterInfo GetInfo() override; @@ -53,7 +53,7 @@ namespace eCAL Registration::ConnectionPar GetConnectionParameter() override; protected: - SHMPubConfig m_config; + Publisher::SHM::Configuration m_config; size_t m_write_idx = 0; std::vector> m_memory_file_vec; diff --git a/ecal/core/src/readwrite/tcp/ecal_writer_tcp.cpp b/ecal/core/src/readwrite/tcp/ecal_writer_tcp.cpp index 0253e4c..6334a40 100644 --- a/ecal/core/src/readwrite/tcp/ecal_writer_tcp.cpp +++ b/ecal/core/src/readwrite/tcp/ecal_writer_tcp.cpp @@ -38,7 +38,7 @@ namespace eCAL std::mutex CDataWriterTCP::g_tcp_writer_executor_mtx; std::shared_ptr CDataWriterTCP::g_tcp_writer_executor; - CDataWriterTCP::CDataWriterTCP(const std::string& host_name_, const std::string& topic_name_, const std::string& topic_id_, const TCPPubConfig& tcp_config_) : + CDataWriterTCP::CDataWriterTCP(const std::string& host_name_, const std::string& topic_name_, const std::string& topic_id_, const Publisher::TCP::Configuration& tcp_config_) : m_config(tcp_config_) { { diff --git a/ecal/core/src/readwrite/tcp/ecal_writer_tcp.h b/ecal/core/src/readwrite/tcp/ecal_writer_tcp.h index b757b42..6258ae2 100644 --- a/ecal/core/src/readwrite/tcp/ecal_writer_tcp.h +++ b/ecal/core/src/readwrite/tcp/ecal_writer_tcp.h @@ -40,7 +40,7 @@ namespace eCAL class CDataWriterTCP : public CDataWriterBase { public: - CDataWriterTCP(const std::string& host_name_, const std::string& topic_name_, const std::string& topic_id_, const TCPPubConfig& tcp_config_); + CDataWriterTCP(const std::string& host_name_, const std::string& topic_name_, const std::string& topic_id_, const Publisher::TCP::Configuration& tcp_config_); SWriterInfo GetInfo() override; @@ -49,7 +49,7 @@ namespace eCAL Registration::ConnectionPar GetConnectionParameter() override; private: - TCPPubConfig m_config; + Publisher::TCP::Configuration m_config; std::vector m_header_buffer; diff --git a/ecal/core/src/readwrite/udp/ecal_writer_udp.cpp b/ecal/core/src/readwrite/udp/ecal_writer_udp.cpp index 40e657c..8466a38 100644 --- a/ecal/core/src/readwrite/udp/ecal_writer_udp.cpp +++ b/ecal/core/src/readwrite/udp/ecal_writer_udp.cpp @@ -31,7 +31,7 @@ namespace eCAL { - CDataWriterUdpMC::CDataWriterUdpMC(const std::string& host_name_, const std::string& topic_name_, const std::string& topic_id_, const UDPPubConfig& udp_config_) : + CDataWriterUdpMC::CDataWriterUdpMC(const std::string& host_name_, const std::string& topic_name_, const std::string& topic_id_, const Publisher::UDP::Configuration& udp_config_) : m_config(udp_config_) { m_host_name = host_name_; diff --git a/ecal/core/src/readwrite/udp/ecal_writer_udp.h b/ecal/core/src/readwrite/udp/ecal_writer_udp.h index ca87ded..a9b2d4e 100644 --- a/ecal/core/src/readwrite/udp/ecal_writer_udp.h +++ b/ecal/core/src/readwrite/udp/ecal_writer_udp.h @@ -37,14 +37,14 @@ namespace eCAL class CDataWriterUdpMC : public CDataWriterBase { public: - CDataWriterUdpMC(const std::string& host_name_, const std::string& topic_name_, const std::string& topic_id_, const UDPPubConfig& udp_config_); + CDataWriterUdpMC(const std::string& host_name_, const std::string& topic_name_, const std::string& topic_id_, const Publisher::UDP::Configuration& udp_config_); SWriterInfo GetInfo() override; bool Write(const void* buf_, const SWriterAttr& attr_) override; protected: - UDPPubConfig m_config; + Publisher::UDP::Configuration m_config; std::vector m_sample_buffer; std::shared_ptr m_sample_sender_loopback; diff --git a/ecal/samples/cpp/benchmarks/datarate_snd/src/datarate_snd.cpp b/ecal/samples/cpp/benchmarks/datarate_snd/src/datarate_snd.cpp index 0e9b133..6349ee7 100644 --- a/ecal/samples/cpp/benchmarks/datarate_snd/src/datarate_snd.cpp +++ b/ecal/samples/cpp/benchmarks/datarate_snd/src/datarate_snd.cpp @@ -65,7 +65,7 @@ int main(int argc, char **argv) eCAL::Initialize(argc, argv, "datarate_snd"); // create publisher config - eCAL::PubConfig pub_config; + eCAL::Publisher::Configuration pub_config; // set zero copy pub_config.shm.zero_copy_mode = zero_copy; // set buffering diff --git a/ecal/samples/cpp/benchmarks/latency_snd/src/latency_snd.cpp b/ecal/samples/cpp/benchmarks/latency_snd/src/latency_snd.cpp index d790841..bddb0e2 100644 --- a/ecal/samples/cpp/benchmarks/latency_snd/src/latency_snd.cpp +++ b/ecal/samples/cpp/benchmarks/latency_snd/src/latency_snd.cpp @@ -50,7 +50,7 @@ void do_run(const int runs, int snd_size /*kB*/, int mem_buffer, bool zero_copy) eCAL::Initialize(0, nullptr, "latency_snd"); // create publisher config - eCAL::PubConfig pub_config; + eCAL::Publisher::Configuration pub_config; // set number of publisher memory buffers pub_config.shm.memfile_buffer_count = mem_buffer; // enable zero copy mode diff --git a/ecal/samples/cpp/benchmarks/performance_snd/src/performance_snd.cpp b/ecal/samples/cpp/benchmarks/performance_snd/src/performance_snd.cpp index 3e24f81..0e99485 100644 --- a/ecal/samples/cpp/benchmarks/performance_snd/src/performance_snd.cpp +++ b/ecal/samples/cpp/benchmarks/performance_snd/src/performance_snd.cpp @@ -46,7 +46,7 @@ int main(int argc, char **argv) CBinaryPayload binary_payload(payload_size); // create publisher config - eCAL::PubConfig pub_config; + eCAL::Publisher::Configuration pub_config; // enable zero copy mode std::cout << "Zero copy mode: " << zero_copy << std::endl; diff --git a/ecal/samples/cpp/benchmarks/pubsub_throughput/src/pubsub_throughput.cpp b/ecal/samples/cpp/benchmarks/pubsub_throughput/src/pubsub_throughput.cpp index 75e6dbd..a7f4843 100644 --- a/ecal/samples/cpp/benchmarks/pubsub_throughput/src/pubsub_throughput.cpp +++ b/ecal/samples/cpp/benchmarks/pubsub_throughput/src/pubsub_throughput.cpp @@ -34,7 +34,7 @@ void throughput_test(int snd_size, int snd_loops, eCAL::TLayer::eTransportLayer CBinaryPayload payload(snd_size); // create publisher config - eCAL::PubConfig pub_config; + eCAL::Publisher::Configuration pub_config; // set transport layer pub_config.shm.send_mode = eCAL::TLayer::smode_off; diff --git a/ecal/samples/cpp/pubsub/binary/binary_zero_copy_snd/src/binary_zero_copy_snd.cpp b/ecal/samples/cpp/pubsub/binary/binary_zero_copy_snd/src/binary_zero_copy_snd.cpp index 467b9ec..4524357 100644 --- a/ecal/samples/cpp/pubsub/binary/binary_zero_copy_snd/src/binary_zero_copy_snd.cpp +++ b/ecal/samples/cpp/pubsub/binary/binary_zero_copy_snd/src/binary_zero_copy_snd.cpp @@ -124,7 +124,7 @@ int main(int argc, char** argv) eCAL::Initialize(argc, argv, nodeName); // create publisher config - eCAL::PubConfig pub_config; + eCAL::Publisher::Configuration pub_config; // turn zero copy mode on pub_config.shm.zero_copy_mode = true; diff --git a/ecal/samples/cpp/pubsub/protobuf/person_snd_tcp/src/person_snd_tcp.cpp b/ecal/samples/cpp/pubsub/protobuf/person_snd_tcp/src/person_snd_tcp.cpp index eb51acb..17e1be6 100644 --- a/ecal/samples/cpp/pubsub/protobuf/person_snd_tcp/src/person_snd_tcp.cpp +++ b/ecal/samples/cpp/pubsub/protobuf/person_snd_tcp/src/person_snd_tcp.cpp @@ -33,7 +33,7 @@ int main(int argc, char **argv) eCAL::Process::SetState(proc_sev_healthy, proc_sev_level1, "I feel good !"); // create a publisher config - eCAL::PubConfig pub_config; + eCAL::Publisher::Configuration pub_config; // switch shm and udp layer off, tcp layer on pub_config.shm.send_mode = eCAL::TLayer::smode_off; diff --git a/ecal/samples/cpp/pubsub/protobuf/person_snd_udp/src/person_snd_udp.cpp b/ecal/samples/cpp/pubsub/protobuf/person_snd_udp/src/person_snd_udp.cpp index 2efd08c..aea8028 100644 --- a/ecal/samples/cpp/pubsub/protobuf/person_snd_udp/src/person_snd_udp.cpp +++ b/ecal/samples/cpp/pubsub/protobuf/person_snd_udp/src/person_snd_udp.cpp @@ -33,7 +33,7 @@ int main(int argc, char **argv) eCAL::Process::SetState(proc_sev_healthy, proc_sev_level1, "I feel good !"); // create a publisher config - eCAL::PubConfig pub_config; + eCAL::Publisher::Configuration pub_config; // switch shm and tcp layer off, udp layer on pub_config.shm.send_mode = eCAL::TLayer::smode_off; diff --git a/ecal/tests/cpp/pubsub_test/src/pubsub_acknowledge.cpp b/ecal/tests/cpp/pubsub_test/src/pubsub_acknowledge.cpp index 35df9e0..0bb4549 100644 --- a/ecal/tests/cpp/pubsub_test/src/pubsub_acknowledge.cpp +++ b/ecal/tests/cpp/pubsub_test/src/pubsub_acknowledge.cpp @@ -54,7 +54,7 @@ TEST(core_cpp_pubsub, TimeoutAcknowledgment) eCAL::Util::EnableLoopback(true); // create publisher config - eCAL::PubConfig pub_config; + eCAL::Publisher::Configuration pub_config; pub_config.shm.acknowledge_timeout_ms = 500; // create publisher diff --git a/ecal/tests/cpp/pubsub_test/src/pubsub_multibuffer.cpp b/ecal/tests/cpp/pubsub_test/src/pubsub_multibuffer.cpp index 95783ed..331b2c5 100644 --- a/ecal/tests/cpp/pubsub_test/src/pubsub_multibuffer.cpp +++ b/ecal/tests/cpp/pubsub_test/src/pubsub_multibuffer.cpp @@ -76,7 +76,7 @@ std::vector multibuffer_pub_sub_test(int buffer_count, bool zero_copy, int eCAL::CSubscriber sub("A"); // create publisher config - eCAL::PubConfig pub_config; + eCAL::Publisher::Configuration pub_config; // set transport layer pub_config.shm.send_mode = eCAL::TLayer::smode_on; pub_config.udp.send_mode = eCAL::TLayer::smode_off; diff --git a/ecal/tests/cpp/pubsub_test/src/pubsub_test_shm.cpp b/ecal/tests/cpp/pubsub_test/src/pubsub_test_shm.cpp index 11436f7..5d3ed14 100644 --- a/ecal/tests/cpp/pubsub_test/src/pubsub_test_shm.cpp +++ b/ecal/tests/cpp/pubsub_test/src/pubsub_test_shm.cpp @@ -58,7 +58,7 @@ TEST(core_cpp_pubsub, ZeroPayloadMessageSHM) eCAL::CSubscriber sub("A"); // create publisher config - eCAL::PubConfig pub_config; + eCAL::Publisher::Configuration pub_config; // set transport layer pub_config.shm.send_mode = eCAL::TLayer::smode_on; pub_config.udp.send_mode = eCAL::TLayer::smode_off; @@ -113,7 +113,7 @@ TEST(core_cpp_pubsub, MultipleSendsSHM) eCAL::string::CSubscriber sub("A"); // create publisher config - eCAL::PubConfig pub_config; + eCAL::Publisher::Configuration pub_config; // set transport layer pub_config.shm.send_mode = eCAL::TLayer::smode_on; pub_config.udp.send_mode = eCAL::TLayer::smode_off; diff --git a/ecal/tests/cpp/pubsub_test/src/pubsub_test_udp.cpp b/ecal/tests/cpp/pubsub_test/src/pubsub_test_udp.cpp index 0093d3c..f79652e 100644 --- a/ecal/tests/cpp/pubsub_test/src/pubsub_test_udp.cpp +++ b/ecal/tests/cpp/pubsub_test/src/pubsub_test_udp.cpp @@ -58,7 +58,7 @@ TEST(core_cpp_pubsub, ZeroPayloadMessageUDP) eCAL::CSubscriber sub("A"); // create publisher config - eCAL::PubConfig pub_config; + eCAL::Publisher::Configuration pub_config; // set transport layer pub_config.shm.send_mode = eCAL::TLayer::smode_off; pub_config.udp.send_mode = eCAL::TLayer::smode_on; @@ -113,7 +113,7 @@ TEST(core_cpp_pubsub, MultipleSendsUDP) eCAL::string::CSubscriber sub("A"); // create publisher config - eCAL::PubConfig pub_config; + eCAL::Publisher::Configuration pub_config; // set transport layer pub_config.shm.send_mode = eCAL::TLayer::smode_off; pub_config.udp.send_mode = eCAL::TLayer::smode_on;