Fast DDS  Version 3.1.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
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
28namespace eprosima {
29namespace fastdds {
30namespace rtps {
31
38class FASTDDS_EXPORTED_API HistoryAttributes
39{
40public:
41
44
47
50
56
65
69 , payloadMaxSize(500)
70 , initialReservedCaches(500)
71 , maximumReservedCaches(0)
72 , extraReservedCaches(1)
73 {
74 }
75
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
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
121 {
122 }
123
124};
125
126} // namespace rtps
127} // namespace fastdds
128} // namespace eprosima
129
130#endif // FASTDDS_RTPS_ATTRIBUTES__HISTORYATTRIBUTES_HPP
Class HistoryAttributes, to specify the attributes of a WriterHistory or a ReaderHistory.
Definition HistoryAttributes.hpp:39
int32_t maximumReservedCaches
Maximum number of reserved caches.
Definition HistoryAttributes.hpp:55
uint32_t payloadMaxSize
Maximum payload size of the history, default value 500.
Definition HistoryAttributes.hpp:46
HistoryAttributes()
Default constructor.
Definition HistoryAttributes.hpp:67
HistoryAttributes(MemoryManagementPolicy_t memoryPolicy, uint32_t payload, int32_t initial, int32_t maxRes)
Constructor.
Definition HistoryAttributes.hpp:84
HistoryAttributes(MemoryManagementPolicy_t memoryPolicy, uint32_t payload, int32_t initial, int32_t maxRes, int32_t extra)
Constructor.
Definition HistoryAttributes.hpp:106
MemoryManagementPolicy_t memoryPolicy
Memory management policy.
Definition HistoryAttributes.hpp:43
int32_t extraReservedCaches
Number of extra caches that can be reserved for other purposes than the history.
Definition HistoryAttributes.hpp:64
int32_t initialReservedCaches
Number of the initial Reserved Caches, default value 500.
Definition HistoryAttributes.hpp:49
virtual ~HistoryAttributes()
Definition HistoryAttributes.hpp:120
enum eprosima::fastdds::rtps::MemoryManagementPolicy MemoryManagementPolicy_t
Enum MemoryuManagementPolicy_t, indicated the way memory is managed in terms of dealing with CacheCha...
@ PREALLOCATED_WITH_REALLOC_MEMORY_MODE
Default size preallocated, requires reallocation when a bigger message arrives.
Definition ResourceManagement.hpp:35
eProsima namespace.