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
alex037yang
OpenXG-RAN
Commits
89c5c03d
Commit
89c5c03d
authored
Nov 24, 2015
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add callback skeletons and init function
parent
a1c1c0c8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
137 additions
and
40 deletions
+137
-40
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-0
openair2/LAYER2/MAC/ff-mac-callback.h
openair2/LAYER2/MAC/ff-mac-callback.h
+9
-9
openair2/LAYER2/MAC/ff-mac-init.h
openair2/LAYER2/MAC/ff-mac-init.h
+10
-10
openair2/LAYER2/MAC/ff-mac.c
openair2/LAYER2/MAC/ff-mac.c
+79
-0
openair2/LAYER2/MAC/ff-mac.h
openair2/LAYER2/MAC/ff-mac.h
+17
-0
openair2/LAYER2/MAC/minifapi.c
openair2/LAYER2/MAC/minifapi.c
+21
-21
No files found.
cmake_targets/CMakeLists.txt
View file @
89c5c03d
...
@@ -922,6 +922,7 @@ set (MAC_SRC
...
@@ -922,6 +922,7 @@ set (MAC_SRC
${
MAC_DIR
}
/eNB_scheduler_RA.c
${
MAC_DIR
}
/eNB_scheduler_RA.c
${
MAC_DIR
}
/pre_processor.c
${
MAC_DIR
}
/pre_processor.c
${
MAC_DIR
}
/config.c
${
MAC_DIR
}
/config.c
${
MAC_DIR
}
/ff-mac.c
${
MAC_DIR
}
/minifapi.c
${
MAC_DIR
}
/minifapi.c
)
)
...
...
openair2/LAYER2/MAC/ff-mac-callback.h
View file @
89c5c03d
...
@@ -4,16 +4,16 @@
...
@@ -4,16 +4,16 @@
/* these are the callback function types from the scheduler to openair */
/* these are the callback function types from the scheduler to openair */
/* sched */
/* sched */
typedef
void
(
SchedDlConfigInd_callback
)(
void
*
callback_data
,
const
struct
SchedDlConfigIndParameters
*
params
);
typedef
void
(
SchedDlConfigInd_callback
_t
)(
void
*
callback_data
,
const
struct
SchedDlConfigIndParameters
*
params
);
typedef
void
(
SchedUlConfigInd_callback
)(
void
*
callback_data
,
const
struct
SchedUlConfigIndParameters
*
params
);
typedef
void
(
SchedUlConfigInd_callback
_t
)(
void
*
callback_data
,
const
struct
SchedUlConfigIndParameters
*
params
);
/* csched */
/* csched */
typedef
void
(
CschedCellConfigCnf_callback
)(
void
*
callback_data
,
const
struct
CschedCellConfigCnfParameters
*
params
);
typedef
void
(
CschedCellConfigCnf_callback
_t
)(
void
*
callback_data
,
const
struct
CschedCellConfigCnfParameters
*
params
);
typedef
void
(
CschedUeConfigCnf_callback
)(
void
*
callback_data
,
const
struct
CschedUeConfigCnfParameters
*
params
);
typedef
void
(
CschedUeConfigCnf_callback
_t
)(
void
*
callback_data
,
const
struct
CschedUeConfigCnfParameters
*
params
);
typedef
void
(
CschedLcConfigCnf_callback
)(
void
*
callback_data
,
const
struct
CschedLcConfigCnfParameters
*
params
);
typedef
void
(
CschedLcConfigCnf_callback
_t
)(
void
*
callback_data
,
const
struct
CschedLcConfigCnfParameters
*
params
);
typedef
void
(
CschedLcReleaseCnf_callback
)(
void
*
callback_data
,
const
struct
CschedLcReleaseCnfParameters
*
params
);
typedef
void
(
CschedLcReleaseCnf_callback
_t
)(
void
*
callback_data
,
const
struct
CschedLcReleaseCnfParameters
*
params
);
typedef
void
(
CschedUeReleaseCnf_callback
)(
void
*
callback_data
,
const
struct
CschedUeReleaseCnfParameters
*
params
);
typedef
void
(
CschedUeReleaseCnf_callback
_t
)(
void
*
callback_data
,
const
struct
CschedUeReleaseCnfParameters
*
params
);
typedef
void
(
CschedUeConfigUpdateInd_callback
)(
void
*
callback_data
,
const
struct
CschedUeConfigUpdateIndParameters
*
params
);
typedef
void
(
CschedUeConfigUpdateInd_callback
_t
)(
void
*
callback_data
,
const
struct
CschedUeConfigUpdateIndParameters
*
params
);
typedef
void
(
CschedCellConfigUpdateInd_callback
)(
void
*
callback_data
,
const
struct
CschedCellConfigUpdateIndParameters
*
params
);
typedef
void
(
CschedCellConfigUpdateInd_callback
_t
)(
void
*
callback_data
,
const
struct
CschedCellConfigUpdateIndParameters
*
params
);
#endif
/* FF_MAC_CALLBACK_H */
#endif
/* FF_MAC_CALLBACK_H */
openair2/LAYER2/MAC/ff-mac-init.h
View file @
89c5c03d
...
@@ -9,16 +9,16 @@ extern "C" {
...
@@ -9,16 +9,16 @@ extern "C" {
/* this function is called to create and initialize a scheduler */
/* this function is called to create and initialize a scheduler */
void
*
SchedInit
(
void
*
SchedInit
(
void
*
callback_data
,
void
*
callback_data
,
SchedDlConfigInd_callback
*
SchedDlConfigInd
,
SchedDlConfigInd_callback
_t
*
SchedDlConfigInd
,
SchedUlConfigInd_callback
*
SchedUlConfigInd
,
SchedUlConfigInd_callback
_t
*
SchedUlConfigInd
,
CschedCellConfigCnf_callback
*
CschedCellConfigCnf
,
CschedCellConfigCnf_callback
_t
*
CschedCellConfigCnf
,
CschedUeConfigCnf_callback
*
CschedUeConfigCnf
,
CschedUeConfigCnf_callback
_t
*
CschedUeConfigCnf
,
CschedLcConfigCnf_callback
*
CschedLcConfigCnf
,
CschedLcConfigCnf_callback
_t
*
CschedLcConfigCnf
,
CschedLcReleaseCnf_callback
*
CschedLcReleaseCnf
,
CschedLcReleaseCnf_callback
_t
*
CschedLcReleaseCnf
,
CschedUeReleaseCnf_callback
*
CschedUeReleaseCnf
,
CschedUeReleaseCnf_callback
_t
*
CschedUeReleaseCnf
,
CschedUeConfigUpdateInd_callback
*
CschedUeConfigUpdateInd
,
CschedUeConfigUpdateInd_callback
_t
*
CschedUeConfigUpdateInd
,
CschedCellConfigUpdateInd_callback
*
CschedCellConfigUpdateInd
);
CschedCellConfigUpdateInd_callback
_t
*
CschedCellConfigUpdateInd
);
#if defined (__cplusplus)
#if defined (__cplusplus)
}
}
...
...
openair2/LAYER2/MAC/ff-mac.c
0 → 100644
View file @
89c5c03d
#include "ff-mac.h"
#include "ff-mac-sched-sap.h"
#include "ff-mac-csched-sap.h"
#include "ff-mac-init.h"
#include "log.h"
#include <stdlib.h>
/* this structure stores required data for OAI to work with FAPI */
/* it is the private version of fapi_interface_t */
struct
fapi
{
fapi_interface_t
fi
;
/* the start of the structure matches fapi_interface_t */
};
/* here come the callbacks */
void
SchedDlConfigInd_callback
(
void
*
callback_data
,
const
struct
SchedDlConfigIndParameters
*
params
)
{
}
void
SchedUlConfigInd_callback
(
void
*
callback_data
,
const
struct
SchedUlConfigIndParameters
*
params
)
{
}
void
CschedCellConfigCnf_callback
(
void
*
callback_data
,
const
struct
CschedCellConfigCnfParameters
*
params
)
{
}
void
CschedUeConfigCnf_callback
(
void
*
callback_data
,
const
struct
CschedUeConfigCnfParameters
*
params
)
{
}
void
CschedLcConfigCnf_callback
(
void
*
callback_data
,
const
struct
CschedLcConfigCnfParameters
*
params
)
{
}
void
CschedLcReleaseCnf_callback
(
void
*
callback_data
,
const
struct
CschedLcReleaseCnfParameters
*
params
)
{
}
void
CschedUeReleaseCnf_callback
(
void
*
callback_data
,
const
struct
CschedUeReleaseCnfParameters
*
params
)
{
}
void
CschedUeConfigUpdateInd_callback
(
void
*
callback_data
,
const
struct
CschedUeConfigUpdateIndParameters
*
params
)
{
}
void
CschedCellConfigUpdateInd_callback
(
void
*
callback_data
,
const
struct
CschedCellConfigUpdateIndParameters
*
params
)
{
}
fapi_interface_t
*
init_fapi
(
void
)
{
struct
fapi
*
ret
;
LOG_I
(
MAC
,
"FAPI initialization
\n
"
);
ret
=
calloc
(
1
,
sizeof
(
struct
fapi
));
if
(
ret
==
NULL
)
LOG_E
(
MAC
,
"init_fapi: memory allocation error
\n
"
);
ret
->
fi
.
sched
=
SchedInit
(
ret
,
SchedDlConfigInd_callback
,
SchedUlConfigInd_callback
,
CschedCellConfigCnf_callback
,
CschedUeConfigCnf_callback
,
CschedLcConfigCnf_callback
,
CschedLcReleaseCnf_callback
,
CschedUeReleaseCnf_callback
,
CschedUeConfigUpdateInd_callback
,
CschedCellConfigUpdateInd_callback
);
if
(
ret
->
fi
.
sched
==
NULL
)
{
LOG_E
(
MAC
,
"init_fapi: SchedInit failed
\n
"
);
free
(
ret
);
return
NULL
;
}
return
(
fapi_interface_t
*
)
ret
;
}
openair2/LAYER2/MAC/ff-mac.h
0 → 100644
View file @
89c5c03d
#ifndef FF_MAC_H
#define FF_MAC_H
/* this file contains OAI related FAPI definitions */
/* this is the public view of the FAPI's OAI interface */
typedef
struct
{
void
*
sched
;
/* this is the pointer returned by SchedInit */
/* to be used when calling FAPI functions */
}
fapi_interface_t
;
/* this function initializes OAI's FAPI interfacing
* it returns the opaque pointer given by SchedInit
*/
fapi_interface_t
*
init_fapi
(
void
);
#endif
/* FF_MAC_H */
openair2/LAYER2/MAC/minifapi.c
View file @
89c5c03d
...
@@ -12,29 +12,29 @@
...
@@ -12,29 +12,29 @@
#include <stdio.h>
#include <stdio.h>
struct
scheduler
{
struct
scheduler
{
void
*
callback_data
;
void
*
callback_data
;
SchedDlConfigInd_callback
*
SchedDlConfigInd
;
SchedDlConfigInd_callback
_t
*
SchedDlConfigInd
;
SchedUlConfigInd_callback
*
SchedUlConfigInd
;
SchedUlConfigInd_callback
_t
*
SchedUlConfigInd
;
CschedCellConfigCnf_callback
*
CschedCellConfigCnf
;
CschedCellConfigCnf_callback
_t
*
CschedCellConfigCnf
;
CschedUeConfigCnf_callback
*
CschedUeConfigCnf
;
CschedUeConfigCnf_callback
_t
*
CschedUeConfigCnf
;
CschedLcConfigCnf_callback
*
CschedLcConfigCnf
;
CschedLcConfigCnf_callback
_t
*
CschedLcConfigCnf
;
CschedLcReleaseCnf_callback
*
CschedLcReleaseCnf
;
CschedLcReleaseCnf_callback
_t
*
CschedLcReleaseCnf
;
CschedUeReleaseCnf_callback
*
CschedUeReleaseCnf
;
CschedUeReleaseCnf_callback
_t
*
CschedUeReleaseCnf
;
CschedUeConfigUpdateInd_callback
*
CschedUeConfigUpdateInd
;
CschedUeConfigUpdateInd_callback
_t
*
CschedUeConfigUpdateInd
;
CschedCellConfigUpdateInd_callback
*
CschedCellConfigUpdateInd
;
CschedCellConfigUpdateInd_callback
_t
*
CschedCellConfigUpdateInd
;
};
};
void
*
SchedInit
(
void
*
SchedInit
(
void
*
callback_data
,
void
*
callback_data
,
SchedDlConfigInd_callback
*
SchedDlConfigInd
,
SchedDlConfigInd_callback
_t
*
SchedDlConfigInd
,
SchedUlConfigInd_callback
*
SchedUlConfigInd
,
SchedUlConfigInd_callback
_t
*
SchedUlConfigInd
,
CschedCellConfigCnf_callback
*
CschedCellConfigCnf
,
CschedCellConfigCnf_callback
_t
*
CschedCellConfigCnf
,
CschedUeConfigCnf_callback
*
CschedUeConfigCnf
,
CschedUeConfigCnf_callback
_t
*
CschedUeConfigCnf
,
CschedLcConfigCnf_callback
*
CschedLcConfigCnf
,
CschedLcConfigCnf_callback
_t
*
CschedLcConfigCnf
,
CschedLcReleaseCnf_callback
*
CschedLcReleaseCnf
,
CschedLcReleaseCnf_callback
_t
*
CschedLcReleaseCnf
,
CschedUeReleaseCnf_callback
*
CschedUeReleaseCnf
,
CschedUeReleaseCnf_callback
_t
*
CschedUeReleaseCnf
,
CschedUeConfigUpdateInd_callback
*
CschedUeConfigUpdateInd
,
CschedUeConfigUpdateInd_callback
_t
*
CschedUeConfigUpdateInd
,
CschedCellConfigUpdateInd_callback
*
CschedCellConfigUpdateInd
)
CschedCellConfigUpdateInd_callback
_t
*
CschedCellConfigUpdateInd
)
{
{
struct
scheduler
*
ret
;
struct
scheduler
*
ret
;
...
@@ -52,7 +52,7 @@ void *SchedInit(
...
@@ -52,7 +52,7 @@ void *SchedInit(
ret
->
CschedCellConfigCnf
=
CschedCellConfigCnf
;
ret
->
CschedCellConfigCnf
=
CschedCellConfigCnf
;
ret
->
CschedUeConfigCnf
=
CschedUeConfigCnf
;
ret
->
CschedUeConfigCnf
=
CschedUeConfigCnf
;
ret
->
CschedLcConfigCnf
=
CschedLcConfigCnf
;
ret
->
CschedLcConfigCnf
=
CschedLcConfigCnf
;
ret
->
CschedLcReleaseCnf
=
CschedLcReleaseCnf
;
ret
->
CschedLcReleaseCnf
=
CschedLcReleaseCnf
;
ret
->
CschedUeReleaseCnf
=
CschedUeReleaseCnf
;
ret
->
CschedUeReleaseCnf
=
CschedUeReleaseCnf
;
ret
->
CschedUeConfigUpdateInd
=
CschedUeConfigUpdateInd
;
ret
->
CschedUeConfigUpdateInd
=
CschedUeConfigUpdateInd
;
ret
->
CschedCellConfigUpdateInd
=
CschedCellConfigUpdateInd
;
ret
->
CschedCellConfigUpdateInd
=
CschedCellConfigUpdateInd
;
...
...
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