summaryrefslogtreecommitdiff
path: root/comm/BusAccess.h
diff options
context:
space:
mode:
Diffstat (limited to 'comm/BusAccess.h')
-rw-r--r--comm/BusAccess.h108
1 files changed, 50 insertions, 58 deletions
diff --git a/comm/BusAccess.h b/comm/BusAccess.h
index 4c18d5c..3d45db8 100644
--- a/comm/BusAccess.h
+++ b/comm/BusAccess.h
@@ -12,7 +12,6 @@
* $CurLog$
*/
-
#ifndef BusAccess_H_
#define BusAccess_H_
@@ -20,119 +19,112 @@
#include "Stream.h"
#include "BufStream.h"
#include "SignalHandler.h"
-#include "ccu/List.h"
-#include "ccu/IdTable.h"
-#include "ccu/String.h"
-#include "ccu/HashTable.h"
-#include "dnn/Event.h"
-#include "dnn/Trigger.h"
-
+#include "ivl/List.h"
+#include "ivl/IdTable.h"
+#include "ivl/String.h"
+#include "ivl/HashTable.h"
+#include "ivl/Event.h"
+#include "ivl/Trigger.h"
-class UchBusSubscription;
-class UchBusTrigger;
-class DnnBaseReaction;
+class IvlBusSubscription;
+class IvlBusTrigger;
+class IvlBaseReaction;
-class UchBusAccess : public UchDatagram, public UchBaseSignalHandler {
-friend class UchBusAgent;
+class IvlBusAccess : public IvlDatagram, public IvlBaseScheduledHandler {
+friend class IvlBusAgent;
protected:
static int Version;
static const char* const DefaultBus;
static const char* const DefaultBusNet;
static sword const DefaultBusPort;
- CcuString Name;
+ IvlString Name;
sword ListenPort;
sword BroadcastPort;
- UchStream* Server;
- CcuListOf<UchBusAgent> Agents;
- CcuListOf<UchBusTrigger> LocalSubscriptions;
- CcuIdTableOf<UchBusTrigger> IdToSubscription;
+ IvlStream* Server;
+ IvlListOf<IvlBusAgent> Agents;
+ IvlListOf<IvlBusTrigger> LocalSubscriptions;
+ IvlIdTableOf<IvlBusTrigger> IdToSubscription;
void HandleRead ();
void Clear ();
void DeferredHandle (int);
void HandleEvent (int, const char*);
- bool CheckUnicity (UchBusAgent*, sword);
+ bool CheckUnicity (IvlBusAgent*, sword);
public:
- DnnTrigger NewAgents;
+ IvlTrigger NewAgents;
- UchBusAccess (const char*, const char* = 0);
- ~UchBusAccess ();
- void Subscribe (DnnBaseReaction&, const char*, ...);
+ IvlBusAccess (const char*, const char* = 0);
+ ~IvlBusAccess ();
+ void Subscribe (IvlBaseReaction&, const char*, ...);
void Emit (const char*, ...);
};
-
-class UchBusAgent : public UchBufStream {
-friend class UchBusAccess;
-friend class UchBusServer;
+class IvlBusAgent : public IvlBufStream {
+friend class IvlBusAccess;
+friend class IvlBusServer;
protected:
- CcuListOf<UchBusSubscription> RemoteSubscriptions;
+ IvlListOf<IvlBusSubscription> RemoteSubscriptions;
sword RemoteId;
- UchBusAccess* MyBus;
- CcuString Name;
+ IvlBusAccess* MyBus;
+ IvlString Name;
void WriteString (const char*);
void ProcessLine (const char*);
- UchBusAgent (int, UchBusAccess*);
- UchBusAgent (const char*, sword, UchBusAccess*);
- ~UchBusAgent ();
+ IvlBusAgent (int, IvlBusAccess*);
+ IvlBusAgent (const char*, sword, IvlBusAccess*);
+ ~IvlBusAgent ();
void HandleRead ();
- void SendLocalSubscription (const UchBusTrigger*);
+ void SendLocalSubscription (const IvlBusTrigger*);
void SayHello ();
void SayBye ();
void EmitEvent (const char*);
public:
- DnnTrigger Bye;
- CcuHashedArrayOf<DnnTrigger> DirectMsg;
+ IvlTrigger Bye;
+ IvlHashedArrayOf<IvlTrigger> DirectMsg;
void Emit (int, const char*, ...);
inline const char* GetName () const { return Name; }
};
-class UchAgentEvent : public DnnEvent {
+class IvlAgentEvent : public IvlEvent {
public:
-static DnnEventType* BusNewAgent, *BusAgentBye;
+static IvlEventType* BusNewAgent, *BusAgentBye;
protected:
- UchBusAgent* Agent;
+ IvlBusAgent* Agent;
public:
- UchAgentEvent (UchBusAgent*, DnnEventType*);
- ~UchAgentEvent ();
-
+ IvlAgentEvent (IvlBusAgent*, IvlEventType*);
+ ~IvlAgentEvent ();
-inline UchBusAgent* GetAgent () const { return Agent;}
+inline IvlBusAgent* GetAgent () const { return Agent;}
};
-
-class UchDirectEvent : public DnnEvent {
+class IvlDirectEvent : public IvlEvent {
public:
- UchBusAgent* Agent;
- CcuString Msg;
+ IvlBusAgent* Agent;
+ IvlString Msg;
public:
- UchDirectEvent (UchBusAgent*, const char*);
- ~UchDirectEvent ();
+ IvlDirectEvent (IvlBusAgent*, const char*);
+ ~IvlDirectEvent ();
};
-
-
-class UchBusEvent : public DnnEvent {
+class IvlBusEvent : public IvlEvent {
public:
- CcuString Regexp;
+ IvlString Regexp;
int NbMatches;
- CcuListOf<CcuString> MatchList;
- CcuString Matches;
+ IvlListOf<IvlString> MatchList;
+ IvlString Matches;
- UchBusEvent (const char*, const char*);
- ~UchBusEvent ();
+ IvlBusEvent (const char*, const char*);
+ ~IvlBusEvent ();
};
-
#endif /* BusAccess_H_ */