#include <DCDT_Finder.h>
Inheritance diagram for DCDT_Finder:
Public Member Functions | |
DCDT_Finder (DCDT_Agora *agora, FinderData *fd) | |
~DCDT_Finder () | |
void | Init () |
Initialize dynamic and static channels data structures. | |
CommData * | CreateLink (int r_id, int status, CommData *l_cd, CommData *r_cd, unsigned int profile) |
Create a new LinkRx system member and active it. | |
void | SetLinkStatus (int LinkID, int LinkStatus) |
void | SetLinkRemoteAgoraID (int LinkID, int id) |
int | IsPresent (int id) |
Check if there is link to the 'id' agora. | |
int | GetFirstFreeLinkTableSlot () |
void | DeleteLinkTableSlot (int LinkID) |
int | ActivateLink (DCDT_LinkRx *) |
void | CloseLink (int id) |
void | DoYourJob (int par=0) |
Private Member Functions | |
void | StaticLinks () |
Initialize data structures for static channels and open the communications channels needed. . | |
Private Attributes | |
FinderData * | finder_data |
DCDT_LinkTableElem | LinkTable [MAXLINKS] |
DCDT_TIME | old_ts |
DCDT_TIME | passed |
DCDT_TIME | start_ts |
Finder start time. | |
DCDT_TIME | new_ts |
Finder actual time. | |
DCDT_TIME | notify_ts |
When the last notify ( HS ) message was sent. | |
bool | starting_timer |
bool | linked |
bool | received |
Flag: true -> something was received in the current Finder cycle. | |
short | port |
int | remote_AgoraID |
char | from [INET_ADDRSTRLEN] |
CommData * | localCD |
Interface via which the messages was received. | |
CommData * | remoteCD |
Source address informations for the received message. | |
HSMsgHeader * | hs_header |
Header of the message that the Finder is processing. | |
int | linknum |
int | i |
ChannelTableElem | dynamic_channels [MAXCHANNELS] |
The finder is responsable of the communications links with the external world, outside the local machine. It tries to establish static communications links with external agora defined in the configuration file and waits for communications on the multicast port to find others agora on the local network.
Definition at line 53 of file DCDT_Finder.h.
|
Definition at line 35 of file DCDT_Finder.cpp. References _ChannelTableElem::active, _ChannelTableElem::channel, DeleteLinkTableSlot(), dynamic_channels, finder_data, FinderData, GetTime(), hs_header, i, localCD, passed, remoteCD, and starting_timer. |
|
Definition at line 54 of file DCDT_Finder.cpp. References _ChannelTableElem::channel, dynamic_channels, finder_data, and _FinderData::fp. |
|
|
|
Definition at line 315 of file DCDT_Finder.cpp. References DCDT_TRC_COMM, DeleteLinkTableSlot(), LinkTable, DCDT_Agora::RemoveMember(), and TRC_PRINT. Referenced by DCDT_LinkRx::DoYourJob(). |
|
Create a new LinkRx system member and active it.
Definition at line 287 of file DCDT_Finder.cpp. References DCDT_Agora::ActivateMember(), DCDT_Agora::AddSysMember(), DCDT_TRC_COMM, GetFirstFreeLinkTableSlot(), _DCDT_LinkTableElem::LinkPtr, LinkTable, DCDT_LinkRx::Prepare(), and TRC_PRINT. Referenced by DoYourJob(). |
|
Definition at line 138 of file DCDT_Finder.h. References _DCDT_LinkTableElem::freeSlot, LinkTable, DCDT_Mutex::lock(), _DCDT_LinkTableElem::mtx, and DCDT_Mutex::unlock(). Referenced by CloseLink(), and DCDT_Finder(). |
|
|
Definition at line 124 of file DCDT_Finder.h. References _DCDT_LinkTableElem::freeSlot, i, LinkTable, DCDT_Mutex::lock(), _DCDT_LinkTableElem::mtx, and DCDT_Mutex::unlock(). Referenced by CreateLink(). |
|
Initialize dynamic and static channels data structures.
The dynamic channel ( channel 0 ) is the multicast channel used to talk with others Agora connected to the local network. Reimplemented from DCDT_Member. Definition at line 76 of file DCDT_Finder.cpp. References _ChannelTableElem::active, _ChannelTableElem::channel, _ChannelTableElem::dynamic, dynamic_channels, finder_data, GetTime(), i, _FinderData::IfNumAddr, _FinderData::McNumAddr, _FinderData::McPort, notify_ts, old_ts, DCDT_Channel::SendNotify(), start_ts, and StaticLinks(). |
|
Check if there is link to the 'id' agora.
Definition at line 305 of file DCDT_Finder.cpp. References _DCDT_LinkTableElem::freeSlot, i, _DCDT_LinkTableElem::LinkPtr, LinkTable, and DCDT_LinkRx::ReadRemoteID(). Referenced by DoYourJob(). |
|
Definition at line 119 of file DCDT_Finder.h. References LinkTable, and _DCDT_LinkTableElem::remoteID. |
|
Definition at line 114 of file DCDT_Finder.h. References LinkTable, and _DCDT_LinkTableElem::status. |
|
Initialize data structures for static channels and open the communications channels needed.
For IP channel open a socket and bind it to the address written in the configuration file.
Definition at line 330 of file DCDT_Finder.cpp. References _ChannelTableElem::active, _ChannelTableElem::channel, DCDT_TRC_COMM, _ChannelTableElem::dynamic, dynamic_channels, finder_data, _FinderData::fp, starting_timer, and TRC_PRINT. Referenced by Init(). |
|
Definition at line 110 of file DCDT_Finder.h. Referenced by DCDT_Finder(), DoYourJob(), Init(), StaticLinks(), and ~DCDT_Finder(). |
|
Definition at line 77 of file DCDT_Finder.h. Referenced by DCDT_Finder(), Init(), StaticLinks(), and ~DCDT_Finder(). |
|
Definition at line 98 of file DCDT_Finder.h. |
|
Header of the message that the Finder is processing.
Definition at line 108 of file DCDT_Finder.h. Referenced by DCDT_Finder(), and DoYourJob(). |
|
Definition at line 109 of file DCDT_Finder.h. Referenced by DCDT_Finder(), DoYourJob(), GetFirstFreeLinkTableSlot(), Init(), and IsPresent(). |
|
Definition at line 93 of file DCDT_Finder.h. Referenced by DoYourJob(). |
|
Definition at line 109 of file DCDT_Finder.h. Referenced by DoYourJob(). |
|
Definition at line 78 of file DCDT_Finder.h. Referenced by CloseLink(), CreateLink(), DeleteLinkTableSlot(), DoYourJob(), GetFirstFreeLinkTableSlot(), IsPresent(), SetLinkRemoteAgoraID(), and SetLinkStatus(). |
|
Interface via which the messages was received.
Definition at line 103 of file DCDT_Finder.h. Referenced by DCDT_Finder(), and DoYourJob(). |
|
Finder actual time.
Definition at line 86 of file DCDT_Finder.h. Referenced by DoYourJob(). |
|
When the last notify ( HS ) message was sent.
Definition at line 86 of file DCDT_Finder.h. Referenced by DoYourJob(), and Init(). |
|
Definition at line 82 of file DCDT_Finder.h. Referenced by DoYourJob(), and Init(). |
|
Definition at line 82 of file DCDT_Finder.h. Referenced by DCDT_Finder(), and DoYourJob(). |
|
Definition at line 96 of file DCDT_Finder.h. |
|
Flag: true -> something was received in the current Finder cycle.
Definition at line 93 of file DCDT_Finder.h. Referenced by DoYourJob(). |
|
Definition at line 97 of file DCDT_Finder.h. |
|
Source address informations for the received message.
Definition at line 103 of file DCDT_Finder.h. Referenced by DCDT_Finder(), and DoYourJob(). |
|
Finder start time.
Definition at line 86 of file DCDT_Finder.h. Referenced by Init(). |
|
Definition at line 92 of file DCDT_Finder.h. Referenced by DCDT_Finder(), DoYourJob(), and StaticLinks(). |