Fast DDS  Version 3.6.1.0
Fast DDS
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 
36 {
39 
44 
50  int32_t max_bytes_per_period = 0;
51 
56  uint64_t period_ms = 100;
57 
60 
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
FASTDDS_EXPORTED_API const char *const FASTDDS_FLOW_CONTROLLER_DEFAULT
Name of the default flow controller.
FlowControllerSchedulerPolicy
Supported scheduler policy by a flow controller.
Definition: FlowControllerSchedulerPolicy.hpp:31
@ FIFO
FIFO scheduler policy: first written sample by user, first sample scheduled to be sent to network.
Configuration values for creating flow controllers.
Definition: FlowControllerDescriptor.hpp:36
FlowControllerSchedulerPolicy scheduler
Scheduler policy used by the flow controller.
Definition: FlowControllerDescriptor.hpp:43
bool operator==(const FlowControllerDescriptor &b) const
Definition: FlowControllerDescriptor.hpp:61
uint64_t period_ms
Period time in milliseconds.
Definition: FlowControllerDescriptor.hpp:56
ThreadSettings sender_thread
Thread settings for the sender thread.
Definition: FlowControllerDescriptor.hpp:59
std::string name
Name of the flow controller.
Definition: FlowControllerDescriptor.hpp:38
int32_t max_bytes_per_period
Maximum number of bytes to be sent to network per period.
Definition: FlowControllerDescriptor.hpp:50
Struct ThreadSettings to specify various thread settings.
Definition: ThreadSettings.hpp:37