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_codec_OamModule_hpp
10 #define anna_diameter_codec_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 codec {
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 
43  None = -1,
44 
46  // All defined alarms are not transferable //
48 
49  /* Avp decoding */
50 
52  // El buffer pasado no es suficiente para construir un AVP
53  // Not enough buffer to build AVP
54 
56  // Los Flags indican que el AVP es vendor-specific (bit V) y sin embargo el campo vendor-ID tiene un valor 0 (IETF)
57  // AVP Flags are vendor-specific (V bit) but vendor-ID octets value is 0 (IETF)
58 
60  // Existe un error de formato en el AVP, la longitud es incorrecta
61  // There is an error inside the AVP, the length is not correct
62 
64  // Existe un error de inconsistencia en la parte de datos
65  // There is an inconsistence error inside the AVP data part
66 
68  // Formato desconocido del AVP %s con bit M activo
69  // Unknown format for AVP %s with activated M bit
70 
71  /* Message decoding */
72 
74  // El buffer pasado no es suficiente para construir la cabecera de un mensaje DIAMETER
75  // Not enough buffer to build the DIAMETER message header
76 
78  // No se han proporcionado octetos suficientes para cubrir la longitud del mensaje DIAMETER
79  // Not enough bytes to fit DIAMETER message length
80 
81 
82  /* Avp validation */
83 
85  // El AVP enumerado %s con valor %d, no cumple la restriccion: %s
86  // Enumerated AVP %s with value %d does not comply to restriction: %s
87 
89  // El AVP %s tiene flags (%d) incoherentes con las reglas de flags definidas: %s
90  // AVP %s flags (%d) does not fulfill the defined flag rules: %s
91 
92 
93  /* Message validation */
94 
96  // Operacion %s desconocida, imposible validar
97  // Unknown operation %s, unable to validate
98 
100  // La operacion %s tiene flags (%d) incoherentes
101  // Operation %s have incoherent flags (%d)
102 
103 
104  /* Level validation */
105 
107  // Falta un AVP fijo %s dentro de %s
108  // Missing fixed rule %s inside %s
109 
111  // Ha fallado la regla %s de cardinalidad (encontrados %s items dentro de %s)
112  // Failed rule %s for cardinality (found %d items inside %s)
113 
115  // Ha fallado la regla del AVP Generico %s para la cardinalidad (encontrados %d items no contemplados dentro de %s)
116  // Failed Generic AVP rule %s for cardinality (found %d disregarded items inside %s)
117 
119  // Encontrados items no contemplados dentro de %s y el AVP Generico no se especifico: %s
120  // Found disregarded items inside %s and Generic AVP was not specified: %s
121  };
122 
124  };
125 
126  struct Counter {
127  enum _v
128  // In order to simplify, the literals assigned to
129  // enum-type counters are equal to specification ones (in spanish)
130  {
131  None = -1,
132 
133  /* Avp decoding */
139 
140  /* Message decoding */
143 
144  /* Avp validation */
147 
148  /* Message validation */
151 
152  /* Level validation */
158  LevelValidation__FoundDisregardedItemsAndGenericAVPWasNotSpecified
159  };
160 
162  };
163 
164  /* virtual */std::string getDefaultInternalAlarmDescription(const int & alarmType) const { return Alarm::asCString((Alarm::_v)alarmType); }
165  /* virtual */std::string getDefaultInternalCounterDescription(const int & counterType) const { return Counter::asCString((Counter::_v)counterType); }
166 
167 
168 private:
169 
170  // private constructor
171  OamModule() : anna::oam::Module("diameter::codec oam module") {};
172 
173 
174  friend class anna::Singleton <OamModule>;
175 };
176 
177 }
178 }
179 }
180 
181 #endif
182 
_v
Definition: OamModule.hpp:127
Definition: OamModule.hpp:126
Definition: Module.hpp:135
Definition: OamModule.hpp:29
Definition: Singleton.hpp:76
Module(const std::string &name)
Definition: Module.hpp:212
Definition: OamModule.hpp:33
std::string getDefaultInternalCounterDescription(const int &counterType) const
Definition: OamModule.hpp:165
_v
Definition: OamModule.hpp:41
std::string getDefaultInternalAlarmDescription(const int &alarmType) const
Definition: OamModule.hpp:164
Definition: app.hpp:12