Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
openairinterface5G
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
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
Weiqi Wang
openairinterface5G
Commits
d34ac165
Commit
d34ac165
authored
Dec 13, 2017
by
Panos Matzakos
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.eurecom.fr:matzakos/LTE-D2D
Merge with Thin's last commit
parents
7b6a9c44
63ac8b4c
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
331 additions
and
0 deletions
+331
-0
openair2/RRC/LITE/defs.h
openair2/RRC/LITE/defs.h
+85
-0
openair2/RRC/LITE/proto.h
openair2/RRC/LITE/proto.h
+6
-0
openair2/RRC/LITE/rrc_UE.c
openair2/RRC/LITE/rrc_UE.c
+231
-0
targets/RT/USER/lte-softmodem-stub.c
targets/RT/USER/lte-softmodem-stub.c
+9
-0
No files found.
openair2/RRC/LITE/defs.h
View file @
d34ac165
...
...
@@ -47,6 +47,91 @@
#include "LAYER2/MAC/defs.h"
//TTN-for D2D
#define CONTROL_SOCKET_PORT_NO 8888
#define DEBUG_CTRL_SOCKET
#define BUFSIZE 1024
#define CONTROL_SOCKET_PORT_NO 8888
//netlink
//#define DEBUG_PDCP
#define UE_IP_PDCP_NETLINK_ID 31
#define PDCP_PID 1
#define NETLINK_HEADER_SIZE 16
#define SL_DEFAULT_RAB_ID 1
#define SLRB_ID 11
#define MAX_PAYLOAD 1024
/* maximum payload size*/
#define UE_STATE_NOTIFICATION_INTERVAL 50
#define IPV4_ADDR "%u.%u.%u.%u"
#define IPV4_ADDR_FORMAT(aDDRESS) \
(uint8_t)((aDDRESS) & 0x000000ff), \
(uint8_t)(((aDDRESS) & 0x0000ff00) >> 8 ), \
(uint8_t)(((aDDRESS) & 0x00ff0000) >> 16), \
(uint8_t)(((aDDRESS) & 0xff000000) >> 24)
//-----------------------------------------------------
// header for Control socket
//Primitives
#define SESSION_INIT_REQ 1
#define UE_STATUS_INFO 2
#define GROUP_COMMUNICATION_ESTABLISH_REQ 3
#define GROUP_COMMUNICATION_ESTABLISH_RSP 4
#define DIRECT_COMMUNICATION_ESTABLISH_REQ 5
#define DIRECT_COMMUNICATION_ESTABLISH_RSP 6
#define GROUP_COMMUNICATION_RELEASE_REQ 7
#define GROUP_COMMUNICATION_RELEASE_RSP 8
typedef
enum
{
UE_STATE_OFF_NETWORK
,
UE_STATE_ON_NETWORK
}
SL_UE_STATE_t
;
typedef
enum
{
GROUP_COMMUNICATION_RELEASE_OK
=
0
,
GROUP_COMMUNICATION_RELEASE_FAILURE
}
Group_Communication_Status_t
;
struct
GroupCommunicationEstablishReq
{
uint8_t
type
;
//0 - rx, 1 - tx
uint32_t
sourceL2Id
;
uint32_t
groupL2Id
;
uint32_t
groupIpAddress
;
uint8_t
pppp
;
};
struct
DirectCommunicationEstablishReq
{
uint32_t
sourceL2Id
;
uint32_t
destinationL2Id
;
};
struct
sidelink_ctrl_element
{
unsigned
short
type
;
union
{
struct
GroupCommunicationEstablishReq
group_comm_establish_req
;
struct
DirectCommunicationEstablishReq
direct_comm_estblish_req
;
Group_Communication_Status_t
group_comm_release_rsp
;
//struct DirectCommunicationReleaseReq direct_comm_release_req;
SL_UE_STATE_t
ue_state
;
int
slrb_id
;
}
sidelinkPrimitive
;
};
//global variables
extern
struct
sockaddr_in
clientaddr
;
extern
int
slrb_id
;
extern
pthread_mutex_t
slrb_mutex
;
//the thread function
void
*
send_UE_status_notification
(
void
*
);
//end TTN
//#include "COMMON/openair_defs.h"
#ifndef USER_MODE
#include <rtai.h>
...
...
openair2/RRC/LITE/proto.h
View file @
d34ac165
...
...
@@ -180,6 +180,12 @@ void rrc_ue_process_sidelink_radioResourceConfig(
SL_CommConfig_r12_t
*
sl_CommConfig
,
SL_DiscConfig_r12_t
*
sl_DiscConfig
);
/** \brief Init control socket to listen to incoming packets from ProSe App
*
*/
void
rrc_control_socket_init
();
// eNB/CH RRC Procedures
...
...
openair2/RRC/LITE/rrc_UE.c
View file @
d34ac165
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-softmodem-stub.c
View file @
d34ac165
...
...
@@ -96,6 +96,8 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "UTIL/OTG/otg_vars.h"
#endif
#define D2D_MODE
#if defined(ENABLE_ITTI)
#include "intertask_interface_init.h"
#include "create_tasks.h"
...
...
@@ -1058,6 +1060,13 @@ int main( int argc, char **argv )
#endif
#endif
//TTN for D2D
#ifdef D2D_MODE
printf
(
"RRC control socket
\n
"
);
rrc_control_socket_init
();
#endif
#if !defined(ENABLE_ITTI)
// to make a graceful exit when ctrl-c is pressed
signal
(
SIGSEGV
,
signal_handler
);
...
...
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