Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-AMF
Commits
afe50ebc
Commit
afe50ebc
authored
Jan 06, 2023
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup
parent
f5b19b56
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
116 additions
and
76 deletions
+116
-76
src/nas/common/Ie_Const.hpp
src/nas/common/Ie_Const.hpp
+2
-0
src/nas/ies/5GMMCapability.cpp
src/nas/ies/5GMMCapability.cpp
+9
-3
src/nas/ies/5GMMCapability.hpp
src/nas/ies/5GMMCapability.hpp
+1
-1
src/nas/ies/NSSAI.cpp
src/nas/ies/NSSAI.cpp
+7
-2
src/nas/ies/Type4NasIe.cpp
src/nas/ies/Type4NasIe.cpp
+26
-8
src/nas/ies/Type4NasIe.hpp
src/nas/ies/Type4NasIe.hpp
+2
-0
src/nas/ies/UENetworkCapability.cpp
src/nas/ies/UENetworkCapability.cpp
+8
-2
src/nas/ies/UESecurityCapability.cpp
src/nas/ies/UESecurityCapability.cpp
+7
-2
src/nas/ies/UplinkDataStatus.cpp
src/nas/ies/UplinkDataStatus.cpp
+29
-35
src/nas/ies/UplinkDataStatus.hpp
src/nas/ies/UplinkDataStatus.hpp
+12
-10
src/nas/msgs/RegistrationRequest.cpp
src/nas/msgs/RegistrationRequest.cpp
+3
-3
src/nas/msgs/RegistrationRequest.hpp
src/nas/msgs/RegistrationRequest.hpp
+7
-7
src/nas/msgs/ServiceRequest.cpp
src/nas/msgs/ServiceRequest.cpp
+3
-3
No files found.
src/nas/common/Ie_Const.hpp
View file @
afe50ebc
...
...
@@ -92,6 +92,8 @@ constexpr uint8_t kIei5gmmCapability = 0x10;
constexpr
uint8_t
kIeiUeSecurityCapability
=
0x2e
;
constexpr
uint8_t
kIeiUeNetworkCapability
=
0x17
;
constexpr
uint8_t
kIeiUplinkDataStatus
=
0x40
;
constexpr
uint8_t
kT3502Value
=
0x16
;
constexpr
uint8_t
kEquivalentPlmns
=
0x4A
;
...
...
src/nas/ies/5GMMCapability.cpp
View file @
afe50ebc
...
...
@@ -73,7 +73,10 @@ int _5GMMCapability::Encode(uint8_t* buf, int len) {
int
encoded_size
=
0
;
// IEI and Length
encoded_size
+=
Type4NasIe
::
Encode
(
buf
+
encoded_size
,
len
);
int
encoded_header_size
=
Type4NasIe
::
Encode
(
buf
+
encoded_size
,
len
);
if
(
encoded_header_size
==
KEncodeDecodeError
)
return
KEncodeDecodeError
;
encoded_size
+=
encoded_header_size
;
// Octet 3
ENCODE_U8
(
buf
+
encoded_size
,
octet3_
,
encoded_size
);
// TODO: Encode spare for the rest
...
...
@@ -89,7 +92,7 @@ int _5GMMCapability::Encode(uint8_t* buf, int len) {
}
//------------------------------------------------------------------------------
int
_5GMMCapability
::
Decode
(
uint8_t
*
buf
,
int
len
,
bool
is_
option
)
{
int
_5GMMCapability
::
Decode
(
uint8_t
*
buf
,
int
len
,
bool
is_
iei
)
{
if
(
len
<
k5gmmCapabilityMinimumLength
)
{
Logger
::
nas_mm
().
error
(
"Buffer length is less than the minimum length of this IE (%d octet)"
,
...
...
@@ -102,7 +105,10 @@ int _5GMMCapability::Decode(uint8_t* buf, int len, bool is_option) {
Logger
::
nas_mm
().
debug
(
"Decoding %s"
,
GetIeName
().
c_str
());
// IEI and Length
decoded_size
+=
Type4NasIe
::
Decode
(
buf
+
decoded_size
,
len
,
is_option
);
int
decoded_header_size
=
Type4NasIe
::
Decode
(
buf
+
decoded_size
,
len
,
is_iei
);
// decoded_size += Type4NasIe::Decode(buf + decoded_size, len, is_iei);
if
(
decoded_header_size
==
KEncodeDecodeError
)
return
KEncodeDecodeError
;
decoded_size
+=
decoded_header_size
;
DECODE_U8
(
buf
+
decoded_size
,
octet3_
,
decoded_size
);
// TODO: decode the rest as spare for now
...
...
src/nas/ies/5GMMCapability.hpp
View file @
afe50ebc
...
...
@@ -43,7 +43,7 @@ class _5GMMCapability : public Type4NasIe {
uint8_t
GetOctet3
()
const
;
int
Encode
(
uint8_t
*
buf
,
int
len
);
int
Decode
(
uint8_t
*
buf
,
int
len
,
bool
is_
option
=
true
);
int
Decode
(
uint8_t
*
buf
,
int
len
,
bool
is_
iei
=
true
);
private:
uint8_t
octet3_
;
// minimum length of 3 octets
...
...
src/nas/ies/NSSAI.cpp
View file @
afe50ebc
...
...
@@ -73,7 +73,9 @@ int NSSAI::Encode(uint8_t* buf, int len) {
int
encoded_size
=
0
;
// IEI and Length
encoded_size
+=
Type4NasIe
::
Encode
(
buf
+
encoded_size
,
len
);
int
encoded_header_size
=
Type4NasIe
::
Encode
(
buf
+
encoded_size
,
len
);
if
(
encoded_header_size
==
KEncodeDecodeError
)
return
KEncodeDecodeError
;
encoded_size
+=
encoded_header_size
;
for
(
int
i
=
0
;
i
<
S_NSSAIs
.
size
();
i
++
)
{
// TODO: Define encode for SNSSAI_s
...
...
@@ -122,7 +124,10 @@ int NSSAI::Decode(uint8_t* buf, int len, bool is_iei) {
SNSSAI_s
a
=
{
0
,
0
,
0
,
0
};
// IEI and Length
decoded_size
+=
Type4NasIe
::
Decode
(
buf
+
decoded_size
,
len
,
is_iei
);
int
decoded_header_size
=
Type4NasIe
::
Decode
(
buf
+
decoded_size
,
len
,
is_iei
);
// decoded_size += Type4NasIe::Decode(buf + decoded_size, len, is_iei);
if
(
decoded_header_size
==
KEncodeDecodeError
)
return
KEncodeDecodeError
;
decoded_size
+=
decoded_header_size
;
int
length_tmp
=
GetLengthIndicator
();
...
...
src/nas/ies/Type4NasIe.cpp
View file @
afe50ebc
...
...
@@ -59,24 +59,41 @@ void Type4NasIe::GetLengthIndicator(uint8_t& li) const {
uint8_t
Type4NasIe
::
GetLengthIndicator
()
const
{
return
li_
;
}
//------------------------------------------------------------------------------
uint8_t
Type4NasIe
::
GetIeLength
()
const
{
return
(
iei_
.
has_value
()
?
(
li_
+
2
)
:
(
li_
+
1
));
// 1 for IEI, 1 for Length
}
//------------------------------------------------------------------------------
uint8_t
Type4NasIe
::
GetHeaderLength
()
const
{
return
(
iei_
.
has_value
()
?
2
:
1
);
// 1 for IEI, 1 for Length
}
//------------------------------------------------------------------------------
bool
Type4NasIe
::
Validate
(
const
int
&
len
)
const
{
uint8_t
actual_lengh
=
iei_
.
has_value
()
?
(
li_
+
2
)
:
(
li_
+
1
);
// 1 for IEI and 1 for LI
if
(
len
<
actual_lengh
)
{
int
ie_len
=
GetIeLength
();
// Length of the content + IEI/Len
if
(
len
<
ie_len
)
{
Logger
::
nas_mm
().
error
(
"Buffer length is less than the
minimum length of this IE (%d octet
)"
,
actual_lengh
);
"Buffer length is less than the
length of this IE (%d octet(s)
)"
,
ie_len
);
return
false
;
}
return
true
;
}
//------------------------------------------------------------------------------
bool
Type4NasIe
::
ValidateHeader
(
const
int
&
len
)
const
{
int
header_len
=
GetHeaderLength
();
// Length of IEI/Len
if
(
len
<
header_len
)
{
Logger
::
nas_mm
().
error
(
"Buffer length is less than the length of the header (IEI/Length) of "
"this IE (%d octet(s))"
,
header_len
);
return
false
;
}
return
true
;
}
//------------------------------------------------------------------------------
int
Type4NasIe
::
Encode
(
uint8_t
*
buf
,
const
int
&
len
)
{
if
(
!
Validate
(
len
))
return
KEncodeDecodeError
;
...
...
@@ -93,7 +110,7 @@ int Type4NasIe::Encode(uint8_t* buf, const int& len) {
//------------------------------------------------------------------------------
int
Type4NasIe
::
Decode
(
const
uint8_t
*
const
buf
,
const
int
&
len
,
bool
is_iei
)
{
if
(
!
Validate
(
len
))
return
KEncodeDecodeError
;
if
(
!
Validate
Header
(
len
))
return
KEncodeDecodeError
;
int
decoded_size
=
0
;
uint8_t
octet
=
0
;
...
...
@@ -105,7 +122,8 @@ int Type4NasIe::Decode(const uint8_t* const buf, const int& len, bool is_iei) {
DECODE_U8
(
buf
+
decoded_size
,
li_
,
decoded_size
);
// Logger::nas_mm().debug(
// "Decoded %s (len %d)", GetIeName().c_str(), decoded_size);
// after obtaining information for IEI/Length, validate the buffer size
if
(
!
Validate
(
len
))
return
KEncodeDecodeError
;
return
decoded_size
;
}
src/nas/ies/Type4NasIe.hpp
View file @
afe50ebc
...
...
@@ -32,12 +32,14 @@ class Type4NasIe : public NasIe {
virtual
~
Type4NasIe
();
bool
Validate
(
const
int
&
len
)
const
override
;
bool
ValidateHeader
(
const
int
&
len
)
const
;
void
SetIei
(
const
uint8_t
&
iei
);
void
SetLengthIndicator
(
const
uint8_t
&
li
);
void
GetLengthIndicator
(
uint8_t
&
li
)
const
;
uint8_t
GetLengthIndicator
()
const
;
uint8_t
GetIeLength
()
const
;
uint8_t
GetHeaderLength
()
const
;
int
Encode
(
uint8_t
*
buf
,
const
int
&
len
)
override
;
int
Decode
(
...
...
src/nas/ies/UENetworkCapability.cpp
View file @
afe50ebc
...
...
@@ -93,7 +93,10 @@ int UENetworkCapability::Encode(uint8_t* buf, int len) {
int
encoded_size
=
0
;
// IEI and Length
encoded_size
+=
Type4NasIe
::
Encode
(
buf
+
encoded_size
,
len
);
int
encoded_header_size
=
Type4NasIe
::
Encode
(
buf
+
encoded_size
,
len
);
if
(
encoded_header_size
==
KEncodeDecodeError
)
return
KEncodeDecodeError
;
encoded_size
+=
encoded_header_size
;
// EEA
ENCODE_U8
(
buf
+
encoded_size
,
eea_
,
encoded_size
);
// EIA
...
...
@@ -124,7 +127,10 @@ int UENetworkCapability::Decode(uint8_t* buf, int len, bool is_iei) {
int
decoded_size
=
0
;
// IEI and Length
decoded_size
+=
Type4NasIe
::
Decode
(
buf
+
decoded_size
,
len
,
is_iei
);
int
decoded_header_size
=
Type4NasIe
::
Decode
(
buf
+
decoded_size
,
len
,
is_iei
);
// decoded_size += Type4NasIe::Decode(buf + decoded_size, len, is_iei);
if
(
decoded_header_size
==
KEncodeDecodeError
)
return
KEncodeDecodeError
;
decoded_size
+=
decoded_header_size
;
DECODE_U8
(
buf
+
decoded_size
,
eea_
,
decoded_size
);
DECODE_U8
(
buf
+
decoded_size
,
eia_
,
decoded_size
);
...
...
src/nas/ies/UESecurityCapability.cpp
View file @
afe50ebc
...
...
@@ -159,7 +159,9 @@ int UESecurityCapability::Encode(uint8_t* buf, int len) {
int
encoded_size
=
0
;
// IEI and Length
encoded_size
+=
Type4NasIe
::
Encode
(
buf
+
encoded_size
,
len
);
int
encoded_header_size
=
Type4NasIe
::
Encode
(
buf
+
encoded_size
,
len
);
if
(
encoded_header_size
==
KEncodeDecodeError
)
return
KEncodeDecodeError
;
encoded_size
+=
encoded_header_size
;
// EA
ENCODE_U8
(
buf
+
encoded_size
,
_5g_ea_
,
encoded_size
);
...
...
@@ -195,7 +197,10 @@ int UESecurityCapability::Decode(uint8_t* buf, int len, bool is_iei) {
uint8_t
octet
=
0
;
// IEI and Length
decoded_size
+=
Type4NasIe
::
Decode
(
buf
+
decoded_size
,
len
,
is_iei
);
int
decoded_header_size
=
Type4NasIe
::
Decode
(
buf
+
decoded_size
,
len
,
is_iei
);
// decoded_size += Type4NasIe::Decode(buf + decoded_size, len, is_iei);
if
(
decoded_header_size
==
KEncodeDecodeError
)
return
KEncodeDecodeError
;
decoded_size
+=
decoded_header_size
;
// EA
DECODE_U8
(
buf
+
decoded_size
,
_5g_ea_
,
decoded_size
);
// IA
...
...
src/nas/ies/UplinkDataStatus.cpp
View file @
afe50ebc
...
...
@@ -23,77 +23,71 @@
#include "3gpp_24.501.hpp"
#include "common_defs.h"
#include "Ie_Const.hpp"
#include "logger.hpp"
using
namespace
nas
;
//------------------------------------------------------------------------------
UplinkDataStatus
::
UplinkDataStatus
(
uint8_t
iei
)
{
_iei
=
iei
;
UplinkDataStatus
::
UplinkDataStatus
()
:
Type4NasIe
(
kIeiUplinkDataStatus
)
{
_value
=
0
;
length
=
0
;
SetLengthIndicator
(
2
);
SetIeName
(
kUplinkDataStatusIeName
);
}
//------------------------------------------------------------------------------
UplinkDataStatus
::
UplinkDataStatus
(
const
uint
8_t
&
iei
,
const
uint16_t
&
value
)
{
_iei
=
iei
;
UplinkDataStatus
::
UplinkDataStatus
(
const
uint
16_t
&
value
)
:
Type4NasIe
(
kIeiUplinkDataStatus
)
{
_value
=
value
;
length
=
2
;
}
//------------------------------------------------------------------------------
UplinkDataStatus
::
UplinkDataStatus
()
{
_iei
=
0
;
_value
=
0
;
length
=
0
;
SetLengthIndicator
(
2
);
SetIeName
(
kUplinkDataStatusIeName
);
}
//-----------------------------------------------------------------------------
UplinkDataStatus
::~
UplinkDataStatus
()
{}
//------------------------------------------------------------------------------
void
UplinkDataStatus
::
setValue
(
uint8_t
iei
,
uint16_t
value
)
{
_iei
=
iei
;
void
UplinkDataStatus
::
SetValue
(
uint16_t
value
)
{
_value
=
value
;
}
//------------------------------------------------------------------------------
uint16_t
UplinkDataStatus
::
getValue
()
{
uint16_t
UplinkDataStatus
::
GetValue
()
const
{
return
_value
;
}
//------------------------------------------------------------------------------
int
UplinkDataStatus
::
encode2Buffer
(
uint8_t
*
buf
,
int
len
)
{
Logger
::
nas_mm
().
debug
(
"Encoding UplinkDataStatus IEI (0x%x)"
,
_iei
);
if
(
len
<
kUplinkDataStatusMinimumLength
)
{
Logger
::
nas_mm
().
error
(
"Buffer length is less than the minimum length of this IE (%d octet)"
,
kUplinkDataStatusMinimumLength
);
return
KEncodeDecodeError
;
}
Logger
::
nas_mm
().
debug
(
"Encoding %s"
,
GetIeName
().
c_str
());
int
encoded_size
=
0
;
if
(
_iei
)
{
ENCODE_U8
(
buf
+
encoded_size
,
_iei
,
encoded_size
);
}
// IEI and Length
int
encoded_header_size
=
Type4NasIe
::
Encode
(
buf
+
encoded_size
,
len
);
if
(
encoded_header_size
==
KEncodeDecodeError
)
return
KEncodeDecodeError
;
encoded_size
+=
encoded_header_size
;
ENCODE_U8
(
buf
+
encoded_size
,
length
,
encoded_size
);
// Value
ENCODE_U16
(
buf
+
encoded_size
,
_value
,
encoded_size
);
Logger
::
nas_mm
().
debug
(
"Encoded UplinkDataStatus, size (%d)"
,
encoded_size
);
Logger
::
nas_mm
().
debug
(
"Encoded %s, len (%d)"
,
GetIeName
().
c_str
(),
encoded_size
);
return
encoded_size
;
}
//------------------------------------------------------------------------------
int
UplinkDataStatus
::
decodeFromBuffer
(
uint8_t
*
buf
,
int
len
,
bool
is_option
)
{
Logger
::
nas_mm
().
debug
(
"Decoding UplinkDataStatus"
);
int
UplinkDataStatus
::
decodeFromBuffer
(
uint8_t
*
buf
,
int
len
,
bool
is_iei
)
{
Logger
::
nas_mm
().
debug
(
"Decoding %s"
,
GetIeName
().
c_str
());
int
decoded_size
=
0
;
if
(
is_option
)
{
DECODE_U8
(
buf
+
decoded_size
,
_iei
,
decoded_size
);
}
DECODE_U8
(
buf
+
decoded_size
,
length
,
decoded_size
);
// IEI and Length
int
decoded_header_size
=
Type4NasIe
::
Decode
(
buf
+
decoded_size
,
len
,
is_iei
);
if
(
decoded_header_size
==
KEncodeDecodeError
)
return
KEncodeDecodeError
;
decoded_size
+=
decoded_header_size
;
DECODE_U16
(
buf
+
decoded_size
,
_value
,
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Decoded UplinkDataStatus value 0x%x, len %d"
,
_value
,
decoded_size
);
"Decoded %s, value 0x%x len %d"
,
GetIeName
().
c_str
(),
_value
,
decoded_size
);
return
decoded_size
;
}
src/nas/ies/UplinkDataStatus.hpp
View file @
afe50ebc
...
...
@@ -19,30 +19,32 @@
* contact@openairinterface.org
*/
#ifndef __UplinkDataStatus_H_
#define __UplinkDataStatus_H_
#ifndef _UPLINK_DATA_STATUS_H_
#define _UPLINK_DATA_STATUS_H_
#include "Type4NasIe.hpp"
#include <stdint.h>
constexpr
uint8_t
kUplinkDataStatusMinimumLength
=
4
;
constexpr
uint8_t
kUplinkDataStatusMaximumLength
=
34
;
constexpr
auto
kUplinkDataStatusIeName
=
"Uplink Data Status"
;
namespace
nas
{
class
UplinkDataStatus
{
class
UplinkDataStatus
:
public
Type4NasIe
{
public:
UplinkDataStatus
();
UplinkDataStatus
(
uint8_t
);
UplinkDataStatus
(
const
uint8_t
&
iei
,
const
uint16_t
&
value
);
UplinkDataStatus
(
const
uint16_t
&
value
);
~
UplinkDataStatus
();
void
setValue
(
uint8_t
iei
,
uint16_t
value
);
void
SetValue
(
uint16_t
value
);
uint16_t
GetValue
()
const
;
int
encode2Buffer
(
uint8_t
*
buf
,
int
len
);
int
decodeFromBuffer
(
uint8_t
*
buf
,
int
len
,
bool
is_option
);
uint16_t
getValue
();
int
decodeFromBuffer
(
uint8_t
*
buf
,
int
len
,
bool
is_iei
);
private:
uint8_t
_iei
;
uint8_t
length
;
uint16_t
_value
;
// TODO: spare
};
...
...
src/nas/msgs/RegistrationRequest.cpp
View file @
afe50ebc
...
...
@@ -291,13 +291,13 @@ bool RegistrationRequest::getS1UeNetworkCapability(uint8_t& eea, uint8_t& eia) {
//------------------------------------------------------------------------------
void
RegistrationRequest
::
setUplinkDataStatus
(
const
uint16_t
&
value
)
{
ie_uplink_data_status
=
std
::
make_optional
<
UplinkDataStatus
>
(
0x40
,
value
);
ie_uplink_data_status
=
std
::
make_optional
<
UplinkDataStatus
>
(
value
);
}
//------------------------------------------------------------------------------
bool
RegistrationRequest
::
getUplinkDataStatus
(
uint16_t
&
value
)
{
if
(
ie_uplink_data_status
.
has_value
())
{
value
=
ie_uplink_data_status
.
value
().
g
etValue
();
value
=
ie_uplink_data_status
.
value
().
G
etValue
();
return
true
;
}
else
{
return
false
;
...
...
@@ -954,7 +954,7 @@ int RegistrationRequest::decodeFromBuffer(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
case
0x40
:
{
case
kIeiUplinkDataStatus
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI(0x40)"
);
UplinkDataStatus
ie_uplink_data_status_tmp
=
{};
decoded_size
+=
ie_uplink_data_status_tmp
.
decodeFromBuffer
(
...
...
src/nas/msgs/RegistrationRequest.hpp
View file @
afe50ebc
...
...
@@ -155,14 +155,14 @@ class RegistrationRequest : public NasMmPlainHeader {
std
::
optional
<
UESecurityCapability
>
ie_ue_security_capability
;
// Optional
std
::
optional
<
NSSAI
>
ie_requested_NSSAI
;
// Optional
std
::
optional
<
_5GSTrackingAreaIdentity
>
ie_last_visited_registered_TAI
;
// Optional
ie_last_visited_registered_TAI
;
// Optional
std
::
optional
<
UENetworkCapability
>
ie_s1_ue_network_capability
;
// Optional
std
::
optional
<
UplinkDataStatus
>
ie_uplink_data_status
;
// Optional
std
::
optional
<
PDUSessionStatus
>
ie_PDU_session_status
;
// Optional
std
::
optional
<
MICOIndication
>
ie_MICO_indication
;
// Optional
std
::
optional
<
UEStatus
>
ie_ue_status
;
// Optional
std
::
optional
<
_5GSMobileIdentity
>
ie_additional_guti
;
// Optional
std
::
optional
<
UplinkDataStatus
>
ie_uplink_data_status
;
// Optional
std
::
optional
<
PDUSessionStatus
>
ie_PDU_session_status
;
// Optional
std
::
optional
<
MICOIndication
>
ie_MICO_indication
;
// Optional
std
::
optional
<
UEStatus
>
ie_ue_status
;
// Optional
std
::
optional
<
_5GSMobileIdentity
>
ie_additional_guti
;
// Optional
std
::
optional
<
AllowedPDUSessionStatus
>
ie_allowed_PDU_session_status
;
// Optional
std
::
optional
<
UEUsageSetting
>
ie_ues_usage_setting
;
// Optional
...
...
src/nas/msgs/ServiceRequest.cpp
View file @
afe50ebc
...
...
@@ -74,7 +74,7 @@ void ServiceRequest::set5G_S_TMSI(
//------------------------------------------------------------------------------
void
ServiceRequest
::
setUplink_data_status
(
uint16_t
value
)
{
ie_uplink_data_status
=
new
UplinkDataStatus
(
0x40
,
value
);
ie_uplink_data_status
=
new
UplinkDataStatus
(
value
);
}
//------------------------------------------------------------------------------
...
...
@@ -207,7 +207,7 @@ int ServiceRequest::decodeFromBuffer(
Logger
::
nas_mm
().
debug
(
"First optional IE (0x%x)"
,
octet
);
while
((
octet
!=
0x0
))
{
switch
(
octet
)
{
case
0x40
:
{
case
kIeiUplinkDataStatus
:
{
Logger
::
nas_mm
().
debug
(
"Decoding ie_uplink_data_status (IEI: 0x40)"
);
ie_uplink_data_status
=
new
UplinkDataStatus
();
decoded_size
+=
ie_uplink_data_status
->
decodeFromBuffer
(
...
...
@@ -261,7 +261,7 @@ bool ServiceRequest::getngKSI(uint8_t& ng_ksi) {
//------------------------------------------------------------------------------
uint16_t
ServiceRequest
::
getUplinkDataStatus
()
{
if
(
ie_uplink_data_status
)
{
return
ie_uplink_data_status
->
g
etValue
();
return
ie_uplink_data_status
->
G
etValue
();
}
else
{
return
-
1
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment