1 // ANNA - Anna is Not Nothingness Anymore //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
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 //
9 #ifndef anna_diameter_codec_OamModule_hpp
10 #define anna_diameter_codec_OamModule_hpp
14 #include <anna/core/Singleton.hpp>
15 #include <anna/core/define.autoenum.hpp>
16 #include <anna/core/oam/Module.hpp>
29 class OamModule : public anna::oam::Module, public anna::Singleton <OamModule> {
35 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
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) //
39 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
45 /////////////////////////////////////////////
46 // All defined alarms are not transferable //
47 /////////////////////////////////////////////
51 AvpDecode__NotEnoughBytesToCoverAvpHeaderLength,
52 // El buffer pasado no es suficiente para construir un AVP
53 // Not enough buffer to build AVP
55 AvpDecode__IncoherenceBetweenActivatedVBitAndZeroedVendorIDValueReceived,
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)
59 AvpDecode__IncorrectLength,
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
63 AvpDecode__DataPartInconsistence,
64 // Existe un error de inconsistencia en la parte de datos
65 // There is an inconsistence error inside the AVP data part
67 AvpDecode__UnknownAvp__s__WithMandatoryBit,
68 // Formato desconocido del AVP %s con bit M activo
69 // Unknown format for AVP %s with activated M bit
71 /* Message decoding */
73 MessageDecode__NotEnoughBytesToCoverMessageHeaderLength,
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
77 MessageDecode__NotEnoughBytesToCoverMessageLength,
78 // No se han proporcionado octetos suficientes para cubrir la longitud del mensaje DIAMETER
79 // Not enough bytes to fit DIAMETER message length
84 AvpValidation__EnumeratedAvp__s__WithValue__d__DoesNotComplyRestriction__s__,
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
88 AvpValidation__Avp__s__Flags__d__DoesNotFulfillTheDefinedFlagRules__s__,
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
93 /* Message validation */
95 MessageValidation__UnknownOperation__s__UnableToValidate,
96 // Operacion %s desconocida, imposible validar
97 // Unknown operation %s, unable to validate
99 MessageValidation__Operation__s__HaveIncoherentFlags__d__,
100 // La operacion %s tiene flags (%d) incoherentes
101 // Operation %s have incoherent flags (%d)
104 /* Level validation */
106 LevelValidation__MissingFixedRule__s__Inside__s__,
107 // Falta un AVP fijo %s dentro de %s
108 // Missing fixed rule %s inside %s
110 LevelValidation__FailedRule__s__ForCardinality_Found__d__ItemsInside__s__,
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)
114 LevelValidation__FailedGenericAvpRule__s__ForCardinality_Found__d__DisregardedItemsInside__s__,
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)
118 LevelValidation__FoundDisregardedItemsInside__s__AndGenericAVPWasNotSpecified__s__
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
123 anna_declare_enum(Alarm);
128 // In order to simplify, the literals assigned to
129 // enum-type counters are equal to specification ones (in spanish)
134 AvpDecode__NotEnoughBytesToCoverAvpHeaderLength,
135 AvpDecode__IncoherenceBetweenActivatedVBitAndZeroedVendorIDValueReceived,
136 AvpDecode__IncorrectLength,
137 AvpDecode__DataPartInconsistence,
138 AvpDecode__UnknownAvpWithMandatoryBit,
140 /* Message decoding */
141 MessageDecode__NotEnoughBytesToCoverMessageHeaderLength,
142 MessageDecode__NotEnoughBytesToCoverMessageLength,
145 AvpValidation__EnumeratedAvpWithValueDoesNotComplyRestriction,
146 AvpValidation__AvpFlagsDoesNotFulfillTheDefinedFlagRules,
148 /* Message validation */
149 MessageValidation__UnknownOperationUnableToValidate,
150 MessageValidation__OperationHaveIncoherentFlags,
152 /* Level validation */
153 LevelValidation__MissingFixedRule,
154 LevelValidation__FailedRuleForCardinality,
155 LevelValidation__FailedRuleForCardinalityLessThanNeeded,
156 LevelValidation__FailedRuleForCardinalityMoreThanNeeded,
157 LevelValidation__FailedGenericAvpRuleForCardinalityFoundDisregardedItem,
158 LevelValidation__FoundDisregardedItemsAndGenericAVPWasNotSpecified
161 anna_declare_enum(Counter);
164 /* virtual */std::string getDefaultInternalAlarmDescription(const int & alarmType) const throw() { return Alarm::asCString((Alarm::_v)alarmType); }
165 /* virtual */std::string getDefaultInternalCounterDescription(const int & counterType) const throw() { return Counter::asCString((Counter::_v)counterType); }
170 // private constructor
171 OamModule() : anna::oam::Module("diameter::codec oam module") {};
174 friend class anna::Singleton <OamModule>;