diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2015-03-14 23:10:13 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2015-03-14 23:10:13 +0100 |
commit | 2a7ffd694cfa3493ef1b83a69878322b8ca97670 (patch) | |
tree | 85e2156bbda0c9d6b9bf282afa17162f2ae03910 /apps/sm-serial-read.cpp | |
parent | efa1825dd6d16e7901e9620c31796b27b6c84ee9 (diff) | |
download | ble-toys-2a7ffd694cfa3493ef1b83a69878322b8ca97670.tar.gz ble-toys-2a7ffd694cfa3493ef1b83a69878322b8ca97670.tar.bz2 ble-toys-2a7ffd694cfa3493ef1b83a69878322b8ca97670.tar.xz ble-toys-2a7ffd694cfa3493ef1b83a69878322b8ca97670.zip |
o Updating to new API.
Diffstat (limited to 'apps/sm-serial-read.cpp')
-rw-r--r-- | apps/sm-serial-read.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
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<string>(); @@ -124,17 +126,17 @@ public: unique_ptr<ostream> outputStream = unique_ptr<ostream>(&cout); if (format == Format::JSON) { - output = make_shared<JsonSampleOutputStream>(std::move(outputStream)); + output = make_shared<JsonSampleOutputStream>(dict, std::move(outputStream)); } else if (format == Format::SQL) { - output = make_shared<SqlSampleOutputStream>(std::move(outputStream), "raw"); + output = make_shared<SqlSampleOutputStream>(dict, std::move(outputStream), "raw"); } else if (format == Format::PLAIN) { - output = make_shared<CsvSampleOutputStream>(std::move(outputStream)); + output = make_shared<CsvSampleOutputStream>(dict, std::move(outputStream)); } else { cerr << "Unsupported format: " << boost::lexical_cast<string>(format) << endl; return EXIT_FAILURE; } - shared_ptr<CsvSampleParser> input = make_shared<CsvSampleParser>(output); + shared_ptr<CsvSampleParser> input = make_shared<CsvSampleParser>(dict, output); port_handler(port_name, port, input).run(); |