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,
109 // unknown received answers
110 AnswerReceivedUnknown,
111 AnswerReceivedOnClientSessionUnknown,
112 AnswerReceivedOnServerSessionUnknown,
114 /* Capabilities Exchange */
124 /* Diameter Keepalive */
134 /* Peer disconnection */
144 /* server socket operations (enable/disable listening port for any local server) */
150 UnableToDeliverOverEntity,
151 LostAvailabilityOverClientSession,
152 RecoveredAvailabilityOverClientSession,
153 LostAvailabilityOverServer,
154 RecoveredAvailabilityOverServer,
155 LostAvailabilityOverEntity,
156 RecoveredAvailabilityOverEntity,
157 LostAvailabilityOverEngineForEntities,
158 RecoveredAvailabilityOverEngineForEntities,
160 UnableToDeliverToClient,
161 LostConnectionForServerSession,
162 UnbindConnectionForServerSessionDueToInactivityTimeAnomaly,
163 CreatedConnectionForServerSession,
164 LostAvailabilityOverLocalServer,
165 RecoveredAvailabilityOverLocalServer,
166 LostAvailabilityOverEngineForLocalServers,
167 RecoveredAvailabilityOverEngineForLocalServers
170 anna_declare_enum(Counter);
173 /* virtual */std::string getDefaultInternalAlarmDescription(const int & alarmType) const throw() { return Alarm::asCString((Alarm::_v)alarmType); }
174 /* virtual */std::string getDefaultInternalCounterDescription(const int & counterType) const throw() { return Counter::asCString((Counter::_v)counterType); }
179 // private constructor
180 OamModule() : anna::oam::Module("diameter::comm oam module") {};
183 friend class anna::Singleton <OamModule>;