1 / 8

Asynchronous behavior with ACS

Asynchronous behavior with ACS. Bogdan Jeram (bjeram@eso.org) European Southern Observatory. Asynchronous calls. Callee (client) is not blocked Result is send later Callback mechanism is used in asynchronous communication for sending notification on action completion. Callback.

francene
Download Presentation

Asynchronous behavior with ACS

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. Asynchronous behaviorwithACS Bogdan Jeram (bjeram@eso.org) European Southern Observatory Socorro July, 2004

  2. Asynchronous calls • Callee (client) is not blocked • Result is send later • Callback mechanism is used in asynchronous communication for sending notification on action completion ALMA Common Software course

  3. Callback • component calls back the client (method on the callback object) when command is done • Callback object has two methods: • working • done • passed completion data (+ result) • used also for send monitor values ALMA Common Software course

  4. Callbacks in IDL • callback interfaces predefined by BACI (baci.idl) • baci properties use them • different types with same functionality: interface CBvoid : Callback { oneway void working (in ACSErr::Completion c, in CBDescOut desc ); oneway void done (in ACSErr::Completion c, in CBDescOut desc ); }; interface CB<T> : Callback { oneway void working (in T value, in ACSErr::Completion c, in CBDescOut desc); oneway void done (in T value, in ACSErr::Completion c, in CBDescOut desc); }; ALMA Common Software course

  5. Introducing asynchronous behavior in IDL • Asynchronous methods has to pass callback object (ACS::CB<T>) and structure ACS::CBDescIn. • Example: void objfix_async (in double az, in double elev, in ACS::CBvoid callBack, in ACS::CBDescIn desc); ALMA Common Software course

  6. Client side • It has to implement callback or to get already implemented (default) one with default behavior ! • Implement means implementing methods: • working • done ALMA Common Software course

  7. Component (server) side • implement IDL method (with callback as one of parameter): • register action (ID of command + callback + data+ …) • return immediately • implement actual command which will be called asynchronously from invokeAction • implement invokeAction switch which calls right command depend on ID ALMA Common Software course

  8. Mount4 • objfix -> objfix_async ALMA Common Software course

More Related