00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef LINK_H
00027 #define LINK_H
00028
00029 #include <DCDT_Member.h>
00030 #include <DCDT_Channel.h>
00031
00032
00033 class DCDT_Link : public DCDT_Member {
00034
00035 public:
00036 DCDT_Link(DCDT_Agora *agora, int id, int r_id);
00037 ~DCDT_Link() {};
00038
00039 CommData* Prepare(int stat, CommData *l_cd, CommData *r_cd);
00040 void Init();
00041 void Close();
00042 void DoYourJob(int par = 0);
00043 void Subscribe(unsigned int *mask);
00044 CommData* GetCommData();
00045 CommData* Restart(int restart_status, CommData *l_cd, CommData *r_cd);
00046 void ResetToConnecting(CommData *l_cd, CommData *r_cd);
00047 void ChangeStatus(int newstat);
00048 int ReadStatus() { return status; };
00049 int ReadRemoteID() { return remoteID; };
00050 void SetCDs(CommData *l_cd, CommData *r_cd);
00051
00052 private:
00053 int linkID, remoteID;
00054 int creation_status, status, restart_counter, lost_counter;
00055 DCDT_Channel *channel;
00056 unsigned int mymask[NUMINT_MSGTYPE];
00057 CommData *localCD, *remoteCD;
00058 DCDT_Msg *msgsub, *msgrcv;
00059 unsigned int *subs_mask_rcv, subs_mask[NUMINT_MSGTYPE];
00060 int i;
00061
00062 };
00063
00064
00065 #endif //define