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_helpers_tme_codectypes_ISDNAddress_hpp
10 #define anna_diameter_helpers_tme_codectypes_ISDNAddress_hpp
14 #include <anna/diameter/codec/basetypes/OctetString.hpp>
29 namespace codectypes {
32 * Diameter ISDNAddress container
33 Internal format is based in Called Party Number (Q763) but ignoring INN (is spare)
35 class ISDNAddress : public codec::basetypes::OctetString {
37 isup_number_t a_isupNumber;
39 // Only for derived diameter type:
40 void updateBasic() throw(anna::RuntimeException);
44 // Class-specific ////////////////////////////////////////////////////////////////////////////////////
47 * Gets the Q763 ISUP Number
49 * @return Q763 ISUP Number
51 const isup_number_t& getIsupNumber() const throw() { return a_isupNumber; }
54 * Sets the Q763 ISUP Number
56 * @param isupNumber Q763 ISUP Number
58 void setIsupNumber(const isup_number_t& isupNumber) throw() { a_isupNumber = isupNumber; updateBasic(); }
60 //////////////////////////////////////////////////////////////////////////////////////////////////////
64 std::string getFormatName() const throw() { return "ISDNAddress"; }
69 std::string asString() throw(anna::RuntimeException) {
70 return a_isupNumber.asString(true /* called party number */);
76 void decode(const char* buffer, const int size) throw(anna::RuntimeException);
79 // exports /////////////////////////////
80 using AvpData::getSize;
82 //using OctetString::asPrintableString;
83 using AvpData::asDataBlockString;
84 //using OctetString::asString;
85 using AvpData::asHexString;
86 //using OctetString::decode;
87 using AvpData::fromPrintableString;
88 using AvpData::fromHexString;