X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=include%2Fanna%2Fdiameter.comm%2FApplicationMessageOamModule.hpp;h=d8f6fa66d82c6eebb7755de84c1c3faf84e23b4a;hp=c9c5b0dedc54f6311a86a8ba6ecd5d5ca228bb5b;hb=30def5757c5b3411f77fff62a163241ecc616337;hpb=a4a2ff4e20ddc4c6de7f2d3efd3acfb16c0d91c1 diff --git a/include/anna/diameter.comm/ApplicationMessageOamModule.hpp b/include/anna/diameter.comm/ApplicationMessageOamModule.hpp index c9c5b0d..d8f6fa6 100644 --- a/include/anna/diameter.comm/ApplicationMessageOamModule.hpp +++ b/include/anna/diameter.comm/ApplicationMessageOamModule.hpp @@ -29,10 +29,10 @@ namespace comm { /** Special OAM module which tracks a replica for a set of counter types for each different application message managed by the - communication layer in a specific stack id. For example, if one process is managing CCR/A, RAR/A for Gx and AAR/A, RAR/A for Rx, - then two counter scopes should be registered (one for Gx, another for Rx). Each scope will store counters sets for each diameter - message. Having N counters within each scope (for example N=14), the total capacity is N/(number of counter types) different - message codes: + communication layer and result code in case of answer, in a specific stack id. For example, if one process is managing CCR/A, + RAR/A for Gx and AAR/A, RAR/A for Rx, then two counter scopes should be registered (one for Gx, another for Rx). Each scope + will store counters sets for each diameter event (message and optionally result code description). Having N counters within + each scope (for example N=14), the total capacity is N/(number of counter types) different events:
     Scope for Gx:
@@ -96,11 +96,15 @@ namespace comm {
       Re-Auth-Request_Received_AsServer
       Re-Auth-Answer_Received_AsServer
       Re-Auth-Answer_UnknownReceived_AsServer
+
+    Note: all other combinations including the result code for answers
+          may be dynamically created.
+
   
*/ class ApplicationMessageOamModule : public anna::oam::Module, public anna::Singleton { - std::map a_messageMap; + std::map a_eventMap; std::map a_stackMap; int a_counter_types; @@ -140,11 +144,17 @@ public: void createStackCounterScope(int /* scope id */, unsigned int /* stack id */) throw(anna::RuntimeException); // translate message code into offset and invoke parent class count method. The message applicationId will be used as stack id - void count (int messageCode, unsigned int stackId, const int & type, const int & amount = 1) throw(anna::RuntimeException); + // resultCode shall be -1 for non-answers + void count (int messageCode, int resultCode, unsigned int stackId, const int & type, const int & amount = 1) throw(anna::RuntimeException); // Number of different counter types for each message int getCounterTypes() const throw() { return a_counter_types; } + // -1 if multistack + int monoStackScopeId() const throw() { + return ((a_stackMap.size() != 1) ? -1 : a_stackMap.begin()->second); + } + private: // private constructor