<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16525" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>My question is not omniORB-specific; my apologies
if this is not the appropriate forum..</FONT></DIV>
<DIV><FONT face=Arial size=2>I'm implementing a "vehicle navigation service"
that can supply information to clients in two ways:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>1. "Synchronous": client obtains navigation service
proxy through Naming service, then invokes IDL-defined operation to get
position</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Here is an example of the IDL I am starting
with;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>module auv {</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2> interface Navigation {</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2> struct Position
{</FONT></DIV>
<DIV><FONT face="Courier New" size=2> float
latitude;</FONT></DIV>
<DIV><FONT face="Courier New" size=2> float
longitutde;</FONT></DIV>
<DIV><FONT face="Courier New" size=2> float
altitude;</FONT></DIV>
<DIV><FONT face="Courier New" size=2> };</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2> // Synchronous operation
to get vehicle position</FONT></DIV>
<DIV><FONT face="Courier New" size=2> void getPosition(out
Position p);</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2> // Define event name
that client can subscribe to</FONT></DIV>
<DIV><FONT face="Courier New" size=2> const string
NewPositionEvent = "NewPosition";</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2> // How to express the
event payload contents here, such that compiler enforces it???</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2> };</FONT></DIV>
<DIV><FONT face="Courier New" size=2>};</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks,</FONT></DIV>
<DIV><FONT face=Arial size=2>Tom</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></FONT></DIV>
<DIV><FONT face=Arial
size=2>--------------------------------------------------<BR>Thomas C.
O'Reilly<BR>Monterey Bay Aquarium Research Institute<BR>7700 Sandholdt
Road<BR>Moss Landing, California 95039-9644<BR>831-775-1766
(voice)<BR>831-775-1620 (FAX)<BR><A
href="mailto:oreilly@mbari.org">oreilly@mbari.org</A> (email)<BR><A
href="http://www.mbari.org">http://www.mbari.org</A> (World-wide
Web)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>"The machine does not isolate man from the great
mysteries<BR> of nature, but plunges him more deeply into
them."</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> - ANTOINE DE
SAINT-EXUPERY<BR> "Wind, Sand, and Stars"
(1939)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>