Go to the documentation of this file.
14 #ifndef PSTATMONITOR_H
15 #define PSTATMONITOR_H
46 void hello_from(
const std::string &hostname,
const std::string &progname);
47 void bad_version(
const std::string &hostname,
const std::string &progname,
48 int client_major,
int client_minor,
49 int server_major,
int server_minor);
74 virtual std::string get_monitor_name()=0;
79 int server_major,
int server_minor);
82 virtual void new_data(
int thread_index,
int frame_number);
99 std::string _client_hostname;
100 std::string _client_progname;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PStatServer * get_server()
Returns the server that owns this monitor.
virtual void idle()
If has_idle() returns true, this will be called periodically to allow the monitor to update its displ...
void set_client_data(PStatClientData *client_data)
Called by the PStatServer at setup time to set the new data pointer for the first time.
void bad_version(const std::string &hostname, const std::string &progname, int client_major, int client_minor, int server_major, int server_minor)
Called shortly after startup time with the greeting from the client.
The overall manager of the network connections.
std::string get_collector_name(int collector_index)
Returns the name of the indicated collector, if it is known.
A base class for all things that want to be reference-counted.
const LRGBColor & get_collector_color(int collector_index)
Returns the color associated with the indicated collector.
virtual bool has_idle()
Should be redefined to return true if you want to redefine idle() and expect it to be called.
Defines the details about the Collectors: the name, the suggested color, etc.
virtual void new_data(int thread_index, int frame_number)
Called as each frame's data is made available.
virtual void got_bad_version(int client_major, int client_minor, int server_major, int server_minor)
Like got_hello(), this is called when the "hello" message has been received from the client.
void hello_from(const std::string &hostname, const std::string &progname)
Called shortly after startup time with the greeting from the client.
std::string get_client_progname() const
Returns the program name of the client we're connected to, if known.
The data associated with a particular client, but not with any one particular frame or thread: the li...
A View boils down the frame data to a linear list of times spent in a number of different Collectors,...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PStatView & get_view(int thread_index)
Returns a view on the given thread index.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bool is_alive() const
Returns true if the client is alive and connected, false otherwise.
void close()
Closes the client connection if it is active.
virtual void new_thread(int thread_index)
Called whenever a new Thread definition is received from the client.
const PStatClientData * get_client_data() const
Returns the client data associated with this monitor.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bool is_client_known() const
Returns true if we've yet received the "hello" message from the client indicating its name,...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
std::string get_client_hostname() const
Returns the hostname of the client we're connected to, if known.
virtual void lost_connection()
Called whenever the connection to the client has been lost.
This is an abstract class that presents the interface to any number of different front-ends for the s...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual void got_hello()
Called when the "hello" message has been received from the client.
virtual bool is_thread_safe()
Should be redefined to return true if this monitor class can handle running in a sub-thread.
virtual void initialized()
Called after the monitor has been fully set up.
virtual void new_collector(int collector_index)
Called whenever a new Collector definition is received from the client.
PStatView & get_level_view(int collector_index, int thread_index)
Returns a view on the level value (as opposed to elapsed time) for the given collector over the given...
virtual void user_guide_bars_changed()
Called when the user guide bars have been changed.