|
|
all necessary classes to filter and convert an entry of the ltm to some other format(s) More...
#include <RobotAPI/libraries/armem/server/ltm/processors/Processors.h>
Public Member Functions | |
| bool | acceptSnapshotForSegment (const std::string &coreSegmentName, const std::string &providerSegmentName, const armem::wm::EntitySnapshot &snapshot, bool simulatedVersion=false) |
| Decide whether a snapshot of the given segment should be stored to LTM. | |
| void | configure (const nlohmann::json &config) |
| std::map< std::string, processor::SnapshotFilter::FilterStatistics > | getSnapshotFilterStatistics () |
| bool | hasSegmentSelection () const |
| Whether any segment-based selection or per-segment filtering is configured. | |
| Processors ()=default | |
| void | resetFilterStatisticsForNewEpisode () |
| resetFilterStatisticsForNewEpisode runs resetFilterStatisticsForNewEpisode on all snapshot filters | |
Public Attributes | |
| std::vector< std::unique_ptr< processor::DataConverter > > | converters |
| processor::converter::data::object::JsonConverter | defaultObjectConverter |
| processor::converter::type::object::JsonConverter | defaultTypeConverter |
| std::vector< std::unique_ptr< processor::Extractor > > | extractors |
| std::vector< std::unique_ptr< processor::MemoryFilter > > | memFilters |
| std::map< std::string, std::vector< std::unique_ptr< processor::SnapshotFilter > > > | segmentSnapFilters |
| Per-segment snapshot filter overrides, keyed by "CoreSegment" or "CoreSegment/ProviderSegment". | |
| std::vector< std::unique_ptr< processor::SnapshotFilter > > | snapFilters |
| std::optional< std::set< std::string > > | storeSegments |
| Optional whitelist of segments to store. | |
all necessary classes to filter and convert an entry of the ltm to some other format(s)
Definition at line 21 of file Processors.h.
|
default |
| bool acceptSnapshotForSegment | ( | const std::string & | coreSegmentName, |
| const std::string & | providerSegmentName, | ||
| const armem::wm::EntitySnapshot & | snapshot, | ||
| bool | simulatedVersion = false ) |
Decide whether a snapshot of the given segment should be stored to LTM.
Combines two mechanisms configured via the LTM configuration JSON:
storeSegments): if set, the snapshot is rejected unless its segment is admitted. A core segment is admitted if either its core-segment name ("Core") or its provider-segment path ("Core/Provider") is listed.segments) are applied if present for this segment (provider path takes precedence over core), otherwise the global snapFilters are applied.If neither storeSegments nor segmentSnapFilters is configured, this falls back to the global snapshot filters only, reproducing the previous behavior.
Definition at line 123 of file Processors.cpp.
| void configure | ( | const nlohmann::json & | config | ) |
Definition at line 45 of file Processors.cpp.
| std::map< std::string, processor::SnapshotFilter::FilterStatistics > getSnapshotFilterStatistics | ( | ) |
Definition at line 159 of file Processors.cpp.
| bool hasSegmentSelection | ( | ) | const |
Whether any segment-based selection or per-segment filtering is configured.
When false, callers may use the global snapFilters directly.
Definition at line 93 of file Processors.cpp.
| void resetFilterStatisticsForNewEpisode | ( | ) |
resetFilterStatisticsForNewEpisode runs resetFilterStatisticsForNewEpisode on all snapshot filters
Definition at line 201 of file Processors.cpp.
| std::vector<std::unique_ptr<processor::DataConverter> > converters |
Definition at line 92 of file Processors.h.
| processor::converter::data::object::JsonConverter defaultObjectConverter |
Definition at line 95 of file Processors.h.
| processor::converter::type::object::JsonConverter defaultTypeConverter |
Definition at line 96 of file Processors.h.
| std::vector<std::unique_ptr<processor::Extractor> > extractors |
Definition at line 89 of file Processors.h.
| std::vector<std::unique_ptr<processor::MemoryFilter> > memFilters |
Definition at line 74 of file Processors.h.
| std::map<std::string, std::vector<std::unique_ptr<processor::SnapshotFilter> > > segmentSnapFilters |
Per-segment snapshot filter overrides, keyed by "CoreSegment" or "CoreSegment/ProviderSegment".
A segment without an entry uses snapFilters.
Definition at line 86 of file Processors.h.
| std::vector<std::unique_ptr<processor::SnapshotFilter> > snapFilters |
Definition at line 77 of file Processors.h.
| std::optional<std::set<std::string> > storeSegments |
Optional whitelist of segments to store.
Absent => store all segments. Entries are either "CoreSegment" or "CoreSegment/ProviderSegment".
Definition at line 81 of file Processors.h.