ANNA Suite  2020b
Multipurpose development suite for Telco applications
Classes | Public Member Functions | Friends | List of all members
anna::diameter::comm::ApplicationMessageOamModule Class Reference

#include <ApplicationMessageOamModule.hpp>

Inheritance diagram for anna::diameter::comm::ApplicationMessageOamModule:
Inheritance graph
[legend]
Collaboration diagram for anna::diameter::comm::ApplicationMessageOamModule:
Collaboration graph
[legend]

Classes

struct  Counter
 

Public Member Functions

std::string getDefaultInternalCounterDescription (const int &counterType) const
 
void createStackCounterScope (int, unsigned int) noexcept(false)
 
void count (int messageCode, int resultCode, unsigned int stackId, const int &type, const int &amount=1) noexcept(false)
 
int getCounterTypes () const
 
int monoStackScopeId () const
 
- Public Member Functions inherited from anna::oam::Module
 Module (const std::string &name)
 
virtual ~Module ()
 
int scopes () const
 
void enableCounters (void)
 
void disableCounters (void)
 
void enableAlarms (void)
 
void disableAlarms (void)
 
bool countersEnabled () const
 
bool alarmsEnabled () const
 
void enableAlarmsPreffix (void)
 
void enableAlarmsSuffix (void)
 
void disableAlarmsPreffix (void)
 
void disableAlarmsSuffix (void)
 
void setHandler (Handler *handler)
 
void initializeCounterScope (const int &scopeId, const std::string &description="") noexcept(false)
 
void setActiveCounterScope (const int &scopeId)
 
const anna::oam::CounterScopegetActiveCounterScope () const
 
virtual std::string getDefaultInternalAlarmDescription (const int &type) const
 
void registerCounter (const int &type, const std::string &description, const int &offset) noexcept(false)
 
void registerAlarm (const int &type, const std::string &description, const int &externalId, const std::string &dynamicVariablesCSL, const int &activationId, const int &cancellationId=-1) noexcept(false)
 
const char * getName () const
 
const counter_data_tcounter (const int &type) const
 
const alarm_data_talarm (const int &type) const
 
void count (const int &type, const int &amount=1) noexcept(false)
 
int resetCounters (const int &scopeId=-1)
 
void setCounterRecorder (CounterRecorder *counterRecorder)
 
void recordCounters () noexcept(false)
 
void activateAlarm (int type,...) const noexcept(false)
 
void cancelAlarm (int type,...) const noexcept(false)
 
virtual std::string asString (void) const
 
virtual anna::xml::NodeasXML (anna::xml::Node *parent) const
 

Friends

class anna::Singleton< ApplicationMessageOamModule >
 

Additional Inherited Members

- Static Public Member Functions inherited from anna::Singleton< ApplicationMessageOamModule >
static ApplicationMessageOamModule & instantiate ()
 
static void release ()
 
- Static Public Attributes inherited from anna::oam::Module
static const int MaxScope = 1000
 
- Protected Member Functions inherited from anna::oam::Module
virtual void readAlarmPreffixComponents (std::vector< std::string > &components) const
 
virtual void readAlarmSuffixComponents (std::vector< std::string > &components) const
 

Detailed Description

Special OAM module which tracks a replica for a set of counter types for each different application message managed by the 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:
    Credit-Control-Request_SentOK_AsClient
    Credit-Control-Request_SentNOK_AsClient
    Credit-Control-Answer_SentOK_AsClient
    Credit-Control-Answer_SentNOK_AsClient
    Credit-Control-Request_Received_AsClient
    Credit-Control-Answer_Received_AsClient
    Credit-Control-Answer_UnknownReceived_AsClient
    Credit-Control-Request_SentOK_AsServer
    Credit-Control-Request_SentNOK_AsServer
    Credit-Control-Answer_SentOK_AsServer
    Credit-Control-Answer_SentNOK_AsServer
    Credit-Control-Request_Received_AsServer
    Credit-Control-Answer_Received_AsServer
    Credit-Control-Answer_UnknownReceived_AsServer
    Re-Auth-Request_SentOK_AsClient
    Re-Auth-Request_SentNOK_AsClient
    Re-Auth-Answer_SentOK_AsClient
    Re-Auth-Answer_SentNOK_AsClient
    Re-Auth-Request_Received_AsClient
    Re-Auth-Answer_Received_AsClient
    Re-Auth-Answer_UnknownReceived_AsClient
    Re-Auth-Request_SentOK_AsServer
    Re-Auth-Request_SentNOK_AsServer
    Re-Auth-Answer_SentOK_AsServer
    Re-Auth-Answer_SentNOK_AsServer
    Re-Auth-Request_Received_AsServer
    Re-Auth-Answer_Received_AsServer
    Re-Auth-Answer_UnknownReceived_AsServer
  Scope for Rx:
    AA-Request_SentOK_AsClient
    AA-Request_SentNOK_AsClient
    AA-Answer_SentOK_AsClient
    AA-Answer_SentNOK_AsClient
    AA-Request_Received_AsClient
    AA-Answer_Received_AsClient
    AA-Answer_UnknownReceived_AsClient
    AA-Request_SentOK_AsServer
    AA-Request_SentNOK_AsServer
    AA-Answer_SentOK_AsServer
    AA-Answer_SentNOK_AsServer
    AA-Request_Received_AsServer
    AA-Answer_Received_AsServer
    AA-Answer_UnknownReceived_AsServer
    Re-Auth-Request_SentOK_AsClient
    Re-Auth-Request_SentNOK_AsClient
    Re-Auth-Answer_SentOK_AsClient
    Re-Auth-Answer_SentNOK_AsClient
    Re-Auth-Request_Received_AsClient
    Re-Auth-Answer_Received_AsClient
    Re-Auth-Answer_UnknownReceived_AsClient
    Re-Auth-Request_SentOK_AsServer
    Re-Auth-Request_SentNOK_AsServer
    Re-Auth-Answer_SentOK_AsServer
    Re-Auth-Answer_SentNOK_AsServer
    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.
 

Member Function Documentation

◆ count()

void anna::diameter::comm::ApplicationMessageOamModule::count ( int  messageCode,
int  resultCode,
unsigned int  stackId,
const int &  type,
const int &  amount = 1 
)
noexcept

◆ createStackCounterScope()

void anna::diameter::comm::ApplicationMessageOamModule::createStackCounterScope ( int  ,
unsigned  int 
)
noexcept

◆ getCounterTypes()

int anna::diameter::comm::ApplicationMessageOamModule::getCounterTypes ( ) const
inline
151 { return a_counter_types; }

◆ getDefaultInternalCounterDescription()

std::string anna::diameter::comm::ApplicationMessageOamModule::getDefaultInternalCounterDescription ( const int &  type) const
inlinevirtual

Child oam module classes should define descriptions for each enum type. A good practice would be the use of 'anna_declare_enum' macro in order to define names for enum types. This is an oam-internal description which should be redefined at application layer during registering. Returns undefined by default.

Parameters
typeCounter enum-identification within the own context/module
Returns
Default counter description

Reimplemented from anna::oam::Module.

141 { return Counter::asCString((Counter::_v)counterType); }
_v
Definition: ApplicationMessageOamModule.hpp:117
Here is the call graph for this function:

◆ monoStackScopeId()

int anna::diameter::comm::ApplicationMessageOamModule::monoStackScopeId ( ) const
inline
154  {
155  return ((a_stackMap.size() != 1) ? -1 : a_stackMap.begin()->second);
156  }

Friends And Related Function Documentation

◆ anna::Singleton< ApplicationMessageOamModule >


The documentation for this class was generated from the following file: