EpcTools
An event based multi-threaded C++ development framework.
Public Member Functions | List of all members
FDMessageAnswer Class Reference

Represents a Diameter answer message (in rsponse to a request). More...

#include <efd.h>

Inheritance diagram for FDMessageAnswer:
FDMessage

Public Member Functions

 FDMessageAnswer (FDMessageRequest *req, struct msg *pmsg)
 Class constructor. Constructs the received answer message. More...
 
 FDMessageAnswer (FDMessageRequest *req)
 Class constructor. Constructs an answer to be sent. More...
 
 ~FDMessageAnswer ()
 Class destructor. More...
 
FDMessageAnswersend ()
 Sends the answer. More...
 
- Public Member Functions inherited from FDMessage
FDDictionaryEntryCommandgetCommand ()
 
FDMessageadd (FDAvp &avp)
 Adds the contents of "avp" to this message. More...
 
FDMessageadd (FDDictionaryEntryAVP &de, int32_t v)
 Adds an int32_t value to this message. More...
 
FDMessageadd (FDDictionaryEntryAVP &de, int64_t v)
 Adds an int64_t value to this message. More...
 
FDMessageadd (FDDictionaryEntryAVP &de, uint32_t v)
 Adds an uint32_t value to this message. More...
 
FDMessageadd (FDDictionaryEntryAVP &de, uint64_t v)
 Adds an uint64_t value to this message. More...
 
FDMessageadd (FDDictionaryEntryAVP &de, float v)
 Adds a float value to this message. More...
 
FDMessageadd (FDDictionaryEntryAVP &de, double v)
 Adds a double value to this message. More...
 
FDMessageadd (FDDictionaryEntryAVP &de, const char *v)
 Adds a string value to this message. More...
 
FDMessageadd (FDDictionaryEntryAVP &de, const std::string &v)
 Adds a string value to this message. More...
 
FDMessageadd (FDDictionaryEntryAVP &de, const char *v, size_t len)
 Adds an octet string value to this message. More...
 
FDMessageadd (FDDictionaryEntryAVP &de, const uint8_t *v, size_t len)
 Adds an octet string value to this message. More...
 
FDMessageadd (FDDictionaryEntryAVP &de, const ETime &v)
 Adds a time value to this message. More...
 
FDMessageadd (FDExtractor &e)
 Adds the AVP's associated with the FDExtractor object to this AVP. More...
 
FDMessageadd (FDExtractorList &el)
 Adds the AVP's associated with the FDExtractorList object to this AVP. More...
 
FDMessageadd (FDExtractorAvp &ea)
 Adds the AVP's associated with the FDExtractorAvp object to this AVP. More...
 
FDMessageadd (FDExtractorAvpList &eal)
 Adds the AVP's associated with the FDExtractorAvpList object to this AVP. More...
 
Bool get (FDDictionaryEntryAVP &de, int32_t &v)
 Retrieves the int32_t AVP value associated with specified dictionary entry. More...
 
Bool get (FDDictionaryEntryAVP &de, int64_t &v)
 Retrieves the int64_t AVP value associated with specified dictionary entry. More...
 
Bool get (FDDictionaryEntryAVP &de, uint32_t &v)
 Retrieves the uint32_t AVP value associated with specified dictionary entry. More...
 
Bool get (FDDictionaryEntryAVP &de, uint64_t &v)
 Retrieves the uint64_t AVP value associated with specified dictionary entry. More...
 
Bool get (FDDictionaryEntryAVP &de, float &v)
 Retrieves the float AVP value associated with specified dictionary entry. More...
 
Bool get (FDDictionaryEntryAVP &de, double &v)
 Retrieves the double AVP value associated with specified dictionary entry. More...
 
Bool get (FDDictionaryEntryAVP &de, std::string &v)
 Retrieves the string AVP value associated with specified dictionary entry. More...
 
Bool get (FDDictionaryEntryAVP &de, char *v, size_t &len)
 Retrieves the octet string AVP value associated with specified dictionary entry. More...
 
Bool get (FDDictionaryEntryAVP &de, uint8_t *v, size_t &len)
 Retrieves the octet string AVP value associated with specified dictionary entry. More...
 
Bool get (FDDictionaryEntryAVP &de, ETime &v)
 Retrieves the time AVP value associated with specified dictionary entry. More...
 
FDAvp findAVP (FDDictionaryEntryAVP &de)
 Retrieves the AVP object specified by the dictionary entry from this message. More...
 
FDAvp getFirstAVP (Bool &found)
 Retrieves the first AVP object from this message. More...
 
Void dump ()
 Prints the AVP contents of this message. More...
 
Bool isRequest ()
 Indicates if this message is a request. More...
 
Bool isAnswer ()
 Indicates if this message is an answer. More...
 
struct msg * getMsg ()
 Retrieves the freeDiameter message pointer. More...
 
Void addOrigin ()
 Adds the Origin-Host and Origin-Realm to this message. More...
 
FDMessageaddJson (const char *json)
 Adds the AVP's represented in the JSON string. More...
 
FDMessageaddJson (const std::string &json)
 Adds the AVP's represented in the JSON string. More...
 
Bool getJson (std::string &json)
 Retrieves a JSON string with all of the AVP's represented in it. More...
 

Additional Inherited Members

- Protected Member Functions inherited from FDMessage
 FDMessage (Bool req2ans, FDDictionaryEntryCommand *de, struct msg *pmsg=NULL, Bool dedel=false, Bool msgdel=true)
 Class constructor. More...
 
 FDMessage (FDDictionaryEntryCommand *de, struct msg *pmsg=NULL, Bool dedel=false)
 Class constructor. More...
 
 FDMessage (FDDictionaryEntryApplication *ade, FDDictionaryEntryCommand *cde, struct msg *pmsg=NULL, Bool dedel=false)
 Class constructor. More...
 
 ~FDMessage ()
 Class destructor. More...
 
FDMessagesendRequest (Void(*anscb)(Void *, struct msg **), FDMessageRequest &req)
 Sends a request message. More...
 
FDMessagesendAnswer ()
 Sends an answer message;. More...
 
Void setMsgDelete (Bool v)
 Sets value indicating if the freeDiameter message object is to be deleted when this object is destroyed. More...
 

Detailed Description

Represents a Diameter answer message (in rsponse to a request).

Constructor & Destructor Documentation

◆ FDMessageAnswer() [1/2]

FDMessageAnswer::FDMessageAnswer ( FDMessageRequest req,
struct msg *  pmsg 
)

Class constructor. Constructs the received answer message.

Parameters
reqthe request message to construct the answer to.
pmsgthe underlying freeDiameter answer message
Exceptions
FDException

◆ FDMessageAnswer() [2/2]

FDMessageAnswer::FDMessageAnswer ( FDMessageRequest req)

Class constructor. Constructs an answer to be sent.

Parameters
reqthe request message to construct the answer to.
Exceptions
FDException

◆ ~FDMessageAnswer()

FDMessageAnswer::~FDMessageAnswer ( )

Class destructor.

Member Function Documentation

◆ send()

FDMessageAnswer & FDMessageAnswer::send ( )

Sends the answer.

Returns
reference to this message object.
Exceptions
FDException

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