From 2a7ffd694cfa3493ef1b83a69878322b8ca97670 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sat, 14 Mar 2015 23:10:13 +0100 Subject: o Updating to new API. --- apps/sm-serial-read.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'apps/sm-serial-read.cpp') diff --git a/apps/sm-serial-read.cpp b/apps/sm-serial-read.cpp index 04a718d..c7fb695 100644 --- a/apps/sm-serial-read.cpp +++ b/apps/sm-serial-read.cpp @@ -101,6 +101,8 @@ public: auto desc = execution.desc; auto vm = execution.vm; + KeyDictionary dict; + uint32_t baud_rate = 115200; auto port_name = vm["port"].as(); @@ -124,17 +126,17 @@ public: unique_ptr outputStream = unique_ptr(&cout); if (format == Format::JSON) { - output = make_shared(std::move(outputStream)); + output = make_shared(dict, std::move(outputStream)); } else if (format == Format::SQL) { - output = make_shared(std::move(outputStream), "raw"); + output = make_shared(dict, std::move(outputStream), "raw"); } else if (format == Format::PLAIN) { - output = make_shared(std::move(outputStream)); + output = make_shared(dict, std::move(outputStream)); } else { cerr << "Unsupported format: " << boost::lexical_cast(format) << endl; return EXIT_FAILURE; } - shared_ptr input = make_shared(output); + shared_ptr input = make_shared(dict, output); port_handler(port_name, port, input).run(); -- cgit v1.2.3