#ifndef  DIAMETERCODETS_H
#define  DIAMETERCODETS_H

#include <t3devlib/t3devlib.h>
#include <t3devlib/generator.h>
#include <vector>

namespace t3devlib {
namespace gen {

//type integer  UInt8 (0 .. c_uInt8Max) with {variant "unsigned 8 bit"};
//T3DEVLIB_INTEGER_DEFINITION (LibCommon_BasicTypesAndValues, UInt8, Unsigned, 8);
//T3DEVLIB_INTEGER_DEFINITION(LibCommon_BasicTypesAndValues, Int64, Signed, 64);
//T3DEVLIB_INTEGER_DEFINITION(LibCommon_BasicTypesAndValues, UInt64, Unsigned, 64);

//type UInt32 AVP_Code (1..c_uInt32Max);
T3DEVLIB_INTEGER_DEFINITION(LibDiameter_TypesAndValues, AVP_Code, Unsigned, 32);

//type UInt24 AVP_Length;
T3DEVLIB_INTEGER_DEFINITION(LibDiameter_TypesAndValues, AVP_Length, Unsigned, 24);

//type integer AVP_Vendor_ID;
T3DEVLIB_INTEGER_DEFINITION(LibDiameter_TypesAndValues, AVP_Vendor_ID, Unsigned, 32);//in spec, 4 bytes

//TODO: although defined as Uint64 only encoded as 4 bytes
//type UInt64 Time;
//T3DEVLIB_INTEGER_DEFINITION(LibDiameter_TypesAndValues, Time, Unsigned, 64);
T3DEVLIB_INTEGER_DEFINITION(LibDiameter_TypesAndValues, Time, Unsigned, 32);

//type UInt8 Digest_Ty_Type;
T3DEVLIB_INTEGER_DEFINITION(LibDiameter_TypesAndValues, Digest_Ty_Type, Unsigned, 8);


//type charstring Diameter_Identity; 
T3DEVLIB_BASIC_DEFINITION (LibDiameter_TypesAndValues, Diameter_Identity, Charstring);

//TODO: how are universal charstrings handled?
//type universal charstring UTF8String;
T3DEVLIB_BASIC_DEFINITION (LibDiameter_TypesAndValues, UTF8String, Charstring);

//typedef float FLOAT32; cannot be cast to Variable*
	class FLOAT32 : public ::t3devlib::PrimitiveType
	{
	public:
	/** Standard constructor */
		FLOAT32 ();
		virtual ~FLOAT32();
		
		int GetLength() const;
		::t3devlib::Variable::BaseType GetBaseType() const;

		/** Get the current value of the integer */
		float GetValue() const;

		/** %Set a new value */
		void SetValue(float v);

		/** %Set a new value */
		void SetValue(const FLOAT32& v);

		const unsigned char* GetValueBin() const;

		void Decode (Buffer& buffer) throw (DecodeError);
		void Encode (Buffer& buffer) throw (EncodeError);

		void Dump (std::ostream& out, int indent=0) const;

		void DumpInline (std::ostream& out) const;


	protected:
		void SetValueBinNoOffset (const unsigned char* buff, int bit_length=-1);
		/** \internal buffer for returning binary values */
		mutable std::string msBinBuff;
		
	private:
		/** \internal Internal value of the integer */
		float mValue;
	};


	class FLOAT64 : public ::t3devlib::PrimitiveType
	{
	public:
	/** Standard constructor */
		FLOAT64 ();
		virtual ~FLOAT64();
		
		int GetLength() const;
		
		::t3devlib::Variable::BaseType GetBaseType() const;

		/** Get the current value of the integer */
		double GetValue() const;

		/** %Set a new value */
		void SetValue(double v);

		/** %Set a new value */
		void SetValue(const FLOAT64& v);

		const unsigned char* GetValueBin() const;

		void Decode (Buffer& buffer) throw (DecodeError);
		void Encode (Buffer& buffer) throw (EncodeError);

		void Dump (std::ostream& out, int indent=0) const;

		void DumpInline (std::ostream& out) const;


	protected:
		void SetValueBinNoOffset (const unsigned char* buff, int bit_length=-1);
		
		/** \internal buffer for returning binary values */
		mutable std::string msBinBuff;
	
	private:
		/** \internal Internal value of the integer */
		double mValue;
	};

#define SIP_AOR_Type DiameterURI

//type record length (4) of UInt8  IPv4Addr;
//RECORDOF_COMMON_DEFINITIONS(LibDiameter_TypesAndValues, IPv4Addr);


	class Command_Code : public ::t3devlib::Enum
	{
	private:
		static const char* msKeywordEnumsAll[];
		static const char* msKeywordEnumsRequest[];
		static const char* msKeywordEnumsAnswer[];
		static const int msCommandCodeValues[];
		bool m_bIsRequest;
	public:	\
		
		Command_Code () : Enum (msKeywordEnumsAll)	{}
		
		const char* GetModuleName() const { return "LibDiameter_TypesAndValues"; }
		const char* GetTypeName() const   { return "Command_Code"; }
		
		void Encode (Buffer& buffer) throw (EncodeError);
		void Decode (Buffer& buffer) throw (DecodeError);
		void SetRequest(){m_bIsRequest = true;}
	};

//cannot contain -1 as enum id !!!!
#define AVP_ENUM_U32_DEFINITION(module, type)	\
	class type : public ::t3devlib::Enum	\
	{	\
		private:	\
			static const char* msKeywordEnums[];	\
			static const unsigned int msKeywordIds[];	\
	public:	\
		type () : Enum (msKeywordEnums)	{}	\
		\
		const char* GetModuleName() const { return #module; } \
		const char* GetTypeName() const   { return #type; } \
		\
		void Encode (Buffer& buffer) throw (EncodeError)	\
		{	\
			Unsigned value(32);	\
			const char * pStr = GetValueString();	\
			for(int i=0; strlen(msKeywordEnums[i]); i++)	\
			{	\
				if(!strcmp(msKeywordEnums[i], pStr))\
				{	\
					value.SetValue (msKeywordIds[i]);	\
					value.Encode(buffer);	\
					break;	\
				}	\
			}	\
		}	\
		void Decode (Buffer& buffer) throw (DecodeError)	\
		{	\
			Unsigned value(32);	\
			value.Decode(buffer);	\
			unsigned int nValue = value.GetValue();	\
			for(int i=0; strlen(msKeywordEnums[i]); i++)	\
			{	\
				if(msKeywordIds[i] == nValue)	\
				{	\
					SetValueString (msKeywordEnums[i]);	\
					break;	\
				}	\
			}	\
		}	\
	};

#define AVP_ENUM_S32_DEFINITION(module, type)	\
	class type : public ::t3devlib::Enum	\
	{	\
		private:	\
			static const char* msKeywordEnums[];	\
			static const int msKeywordIds[];	\
	public:	\
		type () : Enum (msKeywordEnums)	{}	\
		\
		const char* GetModuleName() const { return #module; } \
		const char* GetTypeName() const   { return #type; } \
		\
		void Encode (Buffer& buffer) throw (EncodeError)	\
		{	\
			Signed value(32);	\
			const char * pStr = GetValueString();	\
			for(int i=0; strlen(msKeywordEnums[i]); i++)	\
			{	\
				if(!strcmp(msKeywordEnums[i], pStr))\
				{	\
					value.SetValue (msKeywordIds[i]);	\
					value.Encode(buffer);	\
					break;	\
				}	\
			}	\
		}	\
		void Decode (Buffer& buffer) throw (DecodeError)	\
		{	\
			Signed value(32);	\
			value.Decode(buffer);	\
			int nValue = value.GetValue();	\
			for(int i=0; strlen(msKeywordEnums[i]); i++)	\
			{	\
				if(msKeywordIds[i] == nValue)	\
				{	\
					SetValueString (msKeywordEnums[i]);	\
					break;	\
				}	\
			}	\
		}	\
	};

#define AVP_ENUM_DEFINITION(module, type)	\
	class type : public ::t3devlib::Enum	\
	{	\
		private:	\
			static const char* msKeywordEnums[];	\
			static const char* msKeywordStrings[];	\
	public:	\
		type () : Enum (msKeywordEnums)	{}	\
		\
		const char* GetModuleName() const { return #module; } \
		const char* GetTypeName() const   { return #type; } \
		\
		void Encode (Buffer& buffer) throw (EncodeError);\
		void Decode (Buffer& buffer) throw (DecodeError);\
	};


AVP_ENUM_U32_DEFINITION(LibDiameter_TypesAndValues, Result_Code_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Re_Auth_Req_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Redirect_Host_Usage_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Acc_Record_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Acc_Realtime_Req_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Termination_Cause_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Disconnect_Cause_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Auth_Session_State_Type)

AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, SIP_User_Auth_Ty_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, SIP_Srv_Assgmt_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, SIP_Usr_Dat_Al_Av_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, SIP_Auth_Schm_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, SIP_Reason_Code_Type)

AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Data_Reference_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Subs_Req_Ty_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Request_Domain_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Current_Location_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Identity_Set_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Send_Data_Indication_Type)

AVP_ENUM_U32_DEFINITION(LibDiameter_TypesAndValues, Experimental_Result_Type)

AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, CC_Request_Ty_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Subscription_Id_Ty_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Requested_Action_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Tariff_Change_Usage_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Multiple_Serv_Indi_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, CC_Unit_Ty_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Final_Unit_Action_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Redirect_Address_Ty_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, User_Equipment_Info_Ty_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, CC_Session_Failover_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Check_Balance_Result_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Credit_Cont_Fail_Hand_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Direct_Debi_Fail_Hand_Type)


AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Abort_Cause_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Flow_Status_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Flow_Usage_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Specific_Action_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Media_Type_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Service_Info_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, SIP_Forking_Indication_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, AF_Signalling_Protocol_Type)

AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Reservation_Priority_Type)

AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, IP_CAN_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, RAT_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Bearer_Control_Mode)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Bearer_Operation)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Bearer_Usage)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Charging_Correlation_Indicator)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, CSG_Information_Reporting)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Event_Trigger)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Flow_Direction)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Metering_Method)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Network_Request_Support)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Offline)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Online)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Packet_Filter_Operation)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Packet_Filter_Usage)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Pre_emption_Capability)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Pre_emption_Vulnerability)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Reporting_Level)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, PCC_Rule_Status)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Session_Release_Cause)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, QoS_Class_Identifier)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, QoS_Negotiation)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, QoS_Upgrade)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Resource_Allocation_Notification)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Rule_Failure_Code)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Usage_Monitoring_Level)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Usage_Monitoring_Report)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Usage_Monitoring_Support)

AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, CSG_Access_Mode)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, CSG_Membership_Indication)

AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Trace_Depth)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Job_Type)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Report_Interval)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Report_Amount)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Logging_Interval)
AVP_ENUM_S32_DEFINITION(LibDiameter_TypesAndValues, Logging_Duration)

//TODO: I have no idea where this is used....???
AVP_ENUM_U32_DEFINITION(LibDiameter_TypesAndValues, ASP_type)

	


//DIAMETER message types
#define DEFINITIONS_UNKNOWN_MSG() \
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_CER_MSG() \
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_CER_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_CEA_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_RAR_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_RAA_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_ACR_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_ACA_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_ASR_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_ASA_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_STR_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_STA_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_DWR_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_DWA_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_DPR_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_DPA_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_UAR_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_UAA_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_SAR_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_SAA_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_LIR_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_LIA_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_MAR_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_MAA_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_RTR_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_RTA_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_PPR_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_PPA_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_UDR_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_UDA_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_PUR_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_PUA_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_SNR_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_SNA_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_PNR_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_PNA_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_CCR_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_CCA_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_AAR_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_AAA_MSG()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;


//class variable definitions
#define DEFINITIONS_AVP_Data() \
	public: \
		int m_nDataLength; \
		int m_nExpectedData;


#define DEFINITIONS_set_of_AVP_Type() \
	public: \
		int m_nRemainingDataLength; \
		int m_nStartingPosition; \
		void SetRemaining(std::vector<unsigned int> lAVP_Codes, std::vector<unsigned int>  lAVP_Offsets, std::vector<unsigned int>  lIgnored); \
	private: \
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;


/*all set of types*/
#define DEFINITIONS_set_of_Auth_Application_Id_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Auth_Application_Id_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Supported_Vendor_Id_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Origin_State_Id_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Host_IP_Address_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Inband_Security_Id_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Acct_Application_Id_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Vendor_Specific_Appl_Id_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Vendor_Id_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Failed_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Flow_Number_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Flows_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Access_Network_Charging_Identifier_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Subscription_Id_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Class_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Event_Trigger_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Cell_Global_Identity_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_E_UTRAN_Cell_Global_Identity_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Routing_Area_Identity_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Location_Area_Identity_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Tracking_Area_Identity_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Charging_Rule_Name_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Charging_Rule_Base_Name_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Charging_Rule_Remove_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Flow_Information_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Charging_Rule_Definition_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Charging_Rule_Install_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_QoS_Information_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Usage_Monitoring_Information_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Proxy_Info_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Route_Record_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Codec_Data_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Media_Component_Description_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Redirect_Host_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_CSG_Information_Reporting_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Multiple_Services_Credit_Control_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Service_Parameter_Info_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Packet_Filter_Information_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_TFT_Packet_Filter_Information_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Access_Network_Charging_Identifier_Gx_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_CoA_Information_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Service_Indication_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Data_Reference_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Identity_Set_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_DSAI_Tag_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_SIP_Auth_Data_Item_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_SIP_User_Data_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_SIP_Supported_User_Data_Type_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_SIP_AOR_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Supported_Features_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Charging_Rule_Report_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Routing_Rule_Identifier_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Routing_Rule_Definition_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Routing_Filter_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Specific_Action_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Media_Sub_Component_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Used_Service_Unit_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Service_Identifier_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_G_S_U_Pool_Reference_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Restriction_Filter_Rule_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Filter_Id_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_Digest_Auth_Param_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_SIP_Accounting_Server_URI_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;
				
#define DEFINITIONS_set_of_SIP_Credit_Control_Server_URI_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_SIP_MandatoryCapability_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_SIP_OptionalCapability_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_set_of_SIP_Server_URI_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_record_of_AN_GW_Address_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_record_of_Flow_Description_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;


#define DEFINITIONS_record_of_Tunnel_Header_Filter_AVP() \
	public :	\
		void SetOffsets(std::vector<unsigned int> &lAVP_Codes, std::vector<unsigned int> &lOffsets);	\
	private:	\
		std::vector<unsigned int> m_lAVP_Offsets;

//GROUPED
#define DEFINITIONS_Vendor_Specific_Appl_Id_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Failed_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Flows_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Access_Network_Charging_Identifier_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Subscription_Id_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Unit_Value_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Sponsored_Connectivity_Data_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_User_CSG_Information_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Allocation_Retention_Priority_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_QoS_Information_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Area_Scope_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_MDT_Configuration_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Trace_Data_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Event_Report_Indication_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Charging_Rule_Remove_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Flow_Information_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Charging_Rule_Definition_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Charging_Rule_Install_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Default_EPS_Bearer_QoS_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Usage_Monitoring_Information_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Experimental_Result_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Media_Component_Description_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Routing_Rule_Install_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Routing_Rule_Remove_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Maximum_Bandwidth_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Charging_Information_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Routing_Rule_Definition_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Routing_Filter_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_SIP_Server_Capabilities_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Supported_Features_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Redirect_Server_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Acceptable_Service_Info_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Media_Sub_Component_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Access_Network_Charging_Identifier_Gx_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Charging_Rule_Report_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_CoA_Information_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Packet_Filter_Information_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_TFT_Packet_Filter_Information_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Tunnel_Information_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;


//GROUPED as set type
#define DEFINITIONS_G_S_U_Pool_Reference_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_CC_Money_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Requested_Service_Unit_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Granted_Service_Unit_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Used_Service_Unit_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Proxy_Info_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_SIP_User_Data_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_SIP_Auth_Data_Item_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_SIP_Deregistration_Reason_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_User_Identity_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Service_Parameter_Info_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_User_Equipment_Info_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Cost_Information_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Multiple_Services_Credit_Control_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_Final_Unit_Indication_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_SIP_Accounting_Information_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_SIP_Authenticate_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_SIP_Authorization_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;

#define DEFINITIONS_SIP_Authentication_Info_AVP()	\
	private: \
		int m_nStartingPosition;	\
		std::vector<unsigned int> m_lAVP_Codes;	\
		std::vector<unsigned int> m_lAVP_Offsets;


}} //namespaces

#endif

