Skip to content

Commit

Permalink
removed legacy mqtt service
Browse files Browse the repository at this point in the history
  • Loading branch information
wsobel committed May 3, 2024
1 parent b23b28b commit ca11039
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 974 deletions.
3 changes: 0 additions & 3 deletions agent_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,10 @@ set(AGENT_SOURCES

# src/sink/mqtt_sink HEADER_FILE_ONLY

"${SOURCE_DIR}/sink/mqtt_sink/mqtt_legacy_service.hpp"
"${SOURCE_DIR}/sink/mqtt_sink/mqtt_service.hpp"

#src/sink/mqtt_sink SOURCE_FILES_ONLY

"${SOURCE_DIR}/sink/mqtt_sink/mqtt_legacy_service.cpp"
"${SOURCE_DIR}/sink/mqtt_sink/mqtt_service.cpp"

# src/sink/rest_sink HEADER_FILE_ONLY
Expand Down Expand Up @@ -335,7 +333,6 @@ if(MSVC)

# The modules including Beast required the /bigobj option in Windows
set_property(SOURCE
"${SOURCE_DIR}/sink/mqtt_sink/mqtt_legacy_service.cpp"
"${SOURCE_DIR}/sink/mqtt_sink/mqtt_service.cpp"
"${SOURCE_DIR}/sink/rest_sink/session_impl.cpp"
"${SOURCE_DIR}/source/adapter/mqtt/mqtt_adapter.cpp"
Expand Down
2 changes: 0 additions & 2 deletions src/mtconnect/configuration/agent_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
#include "mtconnect/configuration/config_options.hpp"
#include "mtconnect/device_model/device.hpp"
#include "mtconnect/printer/xml_printer.hpp"
#include "mtconnect/sink/mqtt_sink/mqtt_legacy_service.hpp"
#include "mtconnect/sink/mqtt_sink/mqtt_service.hpp"
#include "mtconnect/sink/rest_sink/rest_service.hpp"
#include "mtconnect/source/adapter/agent_adapter/agent_adapter.hpp"
Expand Down Expand Up @@ -112,7 +111,6 @@ namespace mtconnect::configuration {

bool success = false;

sink::mqtt_sink::MqttLegacyService::registerFactory(m_sinkFactory);
sink::mqtt_sink::MqttService::registerFactory(m_sinkFactory);
sink::rest_sink::RestService::registerFactory(m_sinkFactory);
adapter::shdr::ShdrAdapter::registerFactory(m_sourceFactory);
Expand Down
197 changes: 0 additions & 197 deletions src/mtconnect/sink/mqtt_sink/mqtt_legacy_service.cpp

This file was deleted.

107 changes: 0 additions & 107 deletions src/mtconnect/sink/mqtt_sink/mqtt_legacy_service.hpp

This file was deleted.

4 changes: 2 additions & 2 deletions src/mtconnect/sink/rest_sink/rest_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ namespace mtconnect {
auto handler = [&](SessionPtr session, RequestPtr request) -> bool {
auto removed = *request->parameter<bool>("removed");
auto count = *request->parameter<int32_t>("count");
auto pretty = *request->parameter<bool>("pretty");
auto pretty = request->parameter<bool>("pretty").value_or(false);
auto format = request->parameter<string>("format");
auto printer = getPrinter(request->m_accepts, format);

Expand All @@ -546,7 +546,7 @@ namespace mtconnect {
auto asset = request->parameter<string>("assetIds");
if (asset)
{
auto pretty = *request->parameter<bool>("pretty");
auto pretty = request->parameter<bool>("pretty").value_or(false);
auto printer = m_sinkContract->getPrinter(acceptFormat(request->m_accepts));

list<string> ids;
Expand Down
1 change: 0 additions & 1 deletion test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ add_agent_test(tls_http_server FALSE sink/rest_sink TRUE)
add_agent_test(routing FALSE sink/rest_sink)

add_agent_test(mqtt_isolated FALSE mqtt_isolated TRUE)
add_agent_test(mqtt_legacy_sink FALSE sink/mqtt_legacy_sink TRUE)
add_agent_test(mqtt_sink FALSE sink/mqtt_sink TRUE)

add_agent_test(json_printer_asset TRUE json)
Expand Down
Loading

0 comments on commit ca11039

Please sign in to comment.