fgms 0.11.8
The
FlightGear MultiPlayer Server
project
FG_TRACKER Class Reference

The tracker class. More...

#include <fg_tracker.hxx>

Public Types

typedef vMSG::iterator VI
 
typedef std::vector< std::string > vMSG
 

Public Member Functions

 FG_TRACKER (int port, string server, int id)
 Initialize to standard values. More...
 
 ~FG_TRACKER ()
 xTerminate the tracker More...
 
void AddMessage (const string &message)
 
bool Connect ()
 
pthread_t GetThreadID ()
 
int GetTrackerPort ()
 Return the port no of the tracker. More...
 
string GetTrackerServer ()
 Return the server of the tracker. More...
 
int Loop ()
 Send the messages to the tracker server. More...
 
void ReadQueue ()
 
void ReplyToServer (const string &str)
 
void TrackerRead ()
 
int TrackerWrite (const string &str)
 
void WriteQueue ()
 

Public Attributes

uint64_t BytesRcvd
 
uint64_t BytesSent
 
pthread_cond_t condition_var
 
time_t LastConnected
 
time_t LastSeen
 
time_t LastSent
 
size_t LostConnections
 
bool m_connected
 
int m_TrackerPort
 
string m_TrackerServer
 
netSocketm_TrackerSocket
 
pthread_mutex_t msg_mutex
 
vMSG msg_queue
 
pthread_t MyThreadID
 
uint64_t PktsRcvd
 
uint64_t PktsSent
 
bool WantExit
 

Detailed Description

The tracker class.

Definition at line 47 of file fg_tracker.hxx.

Member Typedef Documentation

typedef vMSG::iterator FG_TRACKER::VI

Definition at line 101 of file fg_tracker.hxx.

typedef std::vector<std::string> FG_TRACKER::vMSG

Definition at line 100 of file fg_tracker.hxx.

Constructor & Destructor Documentation

FG_TRACKER::FG_TRACKER ( int  port,
string  server,
int  id 
)

Initialize to standard values.

Parameters
port
serverip or domain
idwhat is id? – todo –

Definition at line 75 of file fg_tracker.cxx.

FG_TRACKER::~FG_TRACKER ( )

xTerminate the tracker

Definition at line 99 of file fg_tracker.cxx.

Member Function Documentation

void FG_TRACKER::AddMessage ( const string &  message)

Definition at line 156 of file fg_tracker.cxx.

Referenced by Loop().

bool FG_TRACKER::Connect ( )

Definition at line 411 of file fg_tracker.cxx.

Referenced by Loop().

pthread_t FG_TRACKER::GetThreadID ( )

Definition at line 116 of file fg_tracker.cxx.

int FG_TRACKER::GetTrackerPort ( )
inline

Return the port no of the tracker.

Return values
intPort Number

Definition at line 76 of file fg_tracker.hxx.

Referenced by FG_CLI::cmd_tracker_show().

string FG_TRACKER::GetTrackerServer ( )
inline

Return the server of the tracker.

Return values
stringReturn tracker server as string

Definition at line 70 of file fg_tracker.hxx.

Referenced by FG_CLI::cmd_show_version(), and FG_CLI::cmd_tracker_show().

int FG_TRACKER::Loop ( )

Send the messages to the tracker server.

Definition at line 313 of file fg_tracker.cxx.

Referenced by detach_tracker().

void FG_TRACKER::ReadQueue ( )

Definition at line 237 of file fg_tracker.cxx.

Referenced by Loop().

void FG_TRACKER::ReplyToServer ( const string &  str)

Definition at line 209 of file fg_tracker.cxx.

Referenced by TrackerRead().

void FG_TRACKER::TrackerRead ( )

Definition at line 279 of file fg_tracker.cxx.

Referenced by Loop(), and ReadQueue().

int FG_TRACKER::TrackerWrite ( const string &  str)

Definition at line 178 of file fg_tracker.cxx.

Referenced by Connect(), Loop(), ReadQueue(), and ReplyToServer().

void FG_TRACKER::WriteQueue ( )

Definition at line 124 of file fg_tracker.cxx.

Referenced by ~FG_TRACKER().

Member Data Documentation

uint64_t FG_TRACKER::BytesRcvd

Definition at line 113 of file fg_tracker.hxx.

Referenced by FG_CLI::cmd_tracker_show(), FG_TRACKER(), and TrackerRead().

uint64_t FG_TRACKER::BytesSent

Definition at line 112 of file fg_tracker.hxx.

Referenced by FG_CLI::cmd_tracker_show(), FG_TRACKER(), and TrackerWrite().

pthread_cond_t FG_TRACKER::condition_var

Definition at line 103 of file fg_tracker.hxx.

Referenced by Loop().

time_t FG_TRACKER::LastConnected

Definition at line 109 of file fg_tracker.hxx.

Referenced by FG_CLI::cmd_tracker_show(), Connect(), and FG_TRACKER().

time_t FG_TRACKER::LastSeen

Definition at line 110 of file fg_tracker.hxx.

Referenced by FG_CLI::cmd_tracker_show(), FG_TRACKER(), and TrackerRead().

time_t FG_TRACKER::LastSent

Definition at line 111 of file fg_tracker.hxx.

Referenced by FG_CLI::cmd_tracker_show(), FG_TRACKER(), and TrackerWrite().

size_t FG_TRACKER::LostConnections

Definition at line 116 of file fg_tracker.hxx.

Referenced by FG_CLI::cmd_tracker_show(), FG_TRACKER(), TrackerRead(), and TrackerWrite().

bool FG_TRACKER::m_connected
int FG_TRACKER::m_TrackerPort

Definition at line 95 of file fg_tracker.hxx.

Referenced by Connect(), and FG_TRACKER().

string FG_TRACKER::m_TrackerServer

Definition at line 96 of file fg_tracker.hxx.

Referenced by Connect(), and FG_TRACKER().

netSocket* FG_TRACKER::m_TrackerSocket

Definition at line 98 of file fg_tracker.hxx.

Referenced by Connect(), FG_TRACKER(), TrackerRead(), TrackerWrite(), and ~FG_TRACKER().

pthread_mutex_t FG_TRACKER::msg_mutex

Definition at line 102 of file fg_tracker.hxx.

Referenced by Loop(), ReadQueue(), WriteQueue(), and ~FG_TRACKER().

vMSG FG_TRACKER::msg_queue

Definition at line 104 of file fg_tracker.hxx.

Referenced by FG_CLI::cmd_tracker_show(), Loop(), ReadQueue(), WriteQueue(), and ~FG_TRACKER().

pthread_t FG_TRACKER::MyThreadID

Definition at line 117 of file fg_tracker.hxx.

Referenced by Loop().

uint64_t FG_TRACKER::PktsRcvd

Definition at line 115 of file fg_tracker.hxx.

Referenced by FG_CLI::cmd_tracker_show(), FG_TRACKER(), and TrackerRead().

uint64_t FG_TRACKER::PktsSent

Definition at line 114 of file fg_tracker.hxx.

Referenced by FG_CLI::cmd_tracker_show(), FG_TRACKER(), and TrackerWrite().

bool FG_TRACKER::WantExit

Definition at line 105 of file fg_tracker.hxx.

Referenced by FG_TRACKER(), and Loop().


The documentation for this class was generated from the following files: