Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / Monitor_Control / Bytes_Sent_Monitor.cpp
blobb196f2f01f56ed19d594e2392fe5a513d8191f8b
1 #include "ace/Monitor_Control/Bytes_Sent_Monitor.h"
3 #if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1)
5 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
7 namespace ACE
9 namespace Monitor_Control
11 const char* Bytes_Sent_Monitor::default_name_ =
12 "OS/Network/BytesSent";
14 Bytes_Sent_Monitor::Bytes_Sent_Monitor (const char* name)
15 : Monitor_Base (name, Monitor_Control_Types::MC_NUMBER)
16 #if defined (ACE_HAS_WIN32_PDH)
17 , Windows_Multi_Instance_Monitor (
18 ACE_TEXT ("\\Network Interface(*)\\Bytes Sent/sec"))
19 #elif defined (ACE_LINUX)
20 , Linux_Network_Interface_Monitor (
21 " %*[^:]: %*u %*u %*u %*u %*u %*u %*u %*u %lu %*u")
22 /// Scan format for /proc/net/dev
23 #elif defined (__FreeBSD__) || defined (__Lynx__)
24 , FreeBSD_Network_Interface_Monitor (ACE_TEXT ("obytes"))
25 #elif defined (__NetBSD__) || defined (__OpenBSD__)
26 , BSD_Network_Interface_Monitor (ACE_TEXT ("obytes"))
27 #endif
30 void
31 Bytes_Sent_Monitor::update ()
33 this->update_i ();
35 /// On some platforms, value_ is an ACE_UINT64.
36 this->receive (static_cast<double> (this->value_));
39 const char*
40 Bytes_Sent_Monitor::default_name ()
42 return Bytes_Sent_Monitor::default_name_;
45 void
46 Bytes_Sent_Monitor::clear_i ()
48 this->clear_impl ();
49 this->Monitor_Base::clear_i ();
54 ACE_END_VERSIONED_NAMESPACE_DECL
56 #endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */