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_comm_OamModule_hpp
10 #define anna_diameter_comm_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 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
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}'"
50 UnableToDeliverDiameterMessageToEntityDefinedAs__s__, // 'address1:port1 address2:port2 ...'
51 UnableToDeliverDiameterMessageToEntityDefinedAsPrimary__s__AndSecondary__s__, // 'Primary Server address1:port1 and Secondary Server address2:port2'
52 RequestSentOnClientSessionExpired,
53 RequestSentOnServerSessionExpired,
54 AnswerReceivedOnClientSessionUnknown,
55 AnswerReceivedOnServerSessionUnknown,
56 c_LostAvailabilityOverClientSessionWithServer__s__,
57 c_LostAvailabilityOverClientSessionWithServer__s__ClientSessionId__d__,
58 c_LostAvailabilityOverServerDefinedAs__s__, // 'address:port'
59 c_LostAvailabilityOverEntityDefinedAs__s__, // 'address1:port1 address2:port2 ...'
60 c_LostAvailabilityOverEntityDefinedAsPrimary__s__AndSecondary__s__, // 'Primary Server address1:port1 and Secondary Server address2:port2'
61 c_LostAvailabilityOverEntitiesForEngineWithClassName__s__,
63 UnableToDeliverDiameterMessageToClientFromLocalServer__s__, // 'address:port'
64 LostConnectionForServerSessionAtLocalServer__s__,
65 LostConnectionForServerSessionAtLocalServer__s__ServerSessionId__d__,
66 UnbindConnectionForServerSessionAtLocalServer__s__DueToInactivityTimeAnomaly,
67 UnbindConnectionForServerSessionAtLocalServer__s__ServerSessionId__d__DueToInactivityTimeAnomaly,
68 c_LostAvailabilityOverLocalServerDefinedAs__s__, // 'address:port'
69 c_LostAvailabilityOverLocalServersForEngineWithClassName__s__
72 anna_declare_enum(Alarm);
77 // In order to simplify, the literals assigned to
78 // enum-type counters are equivalent to spanich specification ones
86 RequestReceivedOnClientSession,
87 AnswerReceivedOnClientSession,
88 RequestReceivedOnServerSession,
89 AnswerReceivedOnServerSession,
95 RequestSentOnClientSessionOK,
96 RequestSentOnClientSessionNOK,
97 AnswerSentOnClientSessionOK,
98 AnswerSentOnClientSessionNOK,
99 RequestSentOnServerSessionOK,
100 RequestSentOnServerSessionNOK,
101 AnswerSentOnServerSessionOK,
102 AnswerSentOnServerSessionNOK,
106 RequestSentOnClientSessionExpired,
107 RequestSentOnServerSessionExpired,
110 RequestRetransmitted,
111 RequestRetransmittedOnClientSession,
112 RequestRetransmittedOnServerSession,
114 // unknown received answers
115 AnswerReceivedUnknown,
116 AnswerReceivedOnClientSessionUnknown,
117 AnswerReceivedOnServerSessionUnknown,
119 /* Capabilities Exchange */
129 /* Diameter Keepalive */
139 /* Peer disconnection */
149 /* server socket operations (enable/disable listening port for any local server) */
155 UnableToDeliverOverEntity,
156 LostAvailabilityOverClientSession,
157 RecoveredAvailabilityOverClientSession,
158 LostAvailabilityOverServer,
159 RecoveredAvailabilityOverServer,
160 LostAvailabilityOverEntity,
161 RecoveredAvailabilityOverEntity,
162 LostAvailabilityOverEngineForEntities,
163 RecoveredAvailabilityOverEngineForEntities,
165 UnableToDeliverToClient,
166 LostConnectionForServerSession,
167 UnbindConnectionForServerSessionDueToInactivityTimeAnomaly,
168 CreatedConnectionForServerSession,
169 LostAvailabilityOverLocalServer,
170 RecoveredAvailabilityOverLocalServer,
171 LostAvailabilityOverEngineForLocalServers,
172 RecoveredAvailabilityOverEngineForLocalServers
175 anna_declare_enum(Counter);
178 /* virtual */std::string getDefaultInternalAlarmDescription(const int & alarmType) const throw() { return Alarm::asCString((Alarm::_v)alarmType); }
179 /* virtual */std::string getDefaultInternalCounterDescription(const int & counterType) const throw() { return Counter::asCString((Counter::_v)counterType); }
184 // private constructor
185 OamModule() : anna::oam::Module("diameter::comm oam module") {};
188 friend class anna::Singleton <OamModule>;