Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
spbro
OpenXG-RAN
Commits
46959c02
Commit
46959c02
authored
11 months ago
by
Rúben Soares da Silva
Committed by
Rúben Soares Silva
9 months ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix packing/unpacking procedures for START.response
Add utility functions related to START.response
parent
80b4fdff
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
4 deletions
+34
-4
nfapi/open-nFAPI/fapi/inc/nr_fapi_p5_utils.h
nfapi/open-nFAPI/fapi/inc/nr_fapi_p5_utils.h
+3
-0
nfapi/open-nFAPI/fapi/src/nr_fapi_p5_utils.c
nfapi/open-nFAPI/fapi/src/nr_fapi_p5_utils.c
+28
-0
nfapi/open-nFAPI/nfapi/src/nfapi_p5.c
nfapi/open-nFAPI/nfapi/src/nfapi_p5.c
+3
-4
No files found.
nfapi/open-nFAPI/fapi/inc/nr_fapi_p5_utils.h
View file @
46959c02
...
...
@@ -45,17 +45,20 @@ bool compare_param_response(const nfapi_nr_param_response_scf_t *unpacked_req, c
bool
compare_config_request
(
const
nfapi_nr_config_request_scf_t
*
unpacked_req
,
const
nfapi_nr_config_request_scf_t
*
req
);
bool
compare_config_response
(
const
nfapi_nr_config_response_scf_t
*
unpacked_req
,
const
nfapi_nr_config_response_scf_t
*
req
);
bool
compare_start_request
(
const
nfapi_nr_start_request_scf_t
*
unpacked_req
,
const
nfapi_nr_start_request_scf_t
*
req
);
bool
compare_start_response
(
const
nfapi_nr_start_response_scf_t
*
unpacked_req
,
const
nfapi_nr_start_response_scf_t
*
req
);
void
free_param_request
(
nfapi_nr_param_request_scf_t
*
msg
);
void
free_param_response
(
nfapi_nr_param_response_scf_t
*
msg
);
void
free_config_request
(
nfapi_nr_config_request_scf_t
*
msg
);
void
free_config_response
(
nfapi_nr_config_response_scf_t
*
msg
);
void
free_start_request
(
nfapi_nr_start_request_scf_t
*
msg
);
void
free_start_response
(
nfapi_nr_start_response_scf_t
*
msg
);
void
copy_param_request
(
const
nfapi_nr_param_request_scf_t
*
src
,
nfapi_nr_param_request_scf_t
*
dst
);
void
copy_param_response
(
const
nfapi_nr_param_response_scf_t
*
src
,
nfapi_nr_param_response_scf_t
*
dst
);
void
copy_config_request
(
const
nfapi_nr_config_request_scf_t
*
src
,
nfapi_nr_config_request_scf_t
*
dst
);
void
copy_config_response
(
const
nfapi_nr_config_response_scf_t
*
src
,
nfapi_nr_config_response_scf_t
*
dst
);
void
copy_start_request
(
const
nfapi_nr_start_request_scf_t
*
src
,
nfapi_nr_start_request_scf_t
*
dst
);
void
copy_start_response
(
const
nfapi_nr_start_response_scf_t
*
src
,
nfapi_nr_start_response_scf_t
*
dst
);
#endif // OPENAIRINTERFACE_NR_FAPI_P5_UTILS_H
This diff is collapsed.
Click to expand it.
nfapi/open-nFAPI/fapi/src/nr_fapi_p5_utils.c
View file @
46959c02
...
...
@@ -473,6 +473,14 @@ bool compare_start_request(const nfapi_nr_start_request_scf_t *unpacked_req, con
return
true
;
}
bool
compare_start_response
(
const
nfapi_nr_start_response_scf_t
*
unpacked_req
,
const
nfapi_nr_start_response_scf_t
*
req
)
{
CMP
(
unpacked_req
->
header
.
message_id
,
req
->
header
.
message_id
);
CMP
(
unpacked_req
->
header
.
message_length
,
req
->
header
.
message_length
);
CMP
(
unpacked_req
->
error_code
,
req
->
error_code
);
return
true
;
}
void
free_param_request
(
nfapi_nr_param_request_scf_t
*
msg
)
{
if
(
msg
->
vendor_extension
)
{
...
...
@@ -549,6 +557,13 @@ void free_start_request(nfapi_nr_start_request_scf_t *msg)
}
}
void
free_start_response
(
nfapi_nr_start_response_scf_t
*
msg
)
{
if
(
msg
->
vendor_extension
)
{
free
(
msg
->
vendor_extension
);
}
}
void
copy_tl
(
const
nfapi_tl_t
*
src
,
nfapi_tl_t
*
dst
)
{
dst
->
tag
=
src
->
tag
;
...
...
@@ -1077,3 +1092,16 @@ void copy_start_request(const nfapi_nr_start_request_scf_t *src, nfapi_nr_start_
copy_vendor_extension_value
(
&
dst
->
vendor_extension
,
&
src
->
vendor_extension
);
}
}
void
copy_start_response
(
const
nfapi_nr_start_response_scf_t
*
src
,
nfapi_nr_start_response_scf_t
*
dst
)
{
dst
->
header
.
message_id
=
src
->
header
.
message_id
;
dst
->
header
.
message_length
=
src
->
header
.
message_length
;
if
(
src
->
vendor_extension
)
{
dst
->
vendor_extension
=
calloc
(
1
,
sizeof
(
nfapi_vendor_extension_tlv_t
));
dst
->
vendor_extension
->
tag
=
src
->
vendor_extension
->
tag
;
dst
->
vendor_extension
->
length
=
src
->
vendor_extension
->
length
;
copy_vendor_extension_value
(
&
dst
->
vendor_extension
,
&
src
->
vendor_extension
);
}
dst
->
error_code
=
src
->
error_code
;
}
This diff is collapsed.
Click to expand it.
nfapi/open-nFAPI/nfapi/src/nfapi_p5.c
View file @
46959c02
...
...
@@ -1158,10 +1158,9 @@ static uint8_t pack_start_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t
uint8_t
pack_nr_start_response
(
void
*
msg
,
uint8_t
**
ppWritePackedMsg
,
uint8_t
*
end
,
nfapi_p4_p5_codec_config_t
*
config
)
{
nfapi_nr_start_response_scf_t
*
pNfapiMsg
=
(
nfapi_nr_start_response_scf_t
*
)
msg
;
return
(
push
32
(
pNfapiMsg
->
error_code
,
ppWritePackedMsg
,
end
)
&&
pack_vendor_extension_tlv
(
pNfapiMsg
->
vendor_extension
,
ppWritePackedMsg
,
end
,
config
)
);
return
(
push
8
(
pNfapiMsg
->
error_code
,
ppWritePackedMsg
,
end
)
&&
pack_vendor_extension_tlv
(
pNfapiMsg
->
vendor_extension
,
ppWritePackedMsg
,
end
,
config
)
);
}
static
uint8_t
pack_start_response
(
void
*
msg
,
uint8_t
**
ppWritePackedMsg
,
uint8_t
*
end
,
nfapi_p4_p5_codec_config_t
*
config
)
{
nfapi_start_response_t
*
pNfapiMsg
=
(
nfapi_start_response_t
*
)
msg
;
return
(
push32
(
pNfapiMsg
->
error_code
,
ppWritePackedMsg
,
end
)
&&
...
...
@@ -2106,7 +2105,7 @@ static uint8_t unpack_start_request(uint8_t **ppReadPackedMsg, uint8_t *end, voi
uint8_t
unpack_nr_start_response
(
uint8_t
**
ppReadPackedMsg
,
uint8_t
*
end
,
void
*
msg
,
nfapi_p4_p5_codec_config_t
*
config
)
{
nfapi_nr_start_response_scf_t
*
pNfapiMsg
=
(
nfapi_nr_start_response_scf_t
*
)
msg
;
return
(
pull
32
(
ppReadPackedMsg
,
&
pNfapiMsg
->
error_code
,
end
)
return
(
pull
8
(
ppReadPackedMsg
,
(
uint8_t
*
)
&
pNfapiMsg
->
error_code
,
end
)
&&
unpack_nr_tlv_list
(
NULL
,
0
,
ppReadPackedMsg
,
end
,
config
,
&
(
pNfapiMsg
->
vendor_extension
)));
}
static
uint8_t
unpack_start_response
(
uint8_t
**
ppReadPackedMsg
,
uint8_t
*
end
,
void
*
msg
,
nfapi_p4_p5_codec_config_t
*
config
)
{
...
...
This diff is collapsed.
Click to expand it.
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