| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
FlowControllerDescriptor.hpp
1// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#ifndef FASTDDS_RTPS_FLOWCONTROL__FLOWCONTROLLERDESCRIPTOR_HPP
16#define FASTDDS_RTPS_FLOWCONTROL__FLOWCONTROLLERDESCRIPTOR_HPP
17
18#include <string>
19
20#include <fastdds/rtps/attributes/ThreadSettings.hpp>
21
22#include "FlowControllerConsts.hpp"
23#include "FlowControllerSchedulerPolicy.hpp"
24
25 namespace eprosima {
26 namespace fastdds {
27 namespace rtps {
28
35 struct FlowControllerDescriptor
36{
38 std::string name = FASTDDS_FLOW_CONTROLLER_DEFAULT;
39
43 FlowControllerSchedulerPolicy scheduler = FlowControllerSchedulerPolicy::FIFO;
44
50 int32_t max_bytes_per_period = 0;
51
56 uint64_t period_ms = 100;
57
59 ThreadSettings sender_thread;
60
61 bool operator ==(
62 const FlowControllerDescriptor& b) const
63 {
64 return (this->name == b.name) &&
65 (this->scheduler == b.scheduler) &&
66 (this->max_bytes_per_period == b.max_bytes_per_period) &&
67 (this->period_ms == b.period_ms) &&
68 (this->sender_thread == b.sender_thread);
69 }
70
71};
72
73} // namespace rtps
74} // namespace fastdds
75} // namespace eprosima
76
77#endif // FASTDDS_RTPS_FLOWCONTROL__FLOWCONTROLLERDESCRIPTOR_HPP
eprosima::fastdds::rtps
Contains the RTPS protocol implementation.
eprosima::fastdds::rtps::FASTDDS_FLOW_CONTROLLER_DEFAULT
FASTDDS_EXPORTED_API const char *const FASTDDS_FLOW_CONTROLLER_DEFAULT
Name of the default flow controller.
eprosima::fastdds::rtps::FlowControllerSchedulerPolicy
FlowControllerSchedulerPolicy
Supported scheduler policy by a flow controller.
Definition FlowControllerSchedulerPolicy.hpp:31
eprosima::fastdds::rtps::FlowControllerSchedulerPolicy::FIFO
@ FIFO
FIFO scheduler policy: first written sample by user, first sample scheduled to be sent to network.
Definition FlowControllerSchedulerPolicy.hpp:33
eprosima::fastdds
eprosima
eProsima namespace.
eprosima::fastdds::rtps::FlowControllerDescriptor
Configuration values for creating flow controllers.
Definition FlowControllerDescriptor.hpp:36
eprosima::fastdds::rtps::FlowControllerDescriptor::scheduler
FlowControllerSchedulerPolicy scheduler
Scheduler policy used by the flow controller.
Definition FlowControllerDescriptor.hpp:43
eprosima::fastdds::rtps::FlowControllerDescriptor::operator==
bool operator==(const FlowControllerDescriptor &b) const
Definition FlowControllerDescriptor.hpp:61
eprosima::fastdds::rtps::FlowControllerDescriptor::period_ms
uint64_t period_ms
Period time in milliseconds.
Definition FlowControllerDescriptor.hpp:56
eprosima::fastdds::rtps::FlowControllerDescriptor::sender_thread
ThreadSettings sender_thread
Thread settings for the sender thread.
Definition FlowControllerDescriptor.hpp:59
eprosima::fastdds::rtps::FlowControllerDescriptor::name
std::string name
Name of the flow controller.
Definition FlowControllerDescriptor.hpp:38
eprosima::fastdds::rtps::FlowControllerDescriptor::max_bytes_per_period
int32_t max_bytes_per_period
Maximum number of bytes to be sent to network per period.
Definition FlowControllerDescriptor.hpp:50
eprosima::fastdds::rtps::ThreadSettings
Struct ThreadSettings to specify various thread settings.
Definition ThreadSettings.hpp:37