Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OAI-RAN-5G-sheduler_MaxTBS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MAQ5G-PFC
OAI-RAN-5G-sheduler_MaxTBS
Commits
694a5bb1
Commit
694a5bb1
authored
9 years ago
by
Xenofon Foukas
Browse files
Options
Downloads
Patches
Plain Diff
Changed the function signature for handling the packing of protocol messages
parent
a8dabcef
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
openair2/ENB_APP/enb_agent.c
+4
-2
4 additions, 2 deletions
openair2/ENB_APP/enb_agent.c
openair2/ENB_APP/enb_agent_common.h
+8
-5
8 additions, 5 deletions
openair2/ENB_APP/enb_agent_common.h
openair2/ENB_APP/enb_agent_handler.c
+2
-1
2 additions, 1 deletion
openair2/ENB_APP/enb_agent_handler.c
with
14 additions
and
8 deletions
openair2/ENB_APP/enb_agent.c
+
4
−
2
View file @
694a5bb1
...
@@ -38,6 +38,8 @@
...
@@ -38,6 +38,8 @@
#include
"log.h"
#include
"log.h"
#include
"enb_agent.h"
#include
"enb_agent.h"
#include
"enb_agent_extern.h"
#include
"assertions.h"
#include
"assertions.h"
//#define TEST_TIMER
//#define TEST_TIMER
...
@@ -95,7 +97,7 @@ void *enb_agent_task(void *args){
...
@@ -95,7 +97,7 @@ void *enb_agent_task(void *args){
case
TIMER_HAS_EXPIRED
:
case
TIMER_HAS_EXPIRED
:
msg
=
enb_agent_process_timeout
(
msg_p
->
ittiMsg
.
timer_has_expired
.
timer_id
,
msg_p
->
ittiMsg
.
timer_has_expired
.
arg
);
msg
=
enb_agent_process_timeout
(
msg_p
->
ittiMsg
.
timer_has_expired
.
timer_id
,
msg_p
->
ittiMsg
.
timer_has_expired
.
arg
);
if
(
msg
!=
NULL
){
if
(
msg
!=
NULL
){
data
=
enb_agent_
send
_message
(
msg
,
&
size
);
data
=
enb_agent_
pack
_message
(
msg
,
&
size
);
if
(
message_put
(
d
->
tx_mq
,
data
,
size
,
priority
)){
if
(
message_put
(
d
->
tx_mq
,
data
,
size
,
priority
)){
err_code
=
PROTOCOL__PROGRAN_ERR__MSG_ENQUEUING
;
err_code
=
PROTOCOL__PROGRAN_ERR__MSG_ENQUEUING
;
goto
error
;
goto
error
;
...
@@ -182,7 +184,7 @@ void *receive_thread(void *args) {
...
@@ -182,7 +184,7 @@ void *receive_thread(void *args) {
// check if there is something to send back to the controller
// check if there is something to send back to the controller
if
(
msg
!=
NULL
){
if
(
msg
!=
NULL
){
data
=
enb_agent_
send
_message
(
msg
,
&
size
);
data
=
enb_agent_
pack
_message
(
msg
,
&
size
);
if
(
message_put
(
d
->
tx_mq
,
data
,
size
,
priority
)){
if
(
message_put
(
d
->
tx_mq
,
data
,
size
,
priority
)){
err_code
=
PROTOCOL__PROGRAN_ERR__MSG_ENQUEUING
;
err_code
=
PROTOCOL__PROGRAN_ERR__MSG_ENQUEUING
;
...
...
This diff is collapsed.
Click to expand it.
openair2/ENB_APP/enb_agent_common.h
+
8
−
5
View file @
694a5bb1
...
@@ -67,9 +67,17 @@ typedef int (*enb_agent_message_destruction_callback)(
...
@@ -67,9 +67,17 @@ typedef int (*enb_agent_message_destruction_callback)(
Protocol__ProgranMessage
*
msg
Protocol__ProgranMessage
*
msg
);
);
/**********************************
* progRAN protocol messages helper
* functions and generic handlers
**********************************/
int
enb_agent_serialize_message
(
Protocol__ProgranMessage
*
msg
,
void
**
buf
,
int
*
size
);
int
enb_agent_serialize_message
(
Protocol__ProgranMessage
*
msg
,
void
**
buf
,
int
*
size
);
int
enb_agent_deserialize_message
(
void
*
data
,
int
size
,
Protocol__ProgranMessage
**
msg
);
int
enb_agent_deserialize_message
(
void
*
data
,
int
size
,
Protocol__ProgranMessage
**
msg
);
void
*
enb_agent_pack_message
(
Protocol__ProgranMessage
*
msg
,
uint32_t
*
size
);
err_code_t
enb_agent_destroy_progran_message
(
Protocol__ProgranMessage
*
msg
);
err_code_t
enb_agent_destroy_progran_message
(
Protocol__ProgranMessage
*
msg
);
int
prp_create_header
(
xid_t
xid
,
Protocol__PrpType
type
,
Protocol__PrpHeader
**
header
);
int
prp_create_header
(
xid_t
xid
,
Protocol__PrpType
type
,
Protocol__PrpHeader
**
header
);
...
@@ -90,11 +98,6 @@ Protocol__ProgranMessage* enb_agent_handle_message (mid_t mod_id,
...
@@ -90,11 +98,6 @@ Protocol__ProgranMessage* enb_agent_handle_message (mid_t mod_id,
Protocol__ProgranMessage
*
enb_agent_handle_timed_task
(
void
*
args
);
Protocol__ProgranMessage
*
enb_agent_handle_timed_task
(
void
*
args
);
void
*
enb_agent_send_message
(
Protocol__ProgranMessage
*
msg
,
uint32_t
*
size
);
...
...
This diff is collapsed.
Click to expand it.
openair2/ENB_APP/enb_agent_handler.c
+
2
−
1
View file @
694a5bb1
...
@@ -56,6 +56,7 @@ enb_agent_message_destruction_callback message_destruction_callback[] = {
...
@@ -56,6 +56,7 @@ enb_agent_message_destruction_callback message_destruction_callback[] = {
enb_agent_destroy_echo_reply
,
enb_agent_destroy_echo_reply
,
enb_agent_mac_destroy_stats_request
,
enb_agent_mac_destroy_stats_request
,
enb_agent_mac_destroy_stats_reply
,
enb_agent_mac_destroy_stats_reply
,
enb_agent_mac_destroy_sr_info
,
};
};
static
const
char
*
enb_agent_direction2String
[]
=
{
static
const
char
*
enb_agent_direction2String
[]
=
{
...
@@ -108,7 +109,7 @@ error:
...
@@ -108,7 +109,7 @@ error:
void
*
enb_agent_
send
_message
(
Protocol__ProgranMessage
*
msg
,
void
*
enb_agent_
pack
_message
(
Protocol__ProgranMessage
*
msg
,
uint32_t
*
size
){
uint32_t
*
size
){
void
*
buffer
;
void
*
buffer
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment