Commit f7fc33f2 authored by Branislav Katreniak's avatar Branislav Katreniak
Browse files

dss: simplify code in IoServiceObjects

parent ea06c78f
master DSD-10252-heatbeat-increase-for-dutch-p1-support DSD-10490-crash DSD-11013-wrong-dutch-translation DSD-7417 JEAN_P1_MASTER MR_GroupID_instead_DeviceClasses MR_convert_deviceinterfaceqeuesthandler_test MR_cross-compile_dss20 MR_device_AutomationInputMode_none MR_device_setBinaryType MR_docker-dss11gb-toolchain MR_drop_boost_filesystem MR_getModelFeatures2 MR_hardwareType_cleanup MR_install_libds_as_shared_library MR_metering_storage MR_metering_webscocket MR_open_metering_system_archive MR_openapi_configuration MR_p1_metering MR_pairing-button_3 MR_prepare_public_api_sync MR_produced-energy MR_std--shared_ptr MR_sync_open_metering_system R1904 R1906 R1908 R1911 R2002 R2004 R2006 R2008 R2011 R2102 R2106 R2111 R2204 R2207 R2210 R2303 R2309 R2311 R2411 bka-docker bugfix/DSD-10490-fix-crash bugfix/DSD-3172-support-umr200-config_3_7_0 cherry-pick-76f3d2ce cherry-pick-921e00cb cherry-pick-921e00cb-2 feature/DSD-10170-support-area-names jeanvisagie/dss-mainline-p1_crc mock_api_endpoints no_proxy revert-c81752f2 testing testing_safe update_ubuntu weather_api 1.19.11 1.19.11-beta01 1.19.10.1 1.19.10.1-beta01 1.19.10 1.19.9 1.19.9-beta03 1.19.9-beta02 1.19.9-beta01 1.19.8.1 1.19.8 1.19.8-beta03 1.19.8-beta02 1.19.8-beta01 1.19.7.1 1.19.7 1.19.7-beta07 1.19.7-beta06 1.19.7-beta05 1.19.7-beta04 1.19.7-beta03 1.19.7-beta02 1.19.7-beta01 1.19.6.3 1.19.6.2 1.19.6.1 1.19.6.1-beta01 1.19.6 1.19.6-beta03 1.19.6-beta02 1.19.6-beta01 1.19.5.1 1.19.5.1-beta02 1.19.5.1-beta01 1.19.5 1.19.5-beta03 1.19.5-beta02 1.19.5-beta01 1.19.4 1.19.4-beta04 1.19.4-beta03 1.19.4-beta02 1.19.4-beta01 1.19.3.1 1.19.3.1-beta01 1.19.3 1.19.3-beta06 1.19.3-beta05 1.19.3-beta04 1.19.3-beta03 1.19.3-beta02 1.19.3-beta01 1.19.2.1 1.19.2 1.19.2-beta02 1.19.2-beta01 1.19.1 1.19.1-beta02 1.19.1-beta01 1.19.0 1.19.0-beta03 1.19.0-beta02 1.19.0-beta01 1.18.0 1.18.0-beta04 1.18.0-beta03 1.18.0-beta02 1.18.0-beta01 1.17.0 1.17.0-beta05 1.17.0-beta04 1.17.0-beta03 1.17.0-beta02 1.17.0-beta01 1.16.7 1.16.7-beta04 1.16.7-beta03 1.16.7-beta02 1.16.7-beta01 1.16.6.1 1.16.6.1-beta01 1.16.6 1.16.6-beta04 1.16.6-beta03 1.16.6-beta02 1.16.6-beta01 1.16.5 1.16.5-beta07 1.16.5-beta06 1.16.5-beta05 1.16.5-beta04 1.16.5-beta03 1.16.5-beta02 1.16.5-beta01 1.16.4 1.16.4-beta06 1.16.4-beta05 1.16.4-beta04 1.16.4-beta03 1.16.4-beta02 1.16.4-beta01 1.16.3 1.16.3-beta08 1.16.3-beta07 1.16.3-beta06 1.16.3-beta05 1.16.3-beta04 1.16.3-beta03 1.16.3-beta02 1.16.3-beta01 1.16.2.1 1.16.2.1-beta01 1.16.2 1.16.2-beta07 1.16.2-beta06 1.16.2-beta05 1.16.2-beta04 1.16.2-beta03 1.16.2-beta02 1.16.2-beta01 1.16.1.1 1.16.1 1.16.1-beta05 1.16.1-beta04 1.16.1-beta03 1.16.1-beta02 1.16.1-beta01 v1.54.2 v1.54.1 v1.54.0 v1.53.0 v1.52.1 v1.52.0
1 merge request!1415Bka output status
Showing with 4 additions and 4 deletions
+4 -4
......@@ -226,6 +226,7 @@ struct DSS::Impl {
/// Objects synchronized to ioService event loop
struct IoServiceObjects {
DSS& dss;
Apartment& apartment{dss.getApartment()};
boost::asio::ssl::context sslContext{boost::asio::ssl::context::sslv23_client};
boost::asio::io_service& io{dss.getIoService()};
std::unique_ptr<ds::System> dsSystem{ds::makeSystem()};
......@@ -233,18 +234,17 @@ struct DSS::Impl {
std::unique_ptr<SimpleHttpClient> httpClient{makeSimpleHttpClient()};
ds::asio::FileDescriptorsWatchdog fileDescriptorsWatchdog{io, std::chrono::seconds(20)};
VdcToken vdcToken{dss};
std::unique_ptr<BackendVdcs> backendVdcs{
makeBackendVdcs(dss.getApartment(), dss.getEventInterpreter(), *conf, *httpClient)};
std::unique_ptr<BackendVdcs> backendVdcs{makeBackendVdcs(apartment, dss.getEventInterpreter(), *conf, *httpClient)};
std::unique_ptr<dsConnector::StreamClient> streamClient{dsConnector::makeWSSClient(
io, sslContext,
conf->readOr<std::string>("backendConnectorUrl", "wss://dsbcdev.devapi.digitalstrom.com:8256/dss"))};
std::unique_ptr<dsApi::Service> testService = dsApi::makeTestService();
dsApi::Service api;
ApartmentBusHook apartmentBusHook{*conf, dss.getPropertySystem(), dss.getApartment(), api};
ApartmentBusHook apartmentBusHook{*conf, dss.getPropertySystem(), apartment, api};
std::unique_ptr<dsConnector::Bus> connectorBus{makeConnectorBus(io, *conf, *streamClient, apartmentBusHook)};
std::unique_ptr<dsModel::ApartmentApi> apartmentApi{
makeApartmentApi(*conf, *connectorBus, dss.getApartment(), dss.getEventInterpreter(), io)};
makeApartmentApi(*conf, *connectorBus, apartment, dss.getEventInterpreter(), io)};
std::unique_ptr<dsApi::Service> apartmentApiService = dsModel::makeService(*apartmentApi);
IoServiceObjects(DSS& dss) : dss(dss) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment