ANNA Suite  2020b
Multipurpose development suite for Telco applications
Public Member Functions | List of all members
anna::diameter::app::base::Message Class Reference

#include <Message.hpp>

Inheritance diagram for anna::diameter::app::base::Message:
Inheritance graph
[legend]
Collaboration diagram for anna::diameter::app::base::Message:
Collaboration graph
[legend]

Public Member Functions

const UTF8StringgetSessionId (anna::Exception::Mode::_v emode=anna::Exception::Mode::Throw) noexcept(false)
 
const DiameterIdentitygetDestinationHost (anna::Exception::Mode::_v emode=anna::Exception::Mode::Throw) noexcept(false)
 
const DiameterIdentitygetDestinationRealm (anna::Exception::Mode::_v emode=anna::Exception::Mode::Throw) noexcept(false)
 
const UTF8StringgetUserName (anna::Exception::Mode::_v emode=anna::Exception::Mode::Throw) noexcept(false)
 
const EnumeratedgetTerminationCause (anna::Exception::Mode::_v emode=anna::Exception::Mode::Throw) noexcept(false)
 
const Unsigned32getAuthApplicationId (anna::Exception::Mode::_v emode=anna::Exception::Mode::Throw) noexcept(false)
 
const TimegetEventTimestamp (anna::Exception::Mode::_v emode=anna::Exception::Mode::Throw) noexcept(false)
 
- Public Member Functions inherited from anna::diameter::codec::Message
 Message (Engine *engine=NULL)
 
 Message (CommandId id, Engine *engine=NULL)
 
void setEngine (Engine *engine)
 
virtual ~Message ()
 
void setId (CommandId id) noexcept(false)
 
void setId (const char *name) noexcept(false)
 
void setVersion (U8 version)
 
void setProxiableBit (bool activate=true)
 
void setErrorBit (bool activate=true)
 
void setPotentiallyReTransmittedMessageBit (bool activate=true)
 
void setApplicationId (U32 aid) noexcept(false)
 
void setHopByHop (U32 hbh)
 
void setEndToEnd (U32 ete)
 
void setHeaderToAnswer (const Message &request) noexcept(false)
 
void setStandardToAnswer (const Message &request, const std::string &originHost, const std::string &originRealm, int resultCode=helpers::base::AVPVALUES__Result_Code::DIAMETER_SUCCESS) noexcept(false)
 
void setResultCode (int rc=helpers::base::AVPVALUES__Result_Code::DIAMETER_SUCCESS) noexcept(false)
 
int getResultCode () const
 
AvpaddAvp (AvpId id) noexcept(false)
 
AvpaddAvp (const char *name) noexcept(false)
 
AvpaddAvp (Avp *avp)
 
bool removeAvp (AvpId id, int ocurrence=1) noexcept(false)
 
bool removeAvp (const char *name, int ocurrence=1) noexcept(false)
 
virtual void clear (bool resetEngine=true) noexcept(false)
 
void decode (const anna::DataBlock &db, Message *ptrAnswer=NULL) noexcept(false)
 
void fix ()
 
bool valid (Message *ptrAnswer=NULL) const noexcept(false)
 
void fromXML (const anna::xml::Node *messageNode) noexcept(false)
 
void loadXMLFile (const std::string &xmlPathFile) noexcept(false)
 
void loadXMLString (const std::string &xmlString) noexcept(false)
 
const CommandIdgetId () const
 
U8 getVersion () const
 
bool isRequest () const
 
bool isAnswer () const
 
const U32getApplicationId () const
 
const U32getHopByHop () const
 
const U32getEndToEnd () const
 
const anna::diameter::stack::CommandgetStackCommand () const noexcept(false)
 
bool requestBit () const
 
bool proxiableBit () const
 
bool errorBit () const
 
bool potentiallyReTransmittedMessageBit () const
 
const AvpgetAvp (AvpId id, int ocurrence=1, anna::Exception::Mode::_v emode=anna::Exception::Mode::Throw) const noexcept(false)
 
AvpgetAvp (AvpId id, int ocurrence=1, anna::Exception::Mode::_v emode=anna::Exception::Mode::Throw) noexcept(false)
 
const AvpgetAvp (const char *name, int ocurrence=1, anna::Exception::Mode::_v emode=anna::Exception::Mode::Throw) const noexcept(false)
 
AvpgetAvp (const char *name, int ocurrence=1, anna::Exception::Mode::_v emode=anna::Exception::Mode::Throw) noexcept(false)
 
int countAvp (AvpId id) const
 
int countAvp (const char *name) const noexcept(false)
 
int countChilds () const
 
const anna::DataBlockcode () noexcept(false)
 
anna::xml::NodeasXML (anna::xml::Node *parent) const
 
std::string asXMLString (bool normalize=false) const
 
bool isLike (const std::string &pattern) const
 

Additional Inherited Members

- Static Public Attributes inherited from anna::diameter::codec::Message
static const int HeaderLength
 
static const U8 RBitMask
 
static const U8 PBitMask
 
static const U8 EBitMask
 
static const U8 TBitMask
 
- Protected Member Functions inherited from anna::diameter::codec::Message
virtual EnginegetEngine () const noexcept(false)
 
virtual void initialize ()
 
- Protected Attributes inherited from anna::diameter::codec::Message
Enginea_engine
 

Detailed Description

Diameter base message

Member Function Documentation

◆ getAuthApplicationId()

const Unsigned32* anna::diameter::app::base::Message::getAuthApplicationId ( anna::Exception::Mode::_v  emode = anna::Exception::Mode::Throw)
inlinenoexcept

Avp Auth-Application-Id data-part pointer reference

Parameters
emodeExcepcion mode handling when avp is not found: Ignore (no action is taken but debug trace), Throw (exception launched, by default), Trace (trace warning).
95  {
96  ASSERT_APP_GETAVP(return getAvp(helpers::base::AVPID__Auth_Application_Id)->getUnsigned32());
97  }
#define ASSERT_APP_GETAVP(source)
Definition: defines.hpp:15
const Avp * getAvp(AvpId id, int ocurrence=1, anna::Exception::Mode::_v emode=anna::Exception::Mode::Throw) const noexcept(false)
Definition: Message.hpp:659

◆ getDestinationHost()

const DiameterIdentity* anna::diameter::app::base::Message::getDestinationHost ( anna::Exception::Mode::_v  emode = anna::Exception::Mode::Throw)
inlinenoexcept

Avp Destination-Host data-part pointer reference

Parameters
emodeExcepcion mode handling when avp is not found: Ignore (no action is taken but debug trace), Throw (exception launched, by default), Trace (trace warning).
63  {
64  ASSERT_APP_GETAVP(return getAvp(helpers::base::AVPID__Destination_Host)->getDiameterIdentity());
65  }
#define ASSERT_APP_GETAVP(source)
Definition: defines.hpp:15
const Avp * getAvp(AvpId id, int ocurrence=1, anna::Exception::Mode::_v emode=anna::Exception::Mode::Throw) const noexcept(false)
Definition: Message.hpp:659

◆ getDestinationRealm()

const DiameterIdentity* anna::diameter::app::base::Message::getDestinationRealm ( anna::Exception::Mode::_v  emode = anna::Exception::Mode::Throw)
inlinenoexcept

Avp Destination-Realm data-part pointer reference

Parameters
emodeExcepcion mode handling when avp is not found: Ignore (no action is taken but debug trace), Throw (exception launched, by default), Trace (trace warning).
71  {
72  ASSERT_APP_GETAVP(return getAvp(helpers::base::AVPID__Destination_Realm)->getDiameterIdentity());
73  }
#define ASSERT_APP_GETAVP(source)
Definition: defines.hpp:15
const Avp * getAvp(AvpId id, int ocurrence=1, anna::Exception::Mode::_v emode=anna::Exception::Mode::Throw) const noexcept(false)
Definition: Message.hpp:659

◆ getEventTimestamp()

const Time* anna::diameter::app::base::Message::getEventTimestamp ( anna::Exception::Mode::_v  emode = anna::Exception::Mode::Throw)
inlinenoexcept

Avp Event-Timestamp data-part pointer reference

Parameters
emodeExcepcion mode handling when avp is not found: Ignore (no action is taken but debug trace), Throw (exception launched, by default), Trace (trace warning).
103  {
104  ASSERT_APP_GETAVP(return getAvp(helpers::radius::AVPID__Event_Timestamp)->getTime());
105  }
#define ASSERT_APP_GETAVP(source)
Definition: defines.hpp:15
const Avp * getAvp(AvpId id, int ocurrence=1, anna::Exception::Mode::_v emode=anna::Exception::Mode::Throw) const noexcept(false)
Definition: Message.hpp:659

◆ getSessionId()

const UTF8String* anna::diameter::app::base::Message::getSessionId ( anna::Exception::Mode::_v  emode = anna::Exception::Mode::Throw)
inlinenoexcept

Avp Session-Id data-part pointer reference

Parameters
emodeExcepcion mode handling when avp is not found: Ignore (no action is taken but debug trace), Throw (exception launched, by default), Trace (trace warning).
55  {
56  ASSERT_APP_GETAVP(return getAvp(helpers::base::AVPID__Session_Id)->getUTF8String());
57  }
#define ASSERT_APP_GETAVP(source)
Definition: defines.hpp:15
const Avp * getAvp(AvpId id, int ocurrence=1, anna::Exception::Mode::_v emode=anna::Exception::Mode::Throw) const noexcept(false)
Definition: Message.hpp:659

◆ getTerminationCause()

const Enumerated* anna::diameter::app::base::Message::getTerminationCause ( anna::Exception::Mode::_v  emode = anna::Exception::Mode::Throw)
inlinenoexcept

Avp Termination-Cause data-part pointer reference

Parameters
emodeExcepcion mode handling when avp is not found: Ignore (no action is taken but debug trace), Throw (exception launched, by default), Trace (trace warning).
87  {
88  ASSERT_APP_GETAVP(return getAvp(helpers::base::AVPID__Termination_Cause)->getEnumerated());
89  }
#define ASSERT_APP_GETAVP(source)
Definition: defines.hpp:15
const Avp * getAvp(AvpId id, int ocurrence=1, anna::Exception::Mode::_v emode=anna::Exception::Mode::Throw) const noexcept(false)
Definition: Message.hpp:659

◆ getUserName()

const UTF8String* anna::diameter::app::base::Message::getUserName ( anna::Exception::Mode::_v  emode = anna::Exception::Mode::Throw)
inlinenoexcept

Avp User-Name data-part pointer reference

Parameters
emodeExcepcion mode handling when avp is not found: Ignore (no action is taken but debug trace), Throw (exception launched, by default), Trace (trace warning).
79  {
80  ASSERT_APP_GETAVP(return getAvp(helpers::radius::AVPID__User_Name)->getUTF8String());
81  }
#define ASSERT_APP_GETAVP(source)
Definition: defines.hpp:15
const Avp * getAvp(AvpId id, int ocurrence=1, anna::Exception::Mode::_v emode=anna::Exception::Mode::Throw) const noexcept(false)
Definition: Message.hpp:659

The documentation for this class was generated from the following file: