| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
HistoryAttributes.hpp
1// Copyright 2016 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
19
20#ifndef FASTDDS_RTPS_ATTRIBUTES__HISTORYATTRIBUTES_HPP
21#define FASTDDS_RTPS_ATTRIBUTES__HISTORYATTRIBUTES_HPP
22
23#include <fastdds/rtps/attributes/ResourceManagement.hpp>
24#include <fastdds/fastdds_dll.hpp>
25
26#include <cstdint>
27
28 namespace eprosima {
29 namespace fastdds {
30 namespace rtps {
31
38 class FASTDDS_EXPORTED_API HistoryAttributes
39{
40 public:
41
43 MemoryManagementPolicy_t memoryPolicy;
44
46 uint32_t payloadMaxSize;
47
49 int32_t initialReservedCaches;
50
55 int32_t maximumReservedCaches;
56
64 int32_t extraReservedCaches;
65
67 HistoryAttributes()
68 : memoryPolicy(PREALLOCATED_WITH_REALLOC_MEMORY_MODE)
69 , payloadMaxSize(500)
70 , initialReservedCaches(500)
71 , maximumReservedCaches(0)
72 , extraReservedCaches(1)
73 {
74 }
75
84 HistoryAttributes(
85 MemoryManagementPolicy_t memoryPolicy,
86 uint32_t payload,
87 int32_t initial,
88 int32_t maxRes)
89 : memoryPolicy(memoryPolicy)
90 , payloadMaxSize(payload)
91 , initialReservedCaches(initial)
92 , maximumReservedCaches(maxRes)
93 , extraReservedCaches(1)
94 {
95 }
96
106 HistoryAttributes(
107 MemoryManagementPolicy_t memoryPolicy,
108 uint32_t payload,
109 int32_t initial,
110 int32_t maxRes,
111 int32_t extra)
112 : memoryPolicy(memoryPolicy)
113 , payloadMaxSize(payload)
114 , initialReservedCaches(initial)
115 , maximumReservedCaches(maxRes)
116 , extraReservedCaches(extra)
117 {
118 }
119
120 virtual ~HistoryAttributes()
121 {
122 }
123
124};
125
126} // namespace rtps
127} // namespace fastdds
128} // namespace eprosima
129
130#endif // FASTDDS_RTPS_ATTRIBUTES__HISTORYATTRIBUTES_HPP
eprosima::fastdds::rtps::HistoryAttributes::maximumReservedCaches
int32_t maximumReservedCaches
Maximum number of reserved caches.
Definition HistoryAttributes.hpp:55
eprosima::fastdds::rtps::HistoryAttributes::payloadMaxSize
uint32_t payloadMaxSize
Maximum payload size of the history, default value 500.
Definition HistoryAttributes.hpp:46
eprosima::fastdds::rtps::HistoryAttributes::HistoryAttributes
HistoryAttributes()
Default constructor.
Definition HistoryAttributes.hpp:67
eprosima::fastdds::rtps::HistoryAttributes::HistoryAttributes
HistoryAttributes(MemoryManagementPolicy_t memoryPolicy, uint32_t payload, int32_t initial, int32_t maxRes)
Constructor.
Definition HistoryAttributes.hpp:84
eprosima::fastdds::rtps::HistoryAttributes::HistoryAttributes
HistoryAttributes(MemoryManagementPolicy_t memoryPolicy, uint32_t payload, int32_t initial, int32_t maxRes, int32_t extra)
Constructor.
Definition HistoryAttributes.hpp:106
eprosima::fastdds::rtps::HistoryAttributes::memoryPolicy
MemoryManagementPolicy_t memoryPolicy
Memory management policy.
Definition HistoryAttributes.hpp:43
eprosima::fastdds::rtps::HistoryAttributes::extraReservedCaches
int32_t extraReservedCaches
Number of extra caches that can be reserved for other purposes than the history.
Definition HistoryAttributes.hpp:64
eprosima::fastdds::rtps::HistoryAttributes::initialReservedCaches
int32_t initialReservedCaches
Number of the initial Reserved Caches, default value 500.
Definition HistoryAttributes.hpp:49
eprosima::fastdds::rtps::HistoryAttributes::~HistoryAttributes
virtual ~HistoryAttributes()
Definition HistoryAttributes.hpp:120
eprosima::fastdds::rtps
Contains the RTPS protocol implementation.
eprosima::fastdds::rtps::MemoryManagementPolicy_t
enum eprosima::fastdds::rtps::MemoryManagementPolicy MemoryManagementPolicy_t
Enum MemoryuManagementPolicy_t, indicated the way memory is managed in terms of dealing with CacheCha...
eprosima::fastdds::rtps::PREALLOCATED_WITH_REALLOC_MEMORY_MODE
@ PREALLOCATED_WITH_REALLOC_MEMORY_MODE
Default size preallocated, requires reallocation when a bigger message arrives.
Definition ResourceManagement.hpp:35
eprosima::fastdds
eprosima
eProsima namespace.