summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorjacomi1999-03-18 11:33:53 +0000
committerjacomi1999-03-18 11:33:53 +0000
commit03a0143c0c6b55a97e910f229945620e81a756cb (patch)
tree2090762f1e70c06ee58117969168d7559f6b23d0 /doc
parent7cfa818995332e8b54fc1831bacdf9c2d131155c (diff)
downloadivy-c-03a0143c0c6b55a97e910f229945620e81a756cb.zip
ivy-c-03a0143c0c6b55a97e910f229945620e81a756cb.tar.gz
ivy-c-03a0143c0c6b55a97e910f229945620e81a756cb.tar.bz2
ivy-c-03a0143c0c6b55a97e910f229945620e81a756cb.tar.xz
*** empty log message ***
Diffstat (limited to 'doc')
-rw-r--r--doc/ivy-c.166
-rw-r--r--doc/ivy-c.htm70
2 files changed, 105 insertions, 31 deletions
diff --git a/doc/ivy-c.1 b/doc/ivy-c.1
index 00472e2..4912340 100644
--- a/doc/ivy-c.1
+++ b/doc/ivy-c.1
@@ -42,7 +42,7 @@
'\" # BS - start boxed text
'\" # ^y = starting y location
'\" # ^b = 1
-.TH Ivy-c 1 3.0 "Ivy-c Library Functions"
+.TH Ivy-c-3.0 1 3.0 "Ivy-c-3.0 Library Functions"
.SH NAME
IvyInit, IvyStart, IvyStop, IvyBindMsg, IvyUnbindMsg, IvyBindDirectMsg,
IvySendMsg, IvySendDirectMsg, IvySendDieMsg, IvySendError, IvyGetApplicationName,
@@ -54,7 +54,8 @@ IvyChannelHandleExcpt, IvyXtChannelInit, IvyXtChannelSetUp
IvyXtChannelClose, IvyXtHandleChannelRead, IvyXtHandleChannelDelete,
IvyXtChannelAppContext,
.SH SYNOPSIS
-useful library functions for communicating through a sofware bus
+useful set of library functions for communicating between different
+processes through a software bus
.nf
.sp
\fBIvyInit(\fIAppName, ready, callback, data, die_callback, die_data\fB)\fR
@@ -145,6 +146,7 @@ static void
void
\fBIvyChannelAppContext(\fIcntx\fB)\fR
.SH ARGUMENTS
+Only main functions are detailed in this section
.SH
\fBIvyInit\fR:
Initialisation of a connection
@@ -162,14 +164,20 @@ user data
last change callback before die
.AP void *die_data in
user data
+.SH Example:
+\fBIvyInit ("PLN-SERVER", "PLN-READY", NULL, NULL, NULL);\fR
.SH
\fBIvyStart\fR:
Initialisation of TCP/UPD port and sending of a broadcast handshake on every network
.AP const_char *bus in
-Bus (format : network list followed by broadcast port) example :
-123.231,123.123:2000 or 123.231 or :2000
-If no argument specified, check the environment variable \fBIVYBUS\fR,
-else use the default value : 127.255.255.255:2010
+Bus to be used (format : network list followed by broadcast port).
+.SH Example:
+the given bus can be a string like 123.231,123.123:2000 or 123.231 or
+:2000. If no argument is specified, then the environment variable
+\fBIVYBUS\fR is checked, else the default value : 127.255.255.255:2010
+is used (broadcast on the local machine).
+.nf
+\fBIvyStart ("143.196.53.255:2001");\fR
.SH
\fBIvyBindMsg\fR:
Message binding
@@ -177,27 +185,46 @@ Message binding
.AP void *user_data in
.AP const_char *regexp in
.AP MsgRcvPtr id out
+.SH Example:
+\fBIvyBindMsg (StartTimeCallback, 0, "^CLOCK Start time=(.*)");\fR
+.nf
+In this example the function \fBStartTimeCallback\fR will be called
+each time the string \fBCLOCK Start time=(.*)\fR will be emitted on
+the bus.
.SH
\fBIvyUnbindMsg\fR:
Message unbinding
.AP MsgRcvPtr id in
+ident of the message to unbind
+.SH
+\fBIvySendMsg\fR:
+Sending a message
+.AP const_char* fmt in
+String to be sent on the bus
+.SH Example:
+\fBIvySendMsg ("SECTOR:%s.AIRCRAFT:%s Entered", sectorname, pln->indicatif);\fR
.SH
\fBIvyChannelSetUp\fR:
-
.AP HANDLE fd in
.AP void *data in
.AP ChannelHandleDelete handle_delete in
.AP ChannelHandleRead handle_read in
.AP Channel out out
+.SH Example:
+\fBIvyChannelSetUp (0, NULL, NULL, HandleStdin);\fR:
.VE
.BE
.SH DESCRIPTION
.PP
-These procedures provide facilities for connecting applications on a
+These functions provide facilities for connecting applications on a
software bus and managing messages exchanges among them.
+Each time an application initializes a connection on the bus, a
+"ready" message is sent to all other applications already connected, and the
+list of the messages subscribed by this application is dispatched.
+The format for the messages is free.
-.SH EXAMPLES
-Simple C code:
+.SH EXAMPLE
+Connection of the application \fBIVYPROBE\fR on a given bus
.nf
.DS
@@ -207,30 +234,39 @@ Simple C code:
#include "ivy.h"
int main (int argc, char* argv[]){
+/* bus domain and port number to be used */
+ const char* bus="127.255.255.255:2010";
+/* initialisation of the connection */
IvyInit ("IVYPROBE",
bport,
"IVYPROBE READY",
ApplicationCallback,
NULL,
NULL,
- NULL)
+ NULL);
+/* keyboard's inputs management */
IvyChannelSetUp(0, NULL, NULL, HandleStdin);
- IvyStart (domains);
- IvyMainLoop(0)
+/* starting the connection */
+ IvyStart (bus);
+/* Main loop */
+ IvyMainLoop(0);
};
.DE
.SH FILES
.I /usr/include/ivy.h
+.nf
.I /usr/include/ivyloop.h
+.nf
.I /usr/include/ivysocket.h
.SH ENVIRONMENT
-.I IVYDOMAINS
.I IVYBUS
+.nf
+.I IVYDOMAINS
.SH DIAGNOSTICS
error messages displayed
.SH BUGS
-none !
+none reported yet!
.SH AUTHORS
Francois-Regis Colin <fcolin@cenatoulouse.dgac.fr>
Stephane Chatty <chatty@cenatoulouse.dgac.fr>
diff --git a/doc/ivy-c.htm b/doc/ivy-c.htm
index 5521560..8256c39 100644
--- a/doc/ivy-c.htm
+++ b/doc/ivy-c.htm
@@ -25,7 +25,8 @@ IvyChannelHandleExcpt, IvyXtChannelInit, IvyXtChannelSetUp
IvyXtChannelClose, IvyXtHandleChannelRead, IvyXtHandleChannelDelete,
IvyXtChannelAppContext,
<H2><A NAME=SYNOPSIS>SYNOPSIS</A></H2>
-useful library functions for communicating through a sofware bus
+useful set of library functions for communicating between different
+processes through a software bus
<BR>
<P>
<B>IvyInit(</B><I>AppName, ready, callback, data, die_callback, die_data</I><B>)</B>
@@ -116,6 +117,7 @@ static void
void
<B>IvyChannelAppContext(</B><I>cntx</I><B>)</B>
<H2><A NAME=ARGUMENTS>ARGUMENTS</A></H2>
+Only main functions are detailed in this section
<H2><A NAME=Section0></A></H2>
<B>IvyInit</B>:
Initialisation of a connection
@@ -134,16 +136,22 @@ Initialisation of a connection
<DT><CODE>void *die_data</CODE>
(in) <DD>user data
</DL>
+<H2><A NAME=Section1>Example:</A></H2>
+<B>IvyInit ("PLN-SERVER", "PLN-READY", NULL, NULL, NULL);</B>
<H2><A NAME=Section0></A></H2>
<B>IvyStart</B>:
Initialisation of TCP/UPD port and sending of a broadcast handshake on every network
<DL>
<DT><CODE>const_char *bus</CODE>
-(in) <DD>Bus (format : network list followed by broadcast port) example :
-123.231,123.123:2000 or 123.231 or :2000
-If no argument specified, check the environment variable <B>IVYBUS</B>,
-else use the default value : 127.255.255.255:2010
+(in) <DD>Bus to be used (format : network list followed by broadcast port).
</DL>
+<H2><A NAME=Section1>Example:</A></H2>
+the given bus can be a string like 123.231,123.123:2000 or 123.231 or
+:2000. If no argument is specified, then the environment variable
+<B>IVYBUS</B> is checked, else the default value : 127.255.255.255:2010
+is used (broadcast on the local machine).
+<BR>
+<B>IvyStart ("143.196.53.255:2001");</B>
<H2><A NAME=Section0></A></H2>
<B>IvyBindMsg</B>:
Message binding
@@ -153,15 +161,30 @@ Message binding
(in) <DD><DT><CODE>const_char *regexp</CODE>
(in) <DD><DT><CODE>MsgRcvPtr id</CODE>
(out) <DD></DL>
+<H2><A NAME=Section1>Example:</A></H2>
+<B>IvyBindMsg (StartTimeCallback, 0, "^CLOCK Start time=(.*)");</B>
+<BR>
+In this example the function <B>StartTimeCallback</B> will be called
+each time the string <B>CLOCK Start time=(.*)</B> will be emitted on
+the bus.
<H2><A NAME=Section0></A></H2>
<B>IvyUnbindMsg</B>:
Message unbinding
<DL>
<DT><CODE>MsgRcvPtr id</CODE>
-(in) <DD></DL>
+(in) <DD>ident of the message to unbind
+</DL>
+<H2><A NAME=Section0></A></H2>
+<B>IvySendMsg</B>:
+Sending a message
+<DL>
+<DT><CODE>const_char* fmt</CODE>
+(in) <DD>String to be sent on the bus
+</DL>
+<H2><A NAME=Section1>Example:</A></H2>
+<B>IvySendMsg ("SECTOR:%s.AIRCRAFT:%s Entered", sectorname, pln-&gt;indicatif);</B>
<H2><A NAME=Section0></A></H2>
<B>IvyChannelSetUp</B>:
-
<DL>
<DT><CODE>HANDLE fd</CODE>
(in) <DD><DT><CODE>void *data</CODE>
@@ -169,15 +192,21 @@ Message unbinding
(in) <DD><DT><CODE>ChannelHandleRead handle_read</CODE>
(in) <DD><DT><CODE>Channel out</CODE>
(out) <DD></DL>
+<H2><A NAME=Section1>Example:</A></H2>
+<B>IvyChannelSetUp (0, NULL, NULL, HandleStdin);</B>:
<HR>
<BR>
<H2><A NAME=DESCRIPTION>DESCRIPTION</A></H2>
<P>
-These procedures provide facilities for connecting applications on a
+These functions provide facilities for connecting applications on a
software bus and managing messages exchanges among them.
+Each time an application initializes a connection on the bus, a
+"ready" message is sent to all other applications already connected, and the
+list of the messages subscribed by this application is dispatched.
+The format for the messages is free.
-<H2><A NAME=EXAMPLES>EXAMPLES</A></H2>
-Simple C code:
+<H2><A NAME=EXAMPLE>EXAMPLE</A></H2>
+Connection of the application <B>IVYPROBE</B> on a given bus
<BR>
<BR>
@@ -188,35 +217,44 @@ Simple C code:
#include "ivy.h"
int main (int argc, char* argv[]){
+/* bus domain and port number to be used */
+ const char* bus="127.255.255.255:2010";
+/* initialisation of the connection */
IvyInit ("IVYPROBE",
bport,
"IVYPROBE READY",
ApplicationCallback,
NULL,
NULL,
- NULL)
+ NULL);
+/* keyboard's inputs management */
IvyChannelSetUp(0, NULL, NULL, HandleStdin);
- IvyStart (domains);
- IvyMainLoop(0)
+/* starting the connection */
+ IvyStart (bus);
+/* Main loop */
+ IvyMainLoop(0);
};
<BR>
</PRE>
<H2><A NAME=FILES>FILES</A></H2>
<I>/usr/include/ivy.h</I>
+<BR>
<I>/usr/include/ivyloop.h</I>
+<BR>
<I>/usr/include/ivysocket.h</I>
<H2><A NAME=ENVIRONMENT>ENVIRONMENT</A></H2>
-<I>IVYDOMAINS</I>
<I>IVYBUS</I>
+<BR>
+<I>IVYDOMAINS</I>
<H2><A NAME=DIAGNOSTICS>DIAGNOSTICS</A></H2>
error messages displayed
<H2><A NAME=BUGS>BUGS</A></H2>
-none !
+none reported yet!
<H2><A NAME=AUTHORS>AUTHORS</A></H2>
Francois-Regis Colin &lt;fcolin@cenatoulouse.dgac.fr&gt;
Stephane Chatty &lt;chatty@cenatoulouse.dgac.fr&gt;
-<H2><A NAME=Section1>SEE ALSO</A></H2>
+<H2><A NAME=Section2>SEE ALSO</A></H2>
ivyprobe (1)
<P>
For further details, please refer to the Ivy html page at http://www.cenatls.cena.dgac.fr/pii/produits/Ivy.html