SObjectizer  5.8
Loading...
Searching...
No Matches
ds_agent_core_stats.cpp
Go to the documentation of this file.
1/*
2 * SObjectizer-5
3 */
4
5/*!
6 * \since
7 * v.5.5.4
8 *
9 * \file
10 * \brief A data source class for run-time monitoring of agent_core.
11 */
12
13#include <so_5/stats/impl/ds_agent_core_stats.hpp>
14
15#include <so_5/stats/messages.hpp>
16#include <so_5/stats/std_names.hpp>
17
18#include <so_5/send_functions.hpp>
19
20namespace so_5 {
21
22namespace stats {
23
24namespace impl {
25
26//
27// ds_agent_core_stats_t
28//
29ds_agent_core_stats_t::ds_agent_core_stats_t(
31 : m_what( what )
32 {}
33
34void
35ds_agent_core_stats_t::distribute(
36 const mbox_t & distribution_mbox )
37 {
39
40 send< messages::quantity< std::size_t > >( distribution_mbox,
41 prefixes::coop_repository(),
42 suffixes::coop_count(),
43 stats.m_total_coop_count );
44
45 send< messages::quantity< std::size_t > >( distribution_mbox,
46 prefixes::coop_repository(),
47 suffixes::agent_count(),
48 stats.m_total_agent_count );
49
50 send< messages::quantity< std::size_t > >( distribution_mbox,
51 prefixes::coop_repository(),
52 suffixes::coop_final_dereg_count(),
53 stats.m_final_dereg_coop_count );
54 }
55
56} /* namespace impl */
57
58} /* namespace stats */
59
60} /* namespace so_5 */
An interface for environment_infrastructure entity.
virtual coop_repository_stats_t query_coop_repository_stats()=0
Query run-time statistics for cooperation repository.
void distribute(const mbox_t &distribution_mbox) override
Send appropriate notification about the current value.
ds_agent_core_stats_t(so_5::environment_infrastructure_t &what)
so_5::environment_infrastructure_t & m_what
Internal implementation of run-time monitoring and statistics related stuff.
All stuff related to run-time monitoring and statistics.
Private part of message limit implementation.
Definition agent.cpp:33