summaryrefslogtreecommitdiff
path: root/doc/ivy-c.1
diff options
context:
space:
mode:
authorjacomi1999-03-18 11:33:53 +0000
committerjacomi1999-03-18 11:33:53 +0000
commit03a0143c0c6b55a97e910f229945620e81a756cb (patch)
tree2090762f1e70c06ee58117969168d7559f6b23d0 /doc/ivy-c.1
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/ivy-c.1')
-rw-r--r--doc/ivy-c.166
1 files changed, 51 insertions, 15 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>