From 68a44941a13f9a63fa78137441fe16644a83309f Mon Sep 17 00:00:00 2001 From: chatty Date: Wed, 25 Jun 1997 13:54:36 +0000 Subject: Initial revision --- comm/BusAccess.h | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 comm/BusAccess.h (limited to 'comm/BusAccess.h') 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 Agents; + CcuListOf LocalSubscriptions; + CcuIdTableOf 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_ */ -- cgit v1.1