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

A class wrapper around a freeDiameter AVP object. More...

#include <efd.h>

Public Member Functions

 FDAvp (FDDictionaryEntryAVP &de, Bool dedel=false)
 Class constructor. More...
 
 FDAvp (FDDictionaryEntryAVP &de, struct avp *a, Bool dedel=false)
 Class constructor. More...
 
 ~FDAvp ()
 Class destructor. More...
 
FDAvpadd (FDAvp &avp)
 Adds an AVP to this grouped AVP. More...
 
Bool isValid ()
 Indicates if this AVP object is valid. More...
 
FDAvpadd (FDDictionaryEntryAVP &de, int32_t v)
 Adds an int32_t AVP to this grouped AVP. More...
 
FDAvpadd (FDDictionaryEntryAVP &de, int64_t v)
 Adds an int64_t AVP to this grouped AVP. More...
 
FDAvpadd (FDDictionaryEntryAVP &de, uint32_t v)
 Adds an uint32_t AVP to this grouped AVP. More...
 
FDAvpadd (FDDictionaryEntryAVP &de, uint64_t v)
 Adds an uint64_t AVP to this grouped AVP. More...
 
FDAvpadd (FDDictionaryEntryAVP &de, float v)
 Adds a float AVP to this grouped AVP. More...
 
FDAvpadd (FDDictionaryEntryAVP &de, double v)
 Adds a double AVP to this grouped AVP. More...
 
FDAvpadd (FDDictionaryEntryAVP &de, const char *v)
 Adds a string AVP to this grouped AVP. More...
 
FDAvpadd (FDDictionaryEntryAVP &de, const std::string &v)
 Adds a string to this grouped AVP. More...
 
FDAvpadd (FDDictionaryEntryAVP &de, const char *v, size_t len)
 Adds an octet string AVP to this grouped AVP. More...
 
FDAvpadd (FDDictionaryEntryAVP &de, const uint8_t *v, size_t len)
 Adds an octet string AVP to this grouped AVP. More...
 
FDAvpadd (FDDictionaryEntryAVP &de, const ETime &v)
 Adds a time AVP to this grouped AVP. More...
 
FDAvpoperator= (int32_t v)
 Assigns an int32_t value to this AVP. More...
 
FDAvpoperator= (int64_t v)
 Assigns an int64_t value to this AVP. More...
 
FDAvpoperator= (uint32_t v)
 Assigns an uint32_t value to this AVP. More...
 
FDAvpoperator= (uint64_t v)
 Assigns an uint64_t value to this AVP. More...
 
FDAvpoperator= (float v)
 Assigns a float value to this AVP. More...
 
FDAvpoperator= (double v)
 Assigns a double value to this AVP. More...
 
FDAvpoperator= (const char *v)
 Assigns a string value to this AVP. More...
 
FDAvpoperator= (const std::string &v)
 Assigns a string value to this AVP. More...
 
FDAvpoperator= (const ETime &v)
 Assigns a time value to this AVP. More...
 
Bool get (int32_t &v)
 Retrieves an int32_t AVP value. Returns True if the value is successfully retrieved. More...
 
Bool get (uint32_t &v)
 Retrieves an uint32_t AVP value. Returns True if the value is successfully retrieved. More...
 
Bool get (uint64_t &v)
 Retrieves an uint64_t AVP value. Returns True if the value is successfully retrieved. More...
 
Bool get (float &v)
 Retrieves a float AVP value. More...
 
Bool get (double &v)
 Retrieves a double AVP value. More...
 
Bool get (int64_t &v)
 Retrieves an int64_t AVP value. More...
 
Bool get (std::string &v)
 Retrieves a string AVP value. More...
 
Bool get (char *data, size_t &len)
 Retrieves an octet string AVP value. More...
 
Bool get (uint8_t *data, size_t &len)
 Retrieves an octet string AVP value. More...
 
Bool get (sSS &ss)
 Retrieves an IP address AVP value. More...
 
Bool get (ETime &v)
 Retrieves a time AVP value. More...
 
FDAvpset (int32_t v)
 Assigns an int32_t value to this AVP. More...
 
FDAvpset (uint32_t v)
 Assigns an uint32_t value to this AVP. More...
 
FDAvpset (uint64_t v)
 Assigns an uint64_t value to this AVP. More...
 
FDAvpset (float v)
 Assigns a float value to this AVP. More...
 
FDAvpset (double v)
 Assigns a double value to this AVP. More...
 
FDAvpset (const char *v)
 Assigns a string value to this AVP. More...
 
FDAvpset (const uint8_t *v, size_t len)
 Assigns an octet string value to this AVP. More...
 
FDAvpset (const std::string &v)
 Assigns a string value to this AVP. More...
 
FDAvpset (int64_t v)
 Assigns an int64_t value to this AVP. More...
 
FDAvpset (const char *v, size_t len)
 Assigns an octet string value to this AVP. More...
 
FDAvpset (const ETime &v)
 Assigns a time value to this AVP. More...
 
FDAvp getNext (Bool &found)
 Returns the next AVP from a grouped AVP. More...
 
FDAvp getChild (Bool &found)
 Returns the first child AVP of this grouped AVP. More...
 
struct avp * getAvp ()
 Returns the underlying freeDiameter AVP object. More...
 
union avp_value * getAvpValue ()
 Returns the underlying freeDiameter AVP value object. More...
 
FDAvpsetAvp (struct avp *a)
 Sets the freeDiameter AVP object that this object is associated with. More...
 
FDAvpadd (FDExtractor &e)
 Adds the AVP's associated with the FDExtractor object to this AVP. More...
 
FDAvpadd (FDExtractorList &el)
 Adds the list of AVP's associated with the FDExtractorList object to this AVP. More...
 
FDAvpadd (FDExtractorAvp &ea)
 Adds the AVP's associated with the FDExtractorAvp object to this AVP. More...
 
FDAvpadd (FDExtractorAvpList &eal)
 Adds the list of AVP's associated with the FDExtractorAvpList object to this AVP. More...
 
FDAvpaddJson (const char *json)
 Adds the AVP's represented in a JSON string. More...
 
FDAvpaddJson (const std::string &json)
 Adds the AVP's represented in a JSON string. More...
 
Bool getJson (std::string &json)
 Retrieves the JSON string representing the AVP values for this AVP. More...
 
Void dump ()
 Prints the contents of this AVP to the screen. More...
 
FDDictionaryEntryAVPgetDictionaryEntry ()
 Retrieves the dictionary entry associated with this FDAvp object. More...
 

Protected Member Functions

Void addTo (msg_or_avp *reference)
 Adds the contents of the message or avp to this AVP object. More...
 

Detailed Description

A class wrapper around a freeDiameter AVP object.

Constructor & Destructor Documentation

◆ FDAvp() [1/2]

FDAvp::FDAvp ( FDDictionaryEntryAVP de,
Bool  dedel = false 
)

Class constructor.

Parameters
dethe dictionary entry for the AVP.
dedelinstructs the destructor to delete the dictionary entry.
Exceptions
FDException

◆ FDAvp() [2/2]

FDAvp::FDAvp ( FDDictionaryEntryAVP de,
struct avp *  a,
Bool  dedel = false 
)

Class constructor.

Parameters
dethe dictionary entry for the AVP.
athe freeDiameter AVP pointer.
dedelinstructs the destructor to delete the dictionary entry.
Exceptions
FDException

◆ ~FDAvp()

FDAvp::~FDAvp ( )

Class destructor.

Member Function Documentation

◆ add() [1/16]

FDAvp & FDAvp::add ( FDAvp avp)

Adds an AVP to this grouped AVP.

Parameters
avpthe AVP to add.
Returns
reference to this AVP object.
Exceptions
FDException

◆ add() [2/16]

FDAvp& FDAvp::add ( FDDictionaryEntryAVP de,
const char *  v 
)
inline

Adds a string AVP to this grouped AVP.

Parameters
dethe dictionary entry for the AVP to add.
vthe value to add.
Returns
reference to this AVP object.
Exceptions
FDException

◆ add() [3/16]

FDAvp& FDAvp::add ( FDDictionaryEntryAVP de,
const char *  v,
size_t  len 
)
inline

Adds an octet string AVP to this grouped AVP.

Parameters
dethe dictionary entry for the AVP to add.
vthe value to add.
lenthe length of the octet string.
Returns
reference to this AVP object.
Exceptions
FDException

◆ add() [4/16]

FDAvp& FDAvp::add ( FDDictionaryEntryAVP de,
const ETime v 
)
inline

Adds a time AVP to this grouped AVP.

Parameters
dethe dictionary entry for the AVP to add.
vthe value to add.
Returns
reference to this AVP object.
Exceptions
FDException

◆ add() [5/16]

FDAvp& FDAvp::add ( FDDictionaryEntryAVP de,
const std::string &  v 
)
inline

Adds a string to this grouped AVP.

Parameters
dethe dictionary entry for the AVP to add.
vthe value to add.
Returns
reference to this AVP object.
Exceptions
FDException

◆ add() [6/16]

FDAvp& FDAvp::add ( FDDictionaryEntryAVP de,
const uint8_t *  v,
size_t  len 
)
inline

Adds an octet string AVP to this grouped AVP.

Parameters
dethe dictionary entry for the AVP to add.
vthe value to add.
lenthe length of the octet string.
Returns
reference to this AVP object.
Exceptions
FDException

◆ add() [7/16]

FDAvp& FDAvp::add ( FDDictionaryEntryAVP de,
double  v 
)
inline

Adds a double AVP to this grouped AVP.

Parameters
dethe dictionary entry for the AVP to add.
vthe value to add.
Returns
reference to this AVP object.
Exceptions
FDException

◆ add() [8/16]

FDAvp& FDAvp::add ( FDDictionaryEntryAVP de,
float  v 
)
inline

Adds a float AVP to this grouped AVP.

Parameters
dethe dictionary entry for the AVP to add.
vthe value to add.
Returns
reference to this AVP object.
Exceptions
FDException

◆ add() [9/16]

FDAvp& FDAvp::add ( FDDictionaryEntryAVP de,
int32_t  v 
)
inline

Adds an int32_t AVP to this grouped AVP.

Parameters
dethe dictionary entry for the AVP to add.
vthe value to add.
Returns
reference to this AVP object.
Exceptions
FDException

◆ add() [10/16]

FDAvp& FDAvp::add ( FDDictionaryEntryAVP de,
int64_t  v 
)
inline

Adds an int64_t AVP to this grouped AVP.

Parameters
dethe dictionary entry for the AVP to add.
vthe value to add.
Returns
reference to this AVP object.
Exceptions
FDException

◆ add() [11/16]

FDAvp& FDAvp::add ( FDDictionaryEntryAVP de,
uint32_t  v 
)
inline

Adds an uint32_t AVP to this grouped AVP.

Parameters
dethe dictionary entry for the AVP to add.
vthe value to add.
Returns
reference to this AVP object.
Exceptions
FDException

◆ add() [12/16]

FDAvp& FDAvp::add ( FDDictionaryEntryAVP de,
uint64_t  v 
)
inline

Adds an uint64_t AVP to this grouped AVP.

Parameters
dethe dictionary entry for the AVP to add.
vthe value to add.
Returns
reference to this AVP object.
Exceptions
FDException

◆ add() [13/16]

FDAvp & FDAvp::add ( FDExtractor e)

Adds the AVP's associated with the FDExtractor object to this AVP.

Parameters
ethe FDExtractor object reference to copy.
Returns
reference to this AVP object.
Exceptions
FDException

◆ add() [14/16]

FDAvp & FDAvp::add ( FDExtractorAvp ea)

Adds the AVP's associated with the FDExtractorAvp object to this AVP.

Parameters
eathe FDExtractorAvp object reference to copy.
Returns
reference to this AVP object.
Exceptions
FDException

◆ add() [15/16]

FDAvp & FDAvp::add ( FDExtractorAvpList eal)

Adds the list of AVP's associated with the FDExtractorAvpList object to this AVP.

Parameters
ealthe FDExtractorAvpList object reference to copy.
Returns
reference to this AVP object.
Exceptions
FDException

◆ add() [16/16]

FDAvp & FDAvp::add ( FDExtractorList el)

Adds the list of AVP's associated with the FDExtractorList object to this AVP.

Parameters
elthe FDExtractorList object reference to copy.
Returns
reference to this AVP object.
Exceptions
FDException

◆ addJson() [1/2]

FDAvp & FDAvp::addJson ( const char *  json)

Adds the AVP's represented in a JSON string.

Parameters
jsonthe JSON string containing the AVP values to add.
Returns
reference to this AVP object.
Exceptions
FDException

◆ addJson() [2/2]

FDAvp& FDAvp::addJson ( const std::string &  json)
inline

Adds the AVP's represented in a JSON string.

Parameters
jsonthe JSON string containing the AVP values to add.
Returns
reference to this AVP object.
Exceptions
FDException

◆ addTo()

Void FDAvp::addTo ( msg_or_avp *  reference)
protected

Adds the contents of the message or avp to this AVP object.

Parameters
referencethe message or avp to add.
Exceptions
FDException

◆ dump()

Void FDAvp::dump ( )

Prints the contents of this AVP to the screen.

◆ get() [1/11]

Bool FDAvp::get ( char *  data,
size_t &  len 
)

Retrieves an octet string AVP value.

Parameters
datathe variable to populate.
lenthe maximum length of the octet string.
Returns
True if the value was retrieved, otherwise False.

◆ get() [2/11]

Bool FDAvp::get ( double &  v)
inline

Retrieves a double AVP value.

Parameters
vthe variable to populate.
Returns
True if the value was retrieved, otherwise False.

◆ get() [3/11]

Bool FDAvp::get ( ETime v)

Retrieves a time AVP value.

Parameters
vthe variable to populate.
Returns
True if the value was retrieved, otherwise False.
Exceptions
FDException

◆ get() [4/11]

Bool FDAvp::get ( float &  v)
inline

Retrieves a float AVP value.

Parameters
vthe variable to populate.
Returns
True if the value was retrieved, otherwise False.

◆ get() [5/11]

Bool FDAvp::get ( int32_t &  v)
inline

Retrieves an int32_t AVP value. Returns True if the value is successfully retrieved.

Parameters
vthe variable to populate.
Returns
True if the value was retrieved, otherwise False.

◆ get() [6/11]

Bool FDAvp::get ( int64_t &  v)

Retrieves an int64_t AVP value.

Parameters
vthe variable to populate.
Returns
True if the value was retrieved, otherwise False.

◆ get() [7/11]

Bool FDAvp::get ( sSS &  ss)

Retrieves an IP address AVP value.

Parameters
ssthe variable to populate.
Returns
True if the value was retrieved, otherwise False.

◆ get() [8/11]

Bool FDAvp::get ( std::string &  v)

Retrieves a string AVP value.

Parameters
vthe variable to populate.
Returns
True if the value was retrieved, otherwise False.

◆ get() [9/11]

Bool FDAvp::get ( uint32_t &  v)
inline

Retrieves an uint32_t AVP value. Returns True if the value is successfully retrieved.

Parameters
vthe variable to populate.
Returns
True if the value was retrieved, otherwise False.

◆ get() [10/11]

Bool FDAvp::get ( uint64_t &  v)
inline

Retrieves an uint64_t AVP value. Returns True if the value is successfully retrieved.

Parameters
vthe variable to populate.
Returns
True if the value was retrieved, otherwise False.

◆ get() [11/11]

Bool FDAvp::get ( uint8_t *  data,
size_t &  len 
)

Retrieves an octet string AVP value.

Parameters
datathe variable to populate.
lenthe maximum length of the octet string.
Returns
True if the value was retrieved, otherwise False.

◆ getAvp()

struct avp* FDAvp::getAvp ( )
inline

Returns the underlying freeDiameter AVP object.

Returns
pointer to the freeDiameter AVP object.

◆ getAvpValue()

union avp_value* FDAvp::getAvpValue ( )
inline

Returns the underlying freeDiameter AVP value object.

Returns
pointer to the freeDiameter AVP value object.

◆ getChild()

FDAvp FDAvp::getChild ( Bool &  found)

Returns the first child AVP of this grouped AVP.

Parameters
foundTrue if the first child AVP is returned, False if there are no child AVP's are available.
Returns
reference to the first child AVP object.
Exceptions
FDException

◆ getDictionaryEntry()

FDDictionaryEntryAVP& FDAvp::getDictionaryEntry ( )
inline

Retrieves the dictionary entry associated with this FDAvp object.

Returns
A reference to the AVP dictionary entry object.

◆ getJson()

Bool FDAvp::getJson ( std::string &  json)

Retrieves the JSON string representing the AVP values for this AVP.

Parameters
jsonthe JSON string to populate.
Returns
True if the JSON string was populated, otherwise False.

◆ getNext()

FDAvp FDAvp::getNext ( Bool &  found)

Returns the next AVP from a grouped AVP.

Parameters
foundTrue if the next AVP is returned, False if no more AVP's are available.
Returns
reference to the next AVP object.
Exceptions
FDException

◆ isValid()

Bool FDAvp::isValid ( )
inline

Indicates if this AVP object is valid.

Returns
True if this AVP object is associated with a freeDiameter AVP object, otherwise False.

◆ operator=() [1/9]

FDAvp& FDAvp::operator= ( const char *  v)
inline

Assigns a string value to this AVP.

Parameters
vthe value to add.
Returns
reference to this AVP object.
Exceptions
FDException

◆ operator=() [2/9]

FDAvp& FDAvp::operator= ( const ETime v)
inline

Assigns a time value to this AVP.

Parameters
vthe value to add.
Returns
reference to this AVP object.
Exceptions
FDException

◆ operator=() [3/9]

FDAvp& FDAvp::operator= ( const std::string &  v)
inline

Assigns a string value to this AVP.

Parameters
vthe value to add.
Returns
reference to this AVP object.
Exceptions
FDException

◆ operator=() [4/9]

FDAvp& FDAvp::operator= ( double  v)
inline

Assigns a double value to this AVP.

Parameters
vthe value to add.
Returns
reference to this AVP object.
Exceptions
FDException

◆ operator=() [5/9]

FDAvp& FDAvp::operator= ( float  v)
inline

Assigns a float value to this AVP.

Parameters
vthe value to add.
Returns
reference to this AVP object.
Exceptions
FDException

◆ operator=() [6/9]

FDAvp& FDAvp::operator= ( int32_t  v)
inline

Assigns an int32_t value to this AVP.

Parameters
vthe value to add.
Returns
reference to this AVP object.
Exceptions
FDException

◆ operator=() [7/9]

FDAvp& FDAvp::operator= ( int64_t  v)
inline

Assigns an int64_t value to this AVP.

Parameters
vthe value to add.
Returns
reference to this AVP object.
Exceptions
FDException

◆ operator=() [8/9]

FDAvp& FDAvp::operator= ( uint32_t  v)
inline

Assigns an uint32_t value to this AVP.

Parameters
vthe value to add.
Returns
reference to this AVP object.
Exceptions
FDException

◆ operator=() [9/9]

FDAvp& FDAvp::operator= ( uint64_t  v)
inline

Assigns an uint64_t value to this AVP.

Parameters
vthe value to add.
Returns
reference to this AVP object.
Exceptions
FDException

◆ set() [1/11]

FDAvp& FDAvp::set ( const char *  v)
inline

Assigns a string value to this AVP.

Parameters
vthe value to assign.
Returns
reference to this AVP object.
Exceptions
FDException

◆ set() [2/11]

FDAvp & FDAvp::set ( const char *  v,
size_t  len 
)

Assigns an octet string value to this AVP.

Parameters
vthe value to assign.
lenthe length of the octet string.
Returns
reference to this AVP object.
Exceptions
FDException

◆ set() [3/11]

FDAvp & FDAvp::set ( const ETime v)

Assigns a time value to this AVP.

Parameters
vthe value to assign.
Exceptions
FDException

◆ set() [4/11]

FDAvp& FDAvp::set ( const std::string &  v)
inline

Assigns a string value to this AVP.

Parameters
vthe value to assign.
Returns
reference to this AVP object.
Exceptions
FDException

◆ set() [5/11]

FDAvp& FDAvp::set ( const uint8_t *  v,
size_t  len 
)
inline

Assigns an octet string value to this AVP.

Parameters
vthe value to assign.
lenthe length of the octet string.
Returns
reference to this AVP object.
Exceptions
FDException

◆ set() [6/11]

FDAvp& FDAvp::set ( double  v)
inline

Assigns a double value to this AVP.

Parameters
vthe value to assign.
Returns
reference to this AVP object.
Exceptions
FDException

◆ set() [7/11]

FDAvp& FDAvp::set ( float  v)
inline

Assigns a float value to this AVP.

Parameters
vthe value to assign.
Returns
reference to this AVP object.
Exceptions
FDException

◆ set() [8/11]

FDAvp& FDAvp::set ( int32_t  v)
inline

Assigns an int32_t value to this AVP.

Parameters
vthe value to assign.
Returns
reference to this AVP object.
Exceptions
FDException

◆ set() [9/11]

FDAvp & FDAvp::set ( int64_t  v)

Assigns an int64_t value to this AVP.

Parameters
vthe value to assign.
Returns
reference to this AVP object.
Exceptions
FDException

◆ set() [10/11]

FDAvp& FDAvp::set ( uint32_t  v)
inline

Assigns an uint32_t value to this AVP.

Parameters
vthe value to assign.
Returns
reference to this AVP object.
Exceptions
FDException

◆ set() [11/11]

FDAvp& FDAvp::set ( uint64_t  v)
inline

Assigns an uint64_t value to this AVP.

Parameters
vthe value to assign.
Returns
reference to this AVP object.
Exceptions
FDException

◆ setAvp()

FDAvp & FDAvp::setAvp ( struct avp *  a)

Sets the freeDiameter AVP object that this object is associated with.

Returns
reference to this AVP object.

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