summaryrefslogtreecommitdiff
path: root/comm/BusAccess.h
diff options
context:
space:
mode:
authorchatty1997-06-25 13:54:36 +0000
committerchatty1997-06-25 13:54:36 +0000
commit68a44941a13f9a63fa78137441fe16644a83309f (patch)
treec0a02a2f3d730e3922e0a80f281db02bf83d16ca /comm/BusAccess.h
parentc3f953864d5a37997a7e32df76e33bc23e163911 (diff)
downloadivy-league-68a44941a13f9a63fa78137441fe16644a83309f.zip
ivy-league-68a44941a13f9a63fa78137441fe16644a83309f.tar.gz
ivy-league-68a44941a13f9a63fa78137441fe16644a83309f.tar.bz2
ivy-league-68a44941a13f9a63fa78137441fe16644a83309f.tar.xz
Initial revision
Diffstat (limited to 'comm/BusAccess.h')
-rw-r--r--comm/BusAccess.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/comm/BusAccess.h b/comm/BusAccess.h
new file mode 100644
index 0000000..e0bcdf1
--- /dev/null
+++ b/comm/BusAccess.h
@@ -0,0 +1,52 @@
+/*
+ * The Unix Channel
+ *
+ * by Michel Beaudouin-Lafon
+ *
+ * Copyright 1990-1997
+ * Laboratoire de Recherche en Informatique (LRI)
+ *
+ * Bus access, by Stephane Chatty
+ *
+ * $Id$
+ * $CurLog$
+ */
+
+
+#ifndef BusAccess_H_
+#define BusAccess_H_
+
+#include "Datagram.h"
+#include "Stream.h"
+#include "SignalHandler.h"
+#include "ccu/List.h"
+#include "ccu/IdTable.h"
+
+class UchBusSubscription;
+class UchBusTrigger;
+class DnnBaseReaction;
+
+class UchBusAccess : public UchDatagram, public UchBaseSignalHandler {
+friend class UchBusAgent;
+
+protected:
+static int Version;
+ sword ListenPort;
+ sword BroadcastPort;
+ UchStream* Server;
+ CcuListOf<UchBusAgent> Agents;
+ CcuListOf<UchBusTrigger> LocalSubscriptions;
+ CcuIdTableOf<UchBusTrigger> IdToSubscription;
+
+ void HandleRead ();
+ void DeferredHandle (int);
+ void HandleEvent (int, const char*);
+
+public:
+ UchBusAccess (sword);
+ ~UchBusAccess ();
+ void Subscribe (DnnBaseReaction&, const char*);
+ void Emit (const char*, ...);
+};
+
+#endif /* BusAccess_H_ */