ANNA Suite  2020b
Multipurpose development suite for Telco applications
OamModule.hpp
Go to the documentation of this file.
1 // ANNA - Anna is Not Nothingness Anymore //
2 // //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
4 // //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
7 
8 
9 #ifndef anna_diameter_comm_OamModule_hpp
10 #define anna_diameter_comm_OamModule_hpp
11 
12 
13 // Project
14 #include <anna/core/Singleton.hpp>
16 #include <anna/core/oam/Module.hpp>
17 
18 // Standard
19 #include <string>
20 
21 
22 namespace anna {
23 
24 namespace diameter {
25 
26 namespace comm {
27 
28 
29 class OamModule : public anna::oam::Module, public anna::Singleton <OamModule> {
30 
31 public:
32 
33  struct Alarm {
34 
36  // Transferable Alarms: preffix = c_ //
37  // Grouped Alarms: preffix = g_ //
38  // Be careful: this alarms take more than one place (better define them at the end) //
40 
41  enum _v {
42  // Enumerated labels represent english text and formats. Final order is not restricted to this in any language, but, is useful to
43  // remember the names at CSL. For example, we should have CSL="primary_address,secondary_address", and then the database text
44  // could have any composition: "Fail to deliver on secondary address '${secondary_address:%s}' after failing over primary '${primary_address:%s}'"
45 
46  None = -1,
47 
48  /* Connectivity */
49  // clients
50  UnableToDeliverDiameterMessageToEntityDefinedAs__s__, // 'address1:port1 address2:port2 ...'
51  UnableToDeliverDiameterMessageToEntityDefinedAsPrimary__s__AndSecondary__s__, // 'Primary Server address1:port1 and Secondary Server address2:port2'
59  c_LostAvailabilityOverEntityDefinedAs__s__, // 'address1:port1 address2:port2 ...'
60  c_LostAvailabilityOverEntityDefinedAsPrimary__s__AndSecondary__s__, // 'Primary Server address1:port1 and Secondary Server address2:port2'
62  // servers
70  };
71 
73  };
74 
75  struct Counter {
76  enum _v
77  // In order to simplify, the literals assigned to
78  // enum-type counters are equivalent to spanich specification ones
79  {
80  None = -1,
81 
82  /* Main */
83  // receptions
90  // sendings
103 
104  // expirations
108 
109  // retransmissions
113 
114  // unknown received answers
118 
119  /* Capabilities Exchange */
120  // clients
124  // servers
128 
129  /* Diameter Keepalive */
130  // clients
134  // servers
138 
139  /* Peer disconnection */
140  // clients
144  // servers
148 
149  /* server socket operations (enable/disable listening port for any local server) */
152 
153  /* Connectivity */
154  // clients
164  // servers
172  RecoveredAvailabilityOverEngineForLocalServers
173  };
174 
176  };
177 
178  /* virtual */std::string getDefaultInternalAlarmDescription(const int & alarmType) const { return Alarm::asCString((Alarm::_v)alarmType); }
179  /* virtual */std::string getDefaultInternalCounterDescription(const int & counterType) const { return Counter::asCString((Counter::_v)counterType); }
180 
181 
182 private:
183 
184  // private constructor
185  OamModule() : anna::oam::Module("diameter::comm oam module") {};
186 
187 
188  friend class anna::Singleton <OamModule>;
189 };
190 
191 }
192 }
193 }
194 
195 #endif
196 
std::string getDefaultInternalAlarmDescription(const int &alarmType) const
Definition: OamModule.hpp:178
Definition: Module.hpp:135
_v
Definition: OamModule.hpp:76
Definition: Singleton.hpp:76
Module(const std::string &name)
Definition: Module.hpp:212
Definition: OamModule.hpp:33
Definition: OamModule.hpp:75
std::string getDefaultInternalCounterDescription(const int &counterType) const
Definition: OamModule.hpp:179
_v
Definition: OamModule.hpp:41
Definition: app.hpp:12
Definition: OamModule.hpp:29