Commit 2e76d726 authored by Tien Thinh NGUYEN's avatar Tien Thinh NGUYEN

Update Payload Container Type

parent 696d8f9b
......@@ -57,7 +57,7 @@
#include "PDU_Session_Reactivation_Result_Error_Cause.hpp"
#include "PLMN_List.hpp"
#include "Payload_Container.hpp"
#include "Payload_Container_Type.hpp"
#include "PayloadContainerType.hpp"
#include "Rejected_NSSAI.hpp"
#include "Release_Assistance_Indication.hpp"
#include "Request_Type.hpp"
......
......@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
#include "Payload_Container_Type.hpp"
#include "PayloadContainerType.hpp"
#include "3gpp_24.501.hpp"
#include "common_defs.h"
......@@ -40,64 +40,3 @@ PayloadContainerType::PayloadContainerType() : Type1NasIeFormatTv() {
//------------------------------------------------------------------------------
PayloadContainerType::~PayloadContainerType(){};
/*
//------------------------------------------------------------------------------
void PayloadContainerType::SetValue(const uint8_t value) {
_value = value & 0x0f;
}
//------------------------------------------------------------------------------
uint8_t PayloadContainerType::GetValue() const {
return _value;
}
//------------------------------------------------------------------------------
int PayloadContainerType::Encode(uint8_t* buf, int len) {
Logger::nas_mm().debug("Encoding Payload_Container_Type IE");
if (len < kPayloadContainerTypeLength) {
Logger::nas_mm().error(
"Buffer length is less than the minimum length of this IE (%d octet)",
kPayloadContainerTypeLength);
return KEncodeDecodeError;
}
int encoded_size = 0;
uint8_t octet = 0;
if (_iei) {
octet = (_iei << 4) | (_value & 0x0f);
} else {
octet = (_value & 0x0f);
}
ENCODE_U8(buf + encoded_size, octet, encoded_size);
Logger::nas_mm().debug("Encoded Payload_Container_Type IE");
return encoded_size;
}
//------------------------------------------------------------------------------
int PayloadContainerType::Decode(uint8_t* buf, int len, bool is_option) {
Logger::nas_mm().debug("decoding Payload_Container_Type IE");
if (len < kPayloadContainerTypeLength) {
Logger::nas_mm().error(
"Buffer length is less than the minimum length of this IE (%d octet)",
kPayloadContainerTypeLength);
return KEncodeDecodeError;
}
int decoded_size = 0;
uint8_t octet = 0;
DECODE_U8(buf + decoded_size, octet, decoded_size);
if (is_option) {
_iei = (octet & 0xf0) >> 4;
}
_value = octet & 0x0f;
Logger::nas_mm().debug(
"Decoded Payload_Container_Type (IEI 0x%x, value 0x%x)", _iei, _value);
return decoded_size;
}
*/
......@@ -37,12 +37,6 @@ class PayloadContainerType : public Type1NasIeFormatTv {
PayloadContainerType(const uint8_t iei, uint8_t value);
~PayloadContainerType();
/* void setValue(const uint8_t value);
uint8_t getValue();
int Encode(uint8_t* buf, int len);
int Decode(uint8_t* buf, int len, bool is_option);
*/
private:
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment