00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef PSTATCLIENTCONTROLMESSAGE_H
00020 #define PSTATCLIENTCONTROLMESSAGE_H
00021
00022 #include <pandabase.h>
00023
00024 #include "pStatCollectorDef.h"
00025
00026 #include "pvector.h"
00027
00028 class Datagram;
00029 class PStatClientVersion;
00030
00031
00032
00033
00034
00035
00036
00037 class EXPCL_PANDA PStatClientControlMessage {
00038 public:
00039 PStatClientControlMessage();
00040
00041 void encode(Datagram &datagram) const;
00042 bool decode(const Datagram &datagram, PStatClientVersion *version);
00043
00044 enum Type {
00045 T_datagram = 0,
00046 T_hello,
00047 T_define_collectors,
00048 T_define_threads,
00049 T_invalid
00050 };
00051
00052 Type _type;
00053
00054
00055 string _client_hostname;
00056 string _client_progname;
00057 int _major_version;
00058 int _minor_version;
00059
00060
00061 pvector<PStatCollectorDef *> _collectors;
00062
00063
00064 int _first_thread_index;
00065 pvector<string> _names;
00066 };
00067
00068
00069 #endif
00070