00001 // Filename: pStatMonitor.I00002 // Created by: drose (14Jul00)00003 //00004 ////////////////////////////////////////////////////////////////////00005 //00006 // PANDA 3D SOFTWARE00007 // Copyright (c) Carnegie Mellon University. All rights reserved.00008 //00009 // All use of this software is subject to the terms of the revised BSD00010 // license. You should have received a copy of this license along00011 // with this source code in a file named "LICENSE."00012 //00013 ////////////////////////////////////////////////////////////////////00014
00015
00016 ////////////////////////////////////////////////////////////////////00017 // Function: PStatMonitor::get_server00018 // Access: Public00019 // Description: Returns the server that owns this monitor.00020 ////////////////////////////////////////////////////////////////////00021 INLINE PStatServer *PStatMonitor::00022get_server() {
00023 return _server;
00024 }
00025
00026 ////////////////////////////////////////////////////////////////////00027 // Function: PStatMonitor::get_client_data00028 // Access: Public00029 // Description: Returns the client data associated with this monitor.00030 ////////////////////////////////////////////////////////////////////00031 INLINE constPStatClientData *PStatMonitor::00032get_client_data() const {
00033 return _client_data;
00034 }
00035
00036 ////////////////////////////////////////////////////////////////////00037 // Function: PStatMonitor::get_collector_name00038 // Access: Public00039 // Description: Returns the name of the indicated collector, if it is00040 // known.00041 ////////////////////////////////////////////////////////////////////00042 INLINE stringPStatMonitor::00043get_collector_name(int collector_index) {
00044 if (!_client_data.is_null() &&
00045 _client_data->has_collector(collector_index)) {
00046 return _client_data->get_collector_name(collector_index);
00047 }
00048 return"Unknown";
00049 }
00050
00051 ////////////////////////////////////////////////////////////////////00052 // Function: PStatMonitor::is_client_known00053 // Access: Public00054 // Description: Returns true if we've yet received the "hello"00055 // message from the client indicating its name, etc.00056 ////////////////////////////////////////////////////////////////////00057 INLINE boolPStatMonitor::00058is_client_known() const {
00059 return _client_known;
00060 }
00061
00062 ////////////////////////////////////////////////////////////////////00063 // Function: PStatMonitor::get_client_hostname00064 // Access: Public00065 // Description: Returns the hostname of the client we're connected00066 // to, if known. This may not be known immediately at00067 // creation time, but should be learned shortly00068 // thereafter when we receive the client's "hello"00069 // message. See is_client_known().00070 ////////////////////////////////////////////////////////////////////00071 INLINE stringPStatMonitor::00072get_client_hostname() const {
00073 return _client_hostname;
00074 }
00075
00076 ////////////////////////////////////////////////////////////////////00077 // Function: PStatMonitor::get_client_progname00078 // Access: Public00079 // Description: Returns the program name of the client we're00080 // connected to, if known. This may not be known00081 // immediately at creation time, but should be learned00082 // shortly thereafter when we receive the client's00083 // "hello" message. See is_client_known().00084 ////////////////////////////////////////////////////////////////////00085 INLINE stringPStatMonitor::00086get_client_progname() const {
00087 return _client_progname;
00088 }