Skip to content

Commit

Permalink
Use custom types in publisher config.
Browse files Browse the repository at this point in the history
  • Loading branch information
Peguen committed May 22, 2024
1 parent 80ef2a0 commit cafb419
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 23 deletions.
37 changes: 19 additions & 18 deletions ecal/core/include/ecal/config/ecal_publisher_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
#pragma once

#include <ecal/ecal_os.h>
#include <ecal/types/ecal_custom_data_types.h>

#include <cstddef>

Expand All @@ -98,46 +99,46 @@ namespace eCAL
{
namespace SHM
{
struct ECAL_API Configuration
struct Configuration
{
bool enable; //!< enable layer
bool zero_copy_mode; //!< enable zero copy shared memory transport mode
int acknowledge_timeout_ms; /*!< 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; //!< default memory file size for new publisher
size_t memfile_reserve_percent; //!< dynamic file size reserve before recreating memory file if topic size changes
size_t memfile_buffer_count; //!< maximum number of used buffers (needs to be greater than 1, default = 1)
bool enable; //!< enable layer
bool zero_copy_mode; //!< enable zero copy shared memory transport mode
unsigned int acknowledge_timeout_ms; /*!< 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) */
Config::ConstrainedInteger<4096, 4096> memfile_min_size_bytes; //!< default memory file size for new publisher
Config::ConstrainedInteger<50, 1, 100> memfile_reserve_percent; //!< dynamic file size reserve before recreating memory file if topic size changes
Config::ConstrainedInteger<1, 1> memfile_buffer_count; //!< maximum number of used buffers (needs to be greater than 1, default = 1)
};
}

namespace UDP
{
struct ECAL_API Configuration
struct Configuration
{
bool enable; //!< enable layer
bool loopback; //!< enable to receive udp messages on the same local machine
int sndbuf_size_bytes; //!< udp send buffer size in bytes (default 5MB)
bool enable; //!< enable layer
bool loopback; //!< enable to receive udp messages on the same local machine
Config::ConstrainedInteger<5242880, 1024> sndbuf_size_bytes; //!< udp send buffer size in bytes (default 5MB)
};
}

namespace TCP
{
struct ECAL_API Configuration
struct Configuration
{
bool enable; //!< enable layer
bool enable; //!< enable layer
};
}

struct ECAL_API Configuration
struct Configuration
{
Configuration();
ECAL_API Configuration();

SHM::Configuration shm;
UDP::Configuration udp;
TCP::Configuration tcp;

bool share_topic_type; //!< share topic type via registration
bool share_topic_description; //!< share topic description via registration
bool share_topic_type; //!< share topic type via registration
bool share_topic_description; //!< share topic description via registration
};
}
}
10 changes: 5 additions & 5 deletions ecal/core/include/ecal/config/ecal_subscriber_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,31 +34,31 @@ namespace eCAL
{
namespace SHM
{
struct ECAL_API Configuration
struct Configuration
{
bool enable; //!< enable layer
};
}

namespace UDP
{
struct ECAL_API Configuration
struct Configuration
{
bool enable; //!< enable layer
};
}

namespace TCP
{
struct ECAL_API Configuration
struct Configuration
{
bool enable; //!< enable layer
};
}

struct ECAL_API Configuration
struct Configuration
{
Configuration();
ECAL_API Configuration();

SHM::Configuration shm;
UDP::Configuration udp;
Expand Down

0 comments on commit cafb419

Please sign in to comment.