Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

PANA_TVDataParser Class Reference

#include <pana_message.h>

List of all members.

Public Member Functions

void parseRawToApp () throw (AAAErrorStatus)
void parseAppToRaw () throw (AAAErrorStatus)


Detailed Description

PANA device id and mac AVP parser

Definition at line 75 of file pana_message.h.


Member Function Documentation

void PANA_TVDataParser::parseAppToRaw  )  throw (AAAErrorStatus) [inline]
 

parses application format into raw buffer

Definition at line 92 of file pana_message.h.

References PANA_TVData_t::type, and PANA_TVData_t::value.

00092                                                  {
00093           AAAMessageBlock* aBuffer = (AAAMessageBlock*)getRawData();
00094           AAAAvpContainerEntry* e = (AAAAvpContainerEntry*)getAppData();
00095           PANA_TVData_t &tve = reinterpret_cast<AAATVDataAvpContainerEntry*>(e)->dataRef();
00096           AAAErrorStatus st;
00097           if (aBuffer->size() - (size_t)aBuffer->wr_ptr() < (tve.value.size() + sizeof(AAA_UINT8))) {
00098               st.set(NORMAL, DIAMETER_OUT_OF_SPACE);
00099               throw st;
00100           }
00101           *((AAA_UINT8*)aBuffer->wr_ptr()) = tve.type;
00102           aBuffer->wr_ptr(sizeof(AAA_UINT8));
00103           aBuffer->copy(tve.value.data(), tve.value.size());
00104       }

void PANA_TVDataParser::parseRawToApp  )  throw (AAAErrorStatus) [inline]
 

Parses raw buffer into application format

Definition at line 81 of file pana_message.h.

References PANA_TVData_t::type, and PANA_TVData_t::value.

00081                                                  {
00082           AAAMessageBlock* aBuffer = (AAAMessageBlock*)getRawData();
00083           AAAAvpContainerEntry* e = (AAAAvpContainerEntry*)getAppData();
00084           PANA_TVData_t &tve = reinterpret_cast<AAATVDataAvpContainerEntry*>(e)->dataRef();
00085           tve.type = *((AAA_UINT8*)aBuffer->base());
00086           tve.value.assign(aBuffer->base() + 1, aBuffer->size() - 1);
00087       }


The documentation for this class was generated from the following file:
Generated on Fri Jun 25 19:18:31 2004 for PANA by doxygen 1.3.5