From 03a0143c0c6b55a97e910f229945620e81a756cb Mon Sep 17 00:00:00 2001
From: jacomi
Date: Thu, 18 Mar 1999 11:33:53 +0000
Subject: *** empty log message ***
---
doc/ivy-c.htm | 70 +++++++++++++++++++++++++++++++++++++++++++++--------------
1 file changed, 54 insertions(+), 16 deletions(-)
(limited to 'doc/ivy-c.htm')
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,
-useful library functions for communicating through a sofware bus
+useful set of library functions for communicating between different
+processes through a software bus
IvyInit(AppName, ready, callback, data, die_callback, die_data)
@@ -116,6 +117,7 @@ static void
void
IvyChannelAppContext(cntx)
+Only main functions are detailed in this section
IvyInit:
Initialisation of a connection
@@ -134,16 +136,22 @@ Initialisation of a connection
void *die_data
(in) user data
+
+IvyInit ("PLN-SERVER", "PLN-READY", NULL, NULL, NULL);
IvyStart:
Initialisation of TCP/UPD port and sending of a broadcast handshake on every network
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 IVYBUS,
-else use the default value : 127.255.255.255:2010
+(in)
- Bus to be used (format : network list followed by broadcast port).
+
+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
+IVYBUS is checked, else the default value : 127.255.255.255:2010
+is used (broadcast on the local machine).
+
+IvyStart ("143.196.53.255:2001");
IvyBindMsg:
Message binding
@@ -153,15 +161,30 @@ Message binding
(in) const_char *regexp
(in) MsgRcvPtr id
(out)
+
+IvyBindMsg (StartTimeCallback, 0, "^CLOCK Start time=(.*)");
+
+In this example the function StartTimeCallback will be called
+each time the string CLOCK Start time=(.*) will be emitted on
+the bus.
IvyUnbindMsg:
Message unbinding
MsgRcvPtr id
-(in)
+(in) ident of the message to unbind
+
+
+IvySendMsg:
+Sending a message
+
+const_char* fmt
+(in) - String to be sent on the bus
+
+
+IvySendMsg ("SECTOR:%s.AIRCRAFT:%s Entered", sectorname, pln->indicatif);
IvyChannelSetUp:
-
HANDLE fd
(in) void *data
@@ -169,15 +192,21 @@ Message unbinding
(in) ChannelHandleRead handle_read
(in) Channel out
(out)
+
+IvyChannelSetUp (0, NULL, NULL, HandleStdin);:
-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.
-
-Simple C code:
+
+Connection of the application IVYPROBE on a given bus
@@ -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);
};
/usr/include/ivy.h
+
/usr/include/ivyloop.h
+
/usr/include/ivysocket.h
-IVYDOMAINS
IVYBUS
+
+IVYDOMAINS
error messages displayed
-none !
+none reported yet!
Francois-Regis Colin <fcolin@cenatoulouse.dgac.fr>
Stephane Chatty <chatty@cenatoulouse.dgac.fr>
-
+
ivyprobe (1)
For further details, please refer to the Ivy html page at http://www.cenatls.cena.dgac.fr/pii/produits/Ivy.html
--
cgit v1.1