tango groups n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
TANGO Groups PowerPoint Presentation
Download Presentation
TANGO Groups

Loading in 2 Seconds...

play fullscreen
1 / 18

TANGO Groups - PowerPoint PPT Presentation


  • 108 Views
  • Uploaded on

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

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'TANGO Groups' - kerryn


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
tango groups motivations
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
tango groups design

TangoElement

TangoDeviceElement

TangoGroup

DeviceProxy

Tango Groups: Design

*

1

1

Custom form of the Gamma & al whole/part design pattern

1

tango groups design1

TangoElement

TangoDeviceElement

TangoGroup

DeviceProxy

Tango Groups: Design

*

1

1

User API

1

tango groups interface
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
tango groups interface1
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++)
tango groups interface2
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”);
tango groups interface3
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
tango groups interface4
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!

tango groups interface5
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 !
tango groups interface6
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
tango groups interface7
Tango Groups: Interface
  • TANGO methods
    • command_inout: obtaining results?
      • group result
        • Class GroupCmdReplyList
          • has_error : boolean
          • reset()
          • std::vector<GroupCmdReply>
tango groups interface8
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
tango groups interface9
Tango Groups: Interface
  • TANGO methods
    • read_attribute: obtaining results?
      • group result
        • Class GroupAttrReplyList
          • has_error : boolean
          • reset()
          • std::vector<GroupAttrReply>
tango groups interface10
Tango Groups: Interface
  • TANGO methods
    • write_attribute: obtaining results?
      • individual result
        • class GroupReply (previously defined)
          • has_error : boolean
          • DevFailed exception
tango groups interface11
Tango Groups: Interface
  • TANGO methods
    • write_attribute: obtaining results?
      • group result
        • Class GroupReplyList
          • has_error : boolean
          • reset()
          • std::vector<GroupReply>
tango groups done todo s
Tango Groups: done & todo’s
  • Done…
    • C++ prototype and test
    • Tango API : group.h & group.cpp
  • To Do…
    • Java implementation
    • Planned for August 2003
tango groups interface12
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();