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_huawei_Message_hpp
10 #define anna_diameter_app_dcca_huawei_Message_hpp
14 #include <anna/diameter/app/dcca/Message.hpp>
17 #include <anna/diameter/helpers/huawei/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 {
51 Avp PS-Information pointer reference
52 @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).
54 const anna::diameter::codec::Avp * getPSInformation(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
56 return getAvp(helpers::tgpp::AVPID__Service_Information)->
57 getAvp(helpers::tgpp::AVPID__PS_Information);
62 Avp Called-Station-Id data-part pointer reference
63 @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).
65 const UTF8String * getCalledStationId(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
67 return getAvp(helpers::tgpp::AVPID__Service_Information)->
68 getAvp(helpers::tgpp::AVPID__PS_Information)->
69 getAvp(helpers::radius::AVPID__Called_Station_Id)->getUTF8String();
74 Avp 3GPP-PDP-Type data-part pointer reference
75 @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).
77 const Unsigned32 * get3GPPPDPType(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
79 return getAvp(helpers::tgpp::AVPID__Service_Information)->
80 getAvp(helpers::tgpp::AVPID__PS_Information)->
81 getAvp(helpers::tgpp::AVPID__3GPP_PDP_Type)->getUnsigned32();
86 Avp 3GPP-SGSN-MCC-MNC data-part pointer reference
87 @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).
89 const UTF8String * get3GPPSGSNMCCMNC(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
91 return getAvp(helpers::tgpp::AVPID__Service_Information)->
92 getAvp(helpers::tgpp::AVPID__PS_Information)->
93 getAvp(helpers::tgpp::AVPID__3GPP_SGSN_MCC_MNC)->getUTF8String();
98 Avp 3GPP-Charging-Characteristics data-part pointer reference
99 @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).
101 const UTF8String * get3GPPChargingCharacteristics(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
103 return getAvp(helpers::tgpp::AVPID__Service_Information)->
104 getAvp(helpers::tgpp::AVPID__PS_Information)->
105 getAvp(helpers::tgpp::AVPID__3GPP_Charging_Characteristics)->getUTF8String();
110 Avp 3GPP-GPRS-Neg-QoS-Profile data-part pointer reference
111 @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).
113 const UTF8String * get3GPPGPRSNegQoSProfile(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
115 return getAvp(helpers::tgpp::AVPID__Service_Information)->
116 getAvp(helpers::tgpp::AVPID__PS_Information)->
117 getAvp(helpers::tgpp::AVPID__3GPP_GPRS_Neg_QoS_Profile)->getUTF8String();
122 Avp CG-Address data-part pointer reference
123 @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).
125 const Address * getCGAddress(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
127 return getAvp(helpers::tgpp::AVPID__Service_Information)->
128 getAvp(helpers::tgpp::AVPID__PS_Information)->
129 getAvp(helpers::tgpp::AVPID__CG_Address)->getAddress();
134 Avp 3GPP-Rat-Type data-part pointer reference
135 @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).
137 const OctetString * get3GPPRatType(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
139 return getAvp(helpers::tgpp::AVPID__Service_Information)->
140 getAvp(helpers::tgpp::AVPID__PS_Information)->
141 getAvp(helpers::tgpp::AVPID__3GPP_Rat_Type)->getOctetString();
146 Avp SGSN-Address data-part pointer reference
147 @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).
149 const Address * getSGSNAddress(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
151 return getAvp(helpers::tgpp::AVPID__Service_Information)->
152 getAvp(helpers::tgpp::AVPID__PS_Information)->
153 getAvp(helpers::tgpp::AVPID__SGSN_Address)->getAddress();
158 Avp GGSN-Address data-part pointer reference
159 @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).
161 const Address * getGGSNAddress(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
163 return getAvp(helpers::tgpp::AVPID__Service_Information)->
164 getAvp(helpers::tgpp::AVPID__PS_Information)->
165 getAvp(helpers::tgpp::AVPID__GGSN_Address)->getAddress();
170 Avp 3GPP-Charging-Id data-part pointer reference
171 @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).
173 const Unsigned32 * get3GPPChargingId(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
175 return getAvp(helpers::tgpp::AVPID__Service_Information)->
176 getAvp(helpers::tgpp::AVPID__PS_Information)->
177 getAvp(helpers::tgpp::AVPID__3GPP_Charging_Id)->getUnsigned32();
182 Avp Reporting-Reason data-part pointer reference
183 @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).
185 const Enumerated * getReportingReason(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
186 ASSERT_APP_GETAVP(return getAvp(helpers::dcca::AVPID__Multiple_Services_Credit_Control)->getAvp(helpers::tgpp::AVPID__Reporting_Reason)->getEnumerated());
190 Avp Trigger-Type data-part pointer reference
191 @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 Enumerated * getTriggerType(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
195 return getAvp(helpers::dcca::AVPID__Multiple_Services_Credit_Control)->
196 getAvp(helpers::tgpp::AVPID__Trigger)->
197 getAvp(helpers::tgpp::AVPID__Trigger_Type)->getEnumerated();
202 Avp PS-Furnish-Charging-Information pointer reference
203 @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).
205 const anna::diameter::codec::Avp * getPSFurnishChargingInformation(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
207 return getAvp(helpers::dcca::AVPID__Multiple_Services_Credit_Control)->
208 getAvp(helpers::tgpp::AVPID__PS_Furnish_Charging_Information);
213 Avp PS-Free-Format-Data data-part pointer reference
214 @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).
216 const OctetString * getPSFreeFormatData(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
218 return getAvp(helpers::dcca::AVPID__Multiple_Services_Credit_Control)->
219 getAvp(helpers::tgpp::AVPID__PS_Furnish_Charging_Information)->
220 getAvp(helpers::tgpp::AVPID__PS_Free_Format_Data)->getOctetString();
225 Avp PS-Append-Free-Format-Data data-part pointer reference
226 @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).
228 const Enumerated * getPSAppendFreeFormatData(anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
230 return getAvp(helpers::dcca::AVPID__Multiple_Services_Credit_Control)->
231 getAvp(helpers::tgpp::AVPID__PS_Furnish_Charging_Information)->
232 getAvp(helpers::tgpp::AVPID__PS_Append_Free_Format_Data)->getEnumerated();
237 Avp n-th PDP-Address pointer reference
238 @param ocurrence Select the n-th PDP-Address within the PS-Information. First by default.
239 @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).
241 const Address * getPDPAddress(int ocurrence = 1, anna::Exception::Mode::_v emode = anna::Exception::Mode::Throw) throw(anna::RuntimeException) {
243 return getAvp(helpers::tgpp::AVPID__Service_Information)->
244 getAvp(helpers::tgpp::AVPID__PS_Information)->
245 getAvp(helpers::tgpp::AVPID__PDP_Address)->getAddress();