fgms 0.11.8
The
FlightGear MultiPlayer Server
project
FG_Player Class Reference

Represent a Player. More...

#include <fg_list.hxx>

Inheritance diagram for FG_Player:
FG_ListElement

Public Member Functions

 FG_Player ()
 
 FG_Player (const string &Name)
 
 FG_Player (const FG_Player &P)
 
 ~FG_Player ()
 
void operator= (const FG_Player &P)
 
virtual bool operator== (const FG_ListElement &P)
 
virtual bool operator== (const FG_Player &P)
 
void UpdateRcvd (size_t bytes)
 
void UpdateSent (size_t bytes)
 

Public Attributes

netAddress Address
 The network address of this element. More...
 
uint64_t BytesRcvd
 Count of bytes recieved from client. More...
 
uint64_t BytesSent
 Count of bytes sent to client. More...
 
bool DoUpdate
 
string Error
 in case of errors the reason is stored here More...
 
bool HasErrors
 true if this client has errors More...
 
size_t ID
 The ID of this entry. More...
 
bool IsLocal
 true is this client is directly connected to this fgms instance More...
 
time_t JoinTime
 The time this entry was added to the list. More...
 
Point3D LastOrientation
 The last recorded orientation. More...
 
Point3D LastPos
 The last recorded position. More...
 
time_t LastRelayedToInactive
 
time_t LastSeen
 timestamp of last seen packet from this element More...
 
time_t LastSent
 timestamp of last sent packet to this element More...
 
string ModelName
 The model name. More...
 
string Name
 The callsign (or name) More...
 
string Origin
 
string Passwd
 The password. More...
 
uint64_t PktsRcvd
 Count of packets recieved from client. More...
 
uint64_t PktsSent
 Count of packets sent to client. More...
 
time_t Timeout
 The Timeout of this entry. More...
 

Static Public Attributes

static const size_t NONE_EXISTANT = (size_t) -1
 

Protected Member Functions

void assign (const FG_ListElement &P)
 

Private Member Functions

void assign (const FG_Player &P)
 

Detailed Description

Represent a Player.

Player objects are stored in the FG_SERVER::m_PlayerList They are created and added in FG_SERVER::AddClient They are dropped with FG_SERVER::DropClient after expiry time Clients are added even if they have bad data, see FG_SERVER::AddBadClient

Definition at line 97 of file fg_list.hxx.

Constructor & Destructor Documentation

FG_Player::FG_Player ( )

Definition at line 159 of file fg_list.cxx.

FG_Player::FG_Player ( const string &  Name)

Definition at line 176 of file fg_list.cxx.

FG_Player::FG_Player ( const FG_Player P)

Definition at line 195 of file fg_list.cxx.

FG_Player::~FG_Player ( )

Definition at line 205 of file fg_list.cxx.

Member Function Documentation

void FG_ListElement::assign ( const FG_ListElement P)
protectedinherited

Definition at line 113 of file fg_list.cxx.

Referenced by assign().

void FG_Player::assign ( const FG_Player P)
private

Definition at line 237 of file fg_list.cxx.

void FG_Player::operator= ( const FG_Player P)

Definition at line 213 of file fg_list.cxx.

bool FG_ListElement::operator== ( const FG_ListElement P)
virtualinherited

Definition at line 99 of file fg_list.cxx.

bool FG_Player::operator== ( const FG_Player P)
virtual

Definition at line 224 of file fg_list.cxx.

void FG_ListElement::UpdateRcvd ( size_t  bytes)
inherited

Definition at line 147 of file fg_list.cxx.

Referenced by FG_SERVER::AddBadClient().

void FG_ListElement::UpdateSent ( size_t  bytes)
inherited

Definition at line 134 of file fg_list.cxx.

Member Data Documentation

uint64_t FG_ListElement::BytesRcvd
inherited

Count of bytes recieved from client.

Definition at line 75 of file fg_list.hxx.

Referenced by FG_ListElement::assign(), FG_CLI::cmd_blacklist_show(), FG_CLI::cmd_relay_show(), and FG_CLI::cmd_user_show().

uint64_t FG_ListElement::BytesSent
inherited

Count of bytes sent to client.

Definition at line 77 of file fg_list.hxx.

Referenced by FG_ListElement::assign(), FG_CLI::cmd_crossfeed_show(), FG_CLI::cmd_relay_show(), and FG_CLI::cmd_user_show().

bool FG_Player::DoUpdate

true if we need to send updates to inactive relays

Definition at line 124 of file fg_list.hxx.

Referenced by assign(), and FG_SERVER::SendToRelays().

string FG_Player::Error

in case of errors the reason is stored here

See also
FG_SERVER::AddBadClient

Definition at line 116 of file fg_list.hxx.

Referenced by FG_SERVER::AddBadClient(), assign(), FG_CLI::cmd_user_show(), and FG_SERVER::HandleTelnet().

bool FG_Player::HasErrors

true if this client has errors

See also
FG_SERVER::AddBadClient

Definition at line 120 of file fg_list.hxx.

Referenced by FG_SERVER::AddBadClient(), assign(), FG_CLI::cmd_user_show(), and FG_SERVER::UpdateTracker().

bool FG_Player::IsLocal
time_t FG_ListElement::JoinTime
inherited

The time this entry was added to the list.

Definition at line 65 of file fg_list.hxx.

Referenced by FG_ListElement::assign(), assign(), FG_CLI::cmd_blacklist_show(), FG_CLI::cmd_crossfeed_show(), FG_CLI::cmd_relay_show(), and FG_CLI::cmd_user_show().

Point3D FG_Player::LastOrientation

The last recorded orientation.

Definition at line 110 of file fg_list.hxx.

Referenced by FG_SERVER::AddClient(), assign(), and FG_SERVER::HandleTelnet().

Point3D FG_Player::LastPos
time_t FG_Player::LastRelayedToInactive

when did we sent updates of this player to inactive relays

Definition at line 122 of file fg_list.hxx.

Referenced by assign(), and FG_CLI::cmd_user_show().

time_t FG_ListElement::LastSeen
inherited

timestamp of last seen packet from this element

Definition at line 67 of file fg_list.hxx.

Referenced by FG_SERVER::AddClient(), FG_ListElement::assign(), assign(), FG_CLI::cmd_blacklist_show(), FG_CLI::cmd_relay_show(), and FG_CLI::cmd_user_show().

time_t FG_ListElement::LastSent
inherited

timestamp of last sent packet to this element

Definition at line 69 of file fg_list.hxx.

Referenced by FG_ListElement::assign(), assign(), and FG_CLI::cmd_crossfeed_show().

string FG_Player::ModelName
const size_t FG_ListElement::NONE_EXISTANT = (size_t) -1
staticinherited

mark a nonexisting element

Definition at line 55 of file fg_list.hxx.

Referenced by FG_SERVER::HandlePacket(), FG_SERVER::Init(), FG_SERVER::IsInRange(), FG_SERVER::Show_Stats(), and FG_SERVER::UpdateTracker().

string FG_Player::Origin
string FG_Player::Passwd

The password.

Warning
This is not currently used

Definition at line 104 of file fg_list.hxx.

Referenced by FG_SERVER::AddClient(), assign(), and FG_SERVER::UpdateTracker().

uint64_t FG_ListElement::PktsRcvd
inherited

Count of packets recieved from client.

Definition at line 71 of file fg_list.hxx.

Referenced by FG_ListElement::assign(), FG_CLI::cmd_blacklist_show(), FG_CLI::cmd_relay_show(), and FG_CLI::cmd_user_show().

uint64_t FG_ListElement::PktsSent
inherited

Count of packets sent to client.

Definition at line 73 of file fg_list.hxx.

Referenced by FG_ListElement::assign(), FG_CLI::cmd_crossfeed_show(), FG_CLI::cmd_relay_show(), and FG_CLI::cmd_user_show().

time_t FG_ListElement::Timeout
inherited

The Timeout of this entry.

Definition at line 59 of file fg_list.hxx.

Referenced by FG_ListElement::assign(), FG_CLI::cmd_blacklist_show(), and FG_CLI::cmd_user_show().


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