mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 13:20:04 +00:00
AWS Level 2 Provider FindKey
This commit is contained in:
parent
80310029e5
commit
bde8d288bd
5 changed files with 90 additions and 1 deletions
|
|
@ -1,5 +1,7 @@
|
|||
#include <scwx/provider/aws_level2_data_provider.hpp>
|
||||
#include <scwx/util/logger.hpp>
|
||||
#include <scwx/util/map.hpp>
|
||||
#include <scwx/util/time.hpp>
|
||||
#include <scwx/wsr88d/nexrad_file_factory.hpp>
|
||||
|
||||
#include <shared_mutex>
|
||||
|
|
@ -76,6 +78,24 @@ size_t AwsLevel2DataProvider::cache_size() const
|
|||
return p->objects_.size();
|
||||
}
|
||||
|
||||
std::string
|
||||
AwsLevel2DataProvider::FindKey(std::chrono::system_clock::time_point time)
|
||||
{
|
||||
logger_->debug("FindKey: {}", util::TimeString(time));
|
||||
|
||||
std::string key {};
|
||||
|
||||
std::optional<std::string> element =
|
||||
util::GetBoundedElement(p->objects_, time);
|
||||
|
||||
if (element.has_value())
|
||||
{
|
||||
key = *element;
|
||||
}
|
||||
|
||||
return key;
|
||||
}
|
||||
|
||||
size_t
|
||||
AwsLevel2DataProvider::ListObjects(std::chrono::system_clock::time_point date)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue