1 / 18

TANGO Groups

TANGO Groups. Tango Groups: Motivations. TANGO groups provide a way to … build logical views of the CS logical sub-systems (vacuum, bpm, …) organize those views hierarchically groups of [groups and devices] control a set of devices as a whole Group interface ~ DeviceProxy interface

kerryn
Télécharger la présentation

TANGO Groups

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. TANGO Groups

  2. Tango Groups: Motivations • TANGO groups provide a way to … • build logical views of the CS • logical sub-systems (vacuum, bpm, …) • organize those views hierarchically • groups of [groups and devices] • control a set of devices as a whole • Group interface ~ DeviceProxy interface • send and manage asynch. requests on several devices • only one “request id” for the whole group

  3. TangoElement TangoDeviceElement TangoGroup DeviceProxy Tango Groups: Design * 1 1 Custom form of the Gamma & al whole/part design pattern 1

  4. TangoElement TangoDeviceElement TangoGroup DeviceProxy Tango Groups: Design * 1 1 User API 1

  5. Tango Groups: Interface • Group management methods • add, remove, find, contains, … • TANGO methods • sub-set of the DeviceProxy interface • ping • sync. & asynch. version of … • command_inout, read/write_attribute • more needed? • Misc. • get_group by (group or device) name -> Group • get_device by name -> DeviceProxy

  6. Tango Groups: Interface • Group management methods • Add • adding device(s) to a group… • by device name (string) • by device name list (vector<string>) • by device name pattern (string – e.g. */admin/*) • adding a group to a group… • by group ref. (pointer in C++)

  7. Tango Groups: Interface • Group management methods • Remove • removing device(s) from a group… • by device name* (string) • by device name* list (vector<string>) • by device name pattern (string – e.g. */admin/*) • removing a group from a group… • by group name* (string) • the forward option • propagate the request to sub-groups • a ref to the root group is enough ! • * fully qualified name supported • e.g. root.remove(“root.g1.g2.tango/test/1”);

  8. Tango Groups: Interface • Group management methods • Contains -> boolean • does the group or* the whole hierarchy contains a specific group or device? • * forward option: limit search to the group or forward the request to sub-groups • object specified by name • (fully qualified) device name or group name

  9. Tango Groups: Interface • Current implemention allows… - SR-Magnets |- Cell-01 | |- Dipole | | |- ANS-C01/AE/DIP.1 | | |- ANS-C01/AE/DIP.2 | | |- Dipole | | |- … | | | |- Quadrupole | |- … | |- Cell-02 | |- Dipole | | |- ANS-C01/AE/DIP.1 | | |- ANS-C02/AE/DIP.2 | | |- … | | | |- Quadrupole | |- … Stupid but allowed!

  10. Tango Groups: Interface • TANGO methods • command_inout • synch/asynch • command_inout_reply (long req_id) • read_attribute • synch/asynch • read_attribute_reply (long req_id) • write_attribute • synch/asynch • write_attribute_reply (long req_id) • more needed? • use and see !

  11. Tango Groups: Interface • TANGO methods • command_inout: obtaining results? • individual result • class GroupReply • has_error : boolean • DevFailed exception • usefull for other cases • class GroupCmdReply : public GroupReply • DeviceData

  12. Tango Groups: Interface • TANGO methods • command_inout: obtaining results? • group result • Class GroupCmdReplyList • has_error : boolean • reset() • std::vector<GroupCmdReply>

  13. Tango Groups: Interface • TANGO methods • read_attribute: obtaining results? • individual result • class GroupReply (previously defined) • has_error : boolean • DevFailed exception • class GroupAttrReply : public GroupReply • DeviceAttribute

  14. Tango Groups: Interface • TANGO methods • read_attribute: obtaining results? • group result • Class GroupAttrReplyList • has_error : boolean • reset() • std::vector<GroupAttrReply>

  15. Tango Groups: Interface • TANGO methods • write_attribute: obtaining results? • individual result • class GroupReply (previously defined) • has_error : boolean • DevFailed exception

  16. Tango Groups: Interface • TANGO methods • write_attribute: obtaining results? • group result • Class GroupReplyList • has_error : boolean • reset() • std::vector<GroupReply>

  17. Tango Groups: done & todo’s • Done… • C++ prototype and test • Tango API : group.h & group.cpp • To Do… • Java implementation • Planned for August 2003

  18. Tango Groups: Interface • A C++ example Tango::Group* g2 = new Tango::Group(“admin“); g2->add(“*/admin/*“); Tango::Group* g1 = new Tango::Group(“root“); g1->add(g2); g1->add(new Tango::Group(“dserver“)); g1->get_group(“dserver“)->add((“dserver/*“); long request_id = g1->command_inout_asynch("Status"); do_some_work(); Tango::GroupCmdReplyList crl = g1->command_inout_reply(request_id); if (crl.has_error) { cout << "at least one error occured" << endl; for (r = 0; r < crl.size(); r++) { if (crl[r].has_error == true) { cout << crl[r].obj_name << " failed for " << crl[r].dev_name << endl; cout << "error: " << crl[r].exception.errors[0].desc.in() << endl; } } } crl.reset();

More Related