[omniORB] IDL semantics of event publication (including event payload)

Tom O'Reilly oreilly at mbari.org
Tue Sep 18 18:01:26 BST 2007


My question is not omniORB-specific; my apologies if this is not the appropriate forum..
I'm implementing a "vehicle navigation service" that can supply information to clients in two ways:

1. "Synchronous": client obtains navigation service proxy through Naming service, then invokes IDL-defined operation to get position

2. Subscribe-publish: Client subscribes to "new position" events from the navigation service through CosNotification;  the navigation service will then supply events - including vehicle coordinates as event "payload" - to CosNotification service, which will distribute to subscribers. 


How to best express these two capabilities in IDL?  The synchronous operation is obviously straightforward. But how do developer's (client and server programmers) know from the IDL that the service can publish "new position" events as well, and that the event "payload" includes the new position coordinates?

Here is an example of the IDL I am starting with;

module auv {

  interface Navigation {

    struct Position {
      float latitude;
      float longitutde;
      float altitude;
    };

    // Synchronous operation to get vehicle position
    void getPosition(out Position p);

    // Define event name that client can subscribe to
    const string NewPositionEvent = "NewPosition";

    // How to express the event payload contents here, such that compiler enforces it???

  };
};


Thanks,
Tom


--------------------------------------------------
Thomas C. O'Reilly
Monterey Bay Aquarium Research Institute
7700 Sandholdt Road
Moss Landing, California 95039-9644
831-775-1766 (voice)
831-775-1620 (FAX)
oreilly at mbari.org (email)
http://www.mbari.org (World-wide Web)

"The machine does not isolate man from the great mysteries
 of nature, but plunges him more deeply into them."

   - ANTOINE DE SAINT-EXUPERY
     "Wind, Sand, and Stars" (1939)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20070918/3de92079/attachment.htm


More information about the omniORB-list mailing list