Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • accelerators/tango/mj
1 result
Show changes
Commits on Source (3)
...@@ -63,6 +63,8 @@ class attribute ...@@ -63,6 +63,8 @@ class attribute
attribute(const std::string &attr_name, const std::string host, unsigned int port); attribute(const std::string &attr_name, const std::string host, unsigned int port);
attribute(const std::string &dev_name, const std::string &attr_name, const std::string host, unsigned int port); attribute(const std::string &dev_name, const std::string &attr_name, const std::string host, unsigned int port);
std::string get_fqdn() const;
const std::type_info &get_type() const; const std::type_info &get_type() const;
attribute_value get_value() const; attribute_value get_value() const;
......
...@@ -410,7 +410,7 @@ int eventAttribute(std::span<std::string> args, const mj::options &options) ...@@ -410,7 +410,7 @@ int eventAttribute(std::span<std::string> args, const mj::options &options)
} }
std::string deviceName{""}; std::string deviceName{""};
if(args.size() == 4) if(args.size() == 5)
{ {
if(std::string{"device"}.starts_with(args[3])) if(std::string{"device"}.starts_with(args[3]))
{ {
...@@ -429,8 +429,7 @@ int eventAttribute(std::span<std::string> args, const mj::options &options) ...@@ -429,8 +429,7 @@ int eventAttribute(std::span<std::string> args, const mj::options &options)
auto attribute = details::create_attribute(deviceName, attName, options); auto attribute = details::create_attribute(deviceName, attName, options);
// event subscription // event subscription
std::cerr << "Subscription to event of type \"" << EVENT_NAMES[evType] << "\" " std::cerr << "Subscription to event of type \"" << EVENT_NAMES[evType] << "\" "
<< "of \"" << attName << "\" " << "of \"" << attribute.get_fqdn() << "\" " << std::endl;
<< "on \"" << deviceName << "\"" << std::endl;
std::cerr << "Ctrl-C to stop" << std::endl; std::cerr << "Ctrl-C to stop" << std::endl;
auto t0 = std::chrono::steady_clock::now(); auto t0 = std::chrono::steady_clock::now();
......
...@@ -75,6 +75,11 @@ attribute::attribute(const std::string &dev_name, ...@@ -75,6 +75,11 @@ attribute::attribute(const std::string &dev_name,
{ {
} }
std::string attribute::get_fqdn() const
{
return fqdn_name;
}
std::string attribute::get_name() const std::string attribute::get_name() const
{ {
if(ptr_attr) if(ptr_attr)
......