-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a009e38
commit e0ffe4c
Showing
28 changed files
with
159 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* ========================= eCAL LICENSE ================================= | ||
* | ||
* Copyright (C) 2016 - 2019 Continental Corporation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* ========================= eCAL LICENSE ================================= | ||
*/ | ||
|
||
/** | ||
* @file ecal_publisher_config.h | ||
* @brief eCAL publisher configuration | ||
**/ | ||
|
||
#pragma once | ||
|
||
#include <ecal/ecal_tlayer.h> | ||
|
||
namespace eCAL | ||
{ | ||
struct ECAL_API SHMPubConfig | ||
{ | ||
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) | ||
}; | ||
|
||
struct ECAL_API TCPPubConfig | ||
{ | ||
TLayer::eSendMode send_mode = TLayer::smode_off; //!< tcp layer send mode (default off) | ||
}; | ||
|
||
struct ECAL_API PubConfig | ||
{ | ||
PubConfig(); | ||
|
||
SHMPubConfig shm; | ||
UDPPubConfig udp; | ||
TCPPubConfig tcp; | ||
|
||
bool share_topic_type = true; | ||
bool share_topic_description = true; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* ========================= eCAL LICENSE ================================= | ||
* | ||
* Copyright (C) 2016 - 2019 Continental Corporation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* ========================= eCAL LICENSE ================================= | ||
*/ | ||
|
||
/** | ||
* @brief eCAL publisher configuration | ||
**/ | ||
|
||
#include <ecal/ecal_config.h> | ||
#include <ecal/ecal_publisher_config.h> | ||
|
||
namespace eCAL | ||
{ | ||
PubConfig::PubConfig() : | ||
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(); | ||
|
||
// udp config | ||
udp.send_mode = eCAL::Config::GetPublisherUdpMulticastMode(); | ||
udp.sndbuf_size_bytes = eCAL::Config::GetUdpMulticastSndBufSizeBytes(); | ||
|
||
// tcp config | ||
tcp.send_mode = eCAL::Config::GetPublisherTcpMode(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.