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
13 #include <anna/core/Singleton.hpp>
14 #include <anna/core/define.autoenum.hpp>
17 #include <anna/core/oam/Module.hpp>
30 class OamModule : public anna::oam::Module, public anna::Singleton <OamModule> {
36 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
37 // Transferable Alarms: preffix = c_ //
38 // Grouped Alarms: preffix = g_ //
39 // Be careful: this alarms take more than one place (better define them at the end) //
40 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
43 // Enumerated labels represent english text and formats. Final order is not restricted to this in any language, but, is useful to
44 // remember the names at CSL. For example, we should have CSL="primary_address,secondary_address", and then the database text
45 // could have any composition: "Fail to deliver on secondary address '${secondary_address:%s}' after failing over primary '${primary_address:%s}'"
51 UnableToDeliverDiameterMessageToEntityDefinedAs__s__, // 'address1:port1 address2:port2 ...'
52 UnableToDeliverDiameterMessageToEntityDefinedAsPrimary__s__AndSecondary__s__, // 'Primary Server address1:port1 and Secondary Server address2:port2'
53 RequestSentOnClientSessionExpired,
54 RequestSentOnServerSessionExpired,
55 AnswerReceivedOnClientSessionUnknown,
56 AnswerReceivedOnServerSessionUnknown,
57 c_LostAvailabilityOverClientSessionWithServer__s__,
58 c_LostAvailabilityOverClientSessionWithServer__s__ClientSessionId__d__,
59 c_LostAvailabilityOverServerDefinedAs__s__, // 'address:port'
60 c_LostAvailabilityOverEntityDefinedAs__s__, // 'address1:port1 address2:port2 ...'
61 c_LostAvailabilityOverEntityDefinedAsPrimary__s__AndSecondary__s__, // 'Primary Server address1:port1 and Secondary Server address2:port2'
62 c_LostAvailabilityOverEntitiesForEngineWithClassName__s__,
64 UnableToDeliverDiameterMessageToClientFromLocalServer__s__, // 'address:port'
65 LostConnectionForServerSessionAtLocalServer__s__,
66 LostConnectionForServerSessionAtLocalServer__s__ServerSessionId__d__,
67 UnbindConnectionForServerSessionAtLocalServer__s__DueToInactivityTimeAnomaly,
68 UnbindConnectionForServerSessionAtLocalServer__s__ServerSessionId__d__DueToInactivityTimeAnomaly,
69 c_LostAvailabilityOverLocalServerDefinedAs__s__, // 'address:port'
70 c_LostAvailabilityOverLocalServersForEngineWithClassName__s__
73 anna_declare_enum(Alarm);
78 // In order to simplify, the literals assigned to
79 // enum-type counters are equivalent to spanich specification ones
87 RequestReceivedOnClientSession,
88 AnswerReceivedOnClientSession,
89 RequestReceivedOnServerSession,
90 AnswerReceivedOnServerSession,
96 RequestSentOnClientSessionOK,
97 RequestSentOnClientSessionNOK,
98 AnswerSentOnClientSessionOK,
99 AnswerSentOnClientSessionNOK,
100 RequestSentOnServerSessionOK,
101 RequestSentOnServerSessionNOK,
102 AnswerSentOnServerSessionOK,
103 AnswerSentOnServerSessionNOK,
107 RequestSentOnClientSessionExpired,
108 RequestSentOnServerSessionExpired,
110 // unknown received answers
111 AnswerReceivedUnknown,
112 AnswerReceivedOnClientSessionUnknown,
113 AnswerReceivedOnServerSessionUnknown,
115 /* Capabilities Exchange */
125 /* Diameter Keepalive */
135 /* Peer disconnection */
145 /* server socket operations (enable/disable listening port for any local server) */
151 UnableToDeliverOverEntity,
152 LostAvailabilityOverClientSession,
153 RecoveredAvailabilityOverClientSession,
154 LostAvailabilityOverServer,
155 RecoveredAvailabilityOverServer,
156 LostAvailabilityOverEntity,
157 RecoveredAvailabilityOverEntity,
158 LostAvailabilityOverEngineForEntities,
159 RecoveredAvailabilityOverEngineForEntities,
161 UnableToDeliverToClient,
162 LostConnectionForServerSession,
163 UnbindConnectionForServerSessionDueToInactivityTimeAnomaly,
164 CreatedConnectionForServerSession,
165 LostAvailabilityOverLocalServer,
166 RecoveredAvailabilityOverLocalServer,
167 LostAvailabilityOverEngineForLocalServers,
168 RecoveredAvailabilityOverEngineForLocalServers
171 anna_declare_enum(Counter);
174 /* virtual */std::string getDefaultInternalAlarmDescription(const int & alarmType) const throw() { return Alarm::asCString((Alarm::_v)alarmType); }
175 /* virtual */std::string getDefaultInternalCounterDescription(const int & counterType) const throw() { return Counter::asCString((Counter::_v)counterType); }
180 // private constructor
181 OamModule() : anna::oam::Module("diameter::comm oam module") {};
184 friend class anna::Singleton <OamModule>;