1 #include "ace/OS_NS_string.h"
2 #include "ace/Truncate.h"
3 #include "Event_Analyzer.h"
6 #if defined (ACE_HAS_THREADS)
9 Event_Analyzer::open (void *)
15 Event_Analyzer::close (u_long
)
21 Event_Analyzer::control (ACE_Message_Block
*mb
)
23 ACE_IO_Cntl_Msg
*ioc
= (ACE_IO_Cntl_Msg
*) mb
->rd_ptr ();
24 ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds cmd
;
26 switch (cmd
= ioc
->cmd ())
28 case ACE_IO_Cntl_Msg::SET_LWM
:
29 case ACE_IO_Cntl_Msg::SET_HWM
:
30 this->water_marks (cmd
, *(size_t *) mb
->cont ()->rd_ptr ());
39 Event_Analyzer::put (ACE_Message_Block
*mb
, ACE_Time_Value
*)
41 if (mb
->msg_type () == ACE_Message_Block::MB_IOCTL
)
44 return this->put_next (mb
);
48 Event_Analyzer::init (int, ACE_TCHAR
*[])
54 Event_Analyzer::fini ()
60 Event_Analyzer::info (ACE_TCHAR
**strp
, size_t length
) const
62 const ACE_TCHAR
*module_name
= this->name ();
64 if (*strp
== 0 && (*strp
= ACE_OS::strdup (module_name
)) == 0)
67 ACE_OS::strncpy (*strp
, module_name
, length
);
69 return ACE_Utils::truncate_cast
<int> (ACE_OS::strlen (module_name
));
72 #endif /* ACE_HAS_THREADS */