X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fdevice%2Ffile.cpp;h=e82c5ece16c89e8f7d00da6da9fcb3bdda4506b9;hb=6842b5fc481eb43d9aeea81f17e211820d6dc405;hp=edc2da2bdd96cad6ba3a56eb39d13c2a1a2b2e4e;hpb=858ae630aec11f2f1300897cc3ca127a4537e598;p=pulseview.git diff --git a/pv/device/file.cpp b/pv/device/file.cpp index edc2da2..e82c5ec 100644 --- a/pv/device/file.cpp +++ b/pv/device/file.cpp @@ -25,6 +25,8 @@ #include +using std::make_pair; +using std::map; using std::string; namespace pv { @@ -40,6 +42,18 @@ std::string File::format_device_title() const return boost::filesystem::path(_path).filename().string(); } +map File::get_device_info() const +{ + map result; + + result.insert(make_pair("vendor", "sigrok")); + result.insert(make_pair("model", "file")); + result.insert(make_pair("connection_id", + boost::filesystem::path(_path).filename().string())); + + return result; +} + File* File::create(const string &name) { if (sr_session_load(name.c_str(), &SigSession::_sr_session) == SR_OK) {