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_app_dcca_nokia_Message_hpp
10 #define anna_diameter_app_dcca_nokia_Message_hpp
14 #include <anna/diameter/app/dcca/Message.hpp>
17 #include <anna/diameter/helpers/nokia/defines.hpp>
19 #include <anna/core/RuntimeException.hpp>
22 //------------------------------------------------------------------------------
23 //---------------------------------------------------------------------- #define
24 //------------------------------------------------------------------------------
33 using namespace basetypes;
44 * Diameter message for Nokia DCCA (diameter credit control application)
46 class Message : public anna::diameter::app::dcca::Message {
52 Avp 3GPP-PDP-Type data-part pointer reference
53 @param emode Excepcion mode handling when avp is not found: Ignore (no action is taken but debug trace), Throw (exception launched, by default), Trace (trace warning).
55 const Unsigned32 * get3GPPPDPType(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
56 ASSERT_APP_GETAVP(return getAvp(helpers::tgpp::AVPID__3GPP_PDP_Type)->getUnsigned32());
61 Avp Framed-IP-Address or Framed-IPv6-Prefix data-part pointer reference, depending on 3GPP-PDP-Type value
62 @param emode Excepcion mode handling when avp is not found: Ignore (no action is taken but debug trace), Throw (exception launched, by default), Trace (trace warning).
64 const OctetString * getFramedIP(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
66 int pdpType = get3GPPPDPType()->getValue();
68 if(pdpType == helpers::tgpp::AVPVALUES__3GPP_PDP_Type::IPV4)
69 return getAvp(helpers::radius::AVPID__Framed_IP_Address)->getOctetString();
70 if(pdpType == helpers::tgpp::AVPVALUES__3GPP_PDP_Type::IPV6)
71 return getAvp(helpers::radius::AVPID__Framed_IPv6_Prefix)->getOctetString();
77 Avp Called-Station-Id data-part pointer reference
78 @param emode Excepcion mode handling when avp is not found: Ignore (no action is taken but debug trace), Throw (exception launched, by default), Trace (trace warning).
80 const UTF8String * getCalledStationId(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
81 ASSERT_APP_GETAVP(return getAvp(helpers::radius::AVPID__Called_Station_Id)->getUTF8String());
85 Avp 3GPP-SGSN-MCC-MNC data-part pointer reference
86 @param emode Excepcion mode handling when avp is not found: Ignore (no action is taken but debug trace), Throw (exception launched, by default), Trace (trace warning).
88 const UTF8String * get3GPPSGSNMCCMNC(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
89 ASSERT_APP_GETAVP(return getAvp(helpers::tgpp::AVPID__3GPP_SGSN_MCC_MNC)->getUTF8String());
93 Avp 3GPP-SGSN-Address data-part pointer reference
94 @param emode Excepcion mode handling when avp is not found: Ignore (no action is taken but debug trace), Throw (exception launched, by default), Trace (trace warning).
96 const OctetString * get3GPPSGSNAddress(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
97 ASSERT_APP_GETAVP(return getAvp(helpers::tgpp::AVPID__3GPP_SGSN_Address)->getOctetString());
101 Avp 3GPP-Charging-Characteristics data-part pointer reference
102 @param emode Excepcion mode handling when avp is not found: Ignore (no action is taken but debug trace), Throw (exception launched, by default), Trace (trace warning).
104 const UTF8String * get3GPPChargingCharacteristics(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
105 ASSERT_APP_GETAVP(return getAvp(helpers::tgpp::AVPID__3GPP_Charging_Characteristics)->getUTF8String());
109 Avp 3GPP-CG-Address data-part pointer reference
110 @param emode Excepcion mode handling when avp is not found: Ignore (no action is taken but debug trace), Throw (exception launched, by default), Trace (trace warning).
112 const OctetString * get3GPPCGAddress(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
113 ASSERT_APP_GETAVP(return getAvp(helpers::tgpp::AVPID__3GPP_CG_Address)->getOctetString());
117 Avp 3GPP-Rat-Type data-part pointer reference
118 @param emode Excepcion mode handling when avp is not found: Ignore (no action is taken but debug trace), Throw (exception launched, by default), Trace (trace warning).
120 const OctetString * get3GPPRatType(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
121 ASSERT_APP_GETAVP(return getAvp(helpers::tgpp::AVPID__3GPP_Rat_Type)->getOctetString());
125 Avp Nokia-IMS-Media-Component-Id data-part pointer reference
126 @param emode Excepcion mode handling when avp is not found: Ignore (no action is taken but debug trace), Throw (exception launched, by default), Trace (trace warning).
128 const Unsigned32 * getNokiaIMSMediaComponentId(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
129 ASSERT_APP_GETAVP(return getAvp(helpers::nokia::AVPID__Nokia_IMS_Media_Component_Id)->getUnsigned32());
133 Avp Time-Of-Last-Usage data-part pointer reference
134 @param emode Excepcion mode handling when avp is not found: Ignore (no action is taken but debug trace), Throw (exception launched, by default), Trace (trace warning).
136 const Time * getTimeOfLastUsage(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
137 ASSERT_APP_GETAVP(return getAvp(helpers::nokia::AVPID__Time_Of_Last_Usage)->getTime());
141 Avp Time-Of-First-Usage data-part pointer reference
142 @param emode Excepcion mode handling when avp is not found: Ignore (no action is taken but debug trace), Throw (exception launched, by default), Trace (trace warning).
144 const Time * getTimeOfFirstUsage(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
145 ASSERT_APP_GETAVP(return getAvp(helpers::nokia::AVPID__Time_Of_First_Usage)->getTime());
149 Avp Session-Start-Indicator data-part pointer reference
150 @param emode Excepcion mode handling when avp is not found: Ignore (no action is taken but debug trace), Throw (exception launched, by default), Trace (trace warning).
152 const OctetString * getSessionStartIndicator(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
153 ASSERT_APP_GETAVP(return getAvp(helpers::nokia::AVPID__Session_Start_Indicator)->getOctetString());
157 Avp Rule-Base-Id data-part pointer reference
158 @param emode Excepcion mode handling when avp is not found: Ignore (no action is taken but debug trace), Throw (exception launched, by default), Trace (trace warning).
160 const UTF8String * getRuleBaseId(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
161 ASSERT_APP_GETAVP(return getAvp(helpers::nokia::AVPID__Rule_Base_Id)->getUTF8String());
165 Avp 3GPP-GGSN-Address data-part pointer reference
166 @param emode Excepcion mode handling when avp is not found: Ignore (no action is taken but debug trace), Throw (exception launched, by default), Trace (trace warning).
168 const OctetString * get3GPPGGSNAddress(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
169 ASSERT_APP_GETAVP(return getAvp(helpers::tgpp::AVPID__3GPP_GGSN_Address)->getOctetString());
173 Avp Nokia-Reporting-Reason data-part pointer reference
174 @param emode Excepcion mode handling when avp is not found: Ignore (no action is taken but debug trace), Throw (exception launched, by default), Trace (trace warning).
176 const Enumerated * getNOKIAReportingReason(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
177 ASSERT_APP_GETAVP(return getAvp(helpers::dcca::AVPID__Multiple_Services_Credit_Control)->getAvp(helpers::nokia::AVPID__Nokia_Reporting_Reason)->getEnumerated());
181 Avp 3GPP-Charging-Id data-part pointer reference
182 @param emode Excepcion mode handling when avp is not found: Ignore (no action is taken but debug trace), Throw (exception launched, by default), Trace (trace warning).
184 const Unsigned32 * get3GPPChargingId(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
185 ASSERT_APP_GETAVP(return getAvp(helpers::tgpp::AVPID__3GPP_Charging_Id)->getUnsigned32());
189 Avp 3GPP_GPRS_Neg_QoS_Profile data-part pointer reference
190 @param emode Excepcion mode handling when avp is not found: Ignore (no action is taken but debug trace), Throw (exception launched, by default), Trace (trace warning).
193 const UTF8String * get3GPPGPRSNegQoSProfile(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
194 ASSERT_APP_GETAVP(return getAvp(helpers::tgpp::AVPID__3GPP_GPRS_Neg_QoS_Profile)->getUTF8String());