MotorControlModuleSDFM_TMS3.../Projects/EFC_Communication/UMLibrary/application/basic/MonotonicBufferResource.hh
2024-06-07 11:12:56 +03:00

50 lines
1.2 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* MonotonicBufferResource.hh
*
* Created on: 15 июн. 2020 г.
* Author: LeonidTitov
*/
#ifndef UMLIBRARY_APPLICATION_BASIC_MONOTONICBUFFERRESOURCE_HH_
#define UMLIBRARY_APPLICATION_BASIC_MONOTONICBUFFERRESOURCE_HH_
#include "../ISetupStep.hh"
#include <memory_resource>
#include "../../units/LogicalEntities.hpp"
namespace application { namespace basic {
//!Ресурс памяти реализующий стратегию monotonic_buffer_resource.
struct MonotonicBufferResource : public ISetupStep {
std::pmr::memory_resource * upstream_resource = nullptr;
bool input( Environment & env );
void build( Environment & env );
void finalize() {}
struct Links {
Environment::Id upstream; //!<Ресурс исходной памяти.
Environment::Id monotonic; //!<Динамическая память со стратегией monotonic_buffer_resource.
};
struct Setting {
units::Size buffer_size; //!<Размер буфера.
};
const Links & links;
const Setting & setting;
MonotonicBufferResource( const Links & links, const Setting & setting );
};
}}
#endif /* UMLIBRARY_APPLICATION_BASIC_MONOTONICBUFFERRESOURCE_HH_ */