#include <pana_message.h>
Public Member Functions | |
void | parseRawToApp () throw (AAAErrorStatus) |
void | parseAppToRaw () throw (AAAErrorStatus) |
Definition at line 75 of file pana_message.h.
|
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 } |
|
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 } |