mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 18:30:06 +00:00
Adding level 2 data provider to product manager
This commit is contained in:
parent
63474cddcc
commit
078b9c407c
4 changed files with 67 additions and 3 deletions
|
|
@ -1,5 +1,6 @@
|
|||
#include <scwx/qt/manager/radar_product_manager.hpp>
|
||||
#include <scwx/common/constants.hpp>
|
||||
#include <scwx/provider/level2_data_provider_factory.hpp>
|
||||
#include <scwx/util/logger.hpp>
|
||||
#include <scwx/util/map.hpp>
|
||||
#include <scwx/util/threads.hpp>
|
||||
|
|
@ -57,7 +58,9 @@ public:
|
|||
explicit RadarProductManagerImpl(const std::string& radarId) :
|
||||
radarId_ {radarId},
|
||||
initialized_ {false},
|
||||
radarSite_ {config::RadarSite::Get(radarId)}
|
||||
radarSite_ {config::RadarSite::Get(radarId)},
|
||||
level2DataProvider_ {
|
||||
provider::Level2DataProviderFactory::Create(radarId)}
|
||||
{
|
||||
if (radarSite_ == nullptr)
|
||||
{
|
||||
|
|
@ -89,6 +92,8 @@ public:
|
|||
|
||||
RadarProductRecordMap level2ProductRecords_;
|
||||
std::unordered_map<std::string, RadarProductRecordMap> level3ProductRecords_;
|
||||
|
||||
std::shared_ptr<provider::Level2DataProvider> level2DataProvider_;
|
||||
};
|
||||
|
||||
RadarProductManager::RadarProductManager(const std::string& radarId) :
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
#pragma once
|
||||
|
||||
#include <scwx/provider/level2_data_provider.hpp>
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace provider
|
||||
{
|
||||
|
||||
class Level2DataProviderFactory
|
||||
{
|
||||
private:
|
||||
explicit Level2DataProviderFactory() = delete;
|
||||
~Level2DataProviderFactory() = delete;
|
||||
|
||||
Level2DataProviderFactory(const Level2DataProviderFactory&) = delete;
|
||||
Level2DataProviderFactory& operator=(const Level2DataProviderFactory&) = delete;
|
||||
|
||||
Level2DataProviderFactory(Level2DataProviderFactory&&) noexcept = delete;
|
||||
Level2DataProviderFactory& operator=(Level2DataProviderFactory&&) noexcept = delete;
|
||||
|
||||
public:
|
||||
static std::shared_ptr<Level2DataProvider> Create(const std::string& radarSite);
|
||||
};
|
||||
|
||||
} // namespace provider
|
||||
} // namespace scwx
|
||||
28
wxdata/source/scwx/provider/level2_data_provider_factory.cpp
Normal file
28
wxdata/source/scwx/provider/level2_data_provider_factory.cpp
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#include <scwx/wsr88d/rda/level2_message_factory.hpp>
|
||||
|
||||
#include <scwx/util/logger.hpp>
|
||||
#include <scwx/util/vectorbuf.hpp>
|
||||
#include <scwx/wsr88d/rda/clutter_filter_bypass_map.hpp>
|
||||
#include <scwx/wsr88d/rda/clutter_filter_map.hpp>
|
||||
#include <scwx/wsr88d/rda/digital_radar_data.hpp>
|
||||
#include <scwx/wsr88d/rda/performance_maintenance_data.hpp>
|
||||
#include <scwx/wsr88d/rda/rda_adaptation_data.hpp>
|
||||
#include <scwx/provider/level2_data_provider_factory.hpp>
|
||||
#include <scwx/provider/aws_level2_data_provider.hpp>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace provider
|
||||
{
|
||||
|
||||
static const std::string logPrefix_ =
|
||||
"scwx::provider::level2_data_provider_factory";
|
||||
|
||||
std::shared_ptr<Level2DataProvider>
|
||||
Level2DataProviderFactory::Create(const std::string& radarSite)
|
||||
{
|
||||
return std::make_unique<AwsLevel2DataProvider>(radarSite);
|
||||
}
|
||||
|
||||
} // namespace provider
|
||||
} // namespace scwx
|
||||
|
|
@ -35,9 +35,11 @@ set(SRC_COMMON source/scwx/common/color_table.cpp
|
|||
source/scwx/common/sites.cpp
|
||||
source/scwx/common/vcp.cpp)
|
||||
set(HDR_PROVIDER include/scwx/provider/aws_level2_data_provider.hpp
|
||||
include/scwx/provider/level2_data_provider.hpp)
|
||||
include/scwx/provider/level2_data_provider.hpp
|
||||
include/scwx/provider/level2_data_provider_factory.hpp)
|
||||
set(SRC_PROVIDER source/scwx/provider/aws_level2_data_provider.cpp
|
||||
source/scwx/provider/level2_data_provider.cpp)
|
||||
source/scwx/provider/level2_data_provider.cpp
|
||||
source/scwx/provider/level2_data_provider_factory.cpp)
|
||||
set(HDR_UTIL include/scwx/util/float.hpp
|
||||
include/scwx/util/iterator.hpp
|
||||
include/scwx/util/logger.hpp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue