Muster SDK  8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
MStatisticsSample.h
Go to the documentation of this file.
1 /*****************************************************************************
2  **
3  ** Header file for Muster API Statistics sample object
4  **
5  ** Name : MStatisticsSample.h
6  ** Author : Leonardo Bernardini
7  ** Version : 1.0, Sat Mar 2nd 2013
8  **
9  ** Copyright 2000-2014, Virtual Vertex
10  ** All Rights Reserved.
11  **
12  ** This file contains UNPUBLISHED PROPRIETARY SOURCE CODE.
13  ** The contents of this file may not be disclosed to third parties, copied
14  ** or duplicated in any form, in whole or in part, without the prior written
15  ** permission of the author.
16  **
17  *****************************************************************************/
18 #ifndef MSTATISTICSSAMPLE_H
19 #define MSTATISTICSSAMPLE_H
20 
21 #ifdef WIN32
22 // Windows definitions
23 #ifdef MCLIENTLIB_EXPORTS
24 #define MCLIENTLIB_API __declspec(dllexport)
25 #else
26 #define MCLIENTLIB_API __declspec(dllimport)
27 #endif
28 #else
29 
30 #ifndef MCLIENTLIB_EXPORTS
31 #ifdef LINUX
32 #define MCLIENTLIB_API
33 #else
34 #define MCLIENTLIB_API
35 #endif
36 #else
37 #define MCLIENTLIB_API
38 #endif
39 #endif
40 
41 
42 // Disable STL Export warning, member is private, we don't need direct access from the DLL client
43 #if defined(_WIN32)
44 #pragma warning(disable: 4251)
45 #endif // _WIN32
46 
47 #include <string>
48 #include <list>
49 #include <vector>
50 
51 namespace MClientLib {
52 
57  // Class variables are protected to allow friendship inside the Dispatcher for directly counters access
58  protected:
59  long id;
60  long long sampleTime;
67  int usedNodes;
69  int idleNodes;
75  double nodesInKbs;
76  double nodesOutKbs;
77  double webInKbs;
78  double webOutKbs;
79 
80  unsigned long long int managementsInBytes;
81  unsigned long long int managementsOutBytes;
82  unsigned long long int nodesInBytes;
83  unsigned long long int nodesOutBytes;
84  unsigned long long int notificatorsInBytes;
85  unsigned long long int notificatorsOutBytes;
86  unsigned long long int webInBytes;
87  unsigned long long int webOutBytes;
88  public:
90  virtual ~MStatisticsSample();
91 
92  void reset();
93 
94  long getId();
95  long long getSampleTime();
96  int getConnectedNodes();
97  int getConnectedManagements();
98  int getConnectedNotificators();
99  int getActiveWebSessions();
100  int getActiveWebConnections();
101  int getActiveWebSSLConnections();
102  int getUsedNodes();
103  int getPausedNodes();
104  int getIdleNodes();
105  int getUnavailableNodes();
106  double getTotalInKbs();
107  double getTotalOutKbs();
108  double getManagementInKbs();
109  double getManagementOutKbs();
110  double getNotificatorsInKbs();
111  double getNotificatorsOutKbs();
112  double getNodesInKbs();
113  double getNodesOutKbs();
114  double getWebInKbs();
115  double getWebOutKbs();
116  unsigned long long int getManagementsInBytes();
117  unsigned long long int getManagementsOutBytes();
118  unsigned long long int getNodesInBytes();
119  unsigned long long int getNodesOutBytes();
120  unsigned long long int getNotificatorsInBytes();
121  unsigned long long int getNotificatorsOutBytes();
122  unsigned long long int getWebInBytes();
123  unsigned long long int getWebOutBytes();
124 
125  void setId(long);
126  void setSampleTime(long long);
127  void setConnectedNodes(int);
128  void setConnectedManagements(int);
129  void setConnectedNotificators(int);
130  void setActiveWebSessions(int);
131  void setActiveWebConnections(int);
132  void setActiveWebSSLConnections(int);
133  void setUsedNodes(int);
134  void setPausedNodes(int);
135  void setIdleNodes(int);
136  void setUnavailableNodes(int);
137  void setManagementInKbs(double);
138  void setManagementOutKbs(double);
139  void setNotificatorsInKbs(double);
140  void setNotificatorsOutKbs(double);
141  void setNodesInKbs(double);
142  void setNodesOutKbs(double);
143  void setWebInKbs(double);
144  void setWebOutKbs(double);
145  void setManagementsInBytes(unsigned long long int);
146  void setManagementsOutBytes(unsigned long long int);
147  void setNodesInBytes(unsigned long long int);
148  void setNodesOutBytes(unsigned long long int);
149  void setNotificatorsInBytes(unsigned long long int);
150  void setNotificatorsOutBytes(unsigned long long int);
151  void setWebInBytes(unsigned long long int);
152  void setWebOutBytes(unsigned long long int);
153 
154  virtual bool Unmarshall(std::vector<std::string>& items);
155  virtual std::string Marshall();
156  };
157 }
158 
159 #endif