Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
Michael Black
OpenXG UE
Commits
f05bd7de
Commit
f05bd7de
authored
Jul 22, 2016
by
Frédéric Leroy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UE/API/USER: move _user_api_*_buffer to user_api_id_t
parent
80d7d842
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
49 deletions
+34
-49
openair3/NAS/UE/API/USER/user_api.c
openair3/NAS/UE/API/USER/user_api.c
+24
-44
openair3/NAS/UE/API/USER/user_api.h
openair3/NAS/UE/API/USER/user_api.h
+2
-2
openair3/NAS/UE/API/USER/user_api_defs.h
openair3/NAS/UE/API/USER/user_api_defs.h
+6
-1
openair3/NAS/UE/nas_user.c
openair3/NAS/UE/nas_user.c
+2
-2
No files found.
openair3/NAS/UE/API/USER/user_api.c
View file @
f05bd7de
This diff is collapsed.
Click to expand it.
openair3/NAS/UE/API/USER/user_api.h
View file @
f05bd7de
...
...
@@ -67,11 +67,11 @@ int user_api_get_fd(user_api_id_t *user_api_id);
const
void
*
user_api_get_data
(
user_at_commands_t
*
commands
,
int
index
);
int
user_api_read_data
(
user_api_id_t
*
user_api_id
,
int
fd
);
int
user_api_set_data
(
char
*
message
);
int
user_api_set_data
(
user_api_id_t
*
user_api_id
,
char
*
message
);
int
user_api_send_data
(
user_api_id_t
*
user_api_id
,
int
fd
,
int
length
);
void
user_api_close
(
user_api_id_t
*
user_api_id
,
int
fd
);
int
user_api_decode_data
(
user_api_id_t
*
user_api_id
,
user_at_commands_t
*
commands
,
int
length
);
int
user_api_encode_data
(
const
void
*
data
,
int
add_success_code
);
int
user_api_encode_data
(
user_api_id_t
*
user_api_id
,
const
void
*
data
,
int
add_success_code
);
#endif
/* __USER_API_H__ */
openair3/NAS/UE/API/USER/user_api_defs.h
View file @
f05bd7de
...
...
@@ -8,12 +8,15 @@
/************************ G L O B A L T Y P E S ************************/
/****************************************************************************/
#define USER_API_RECV_BUFFER_SIZE 4096
#define USER_API_SEND_BUFFER_SIZE USER_API_RECV_BUFFER_SIZE
#define USER_DATA_MAX 10
/*
* The decoded data received from the user application layer
*/
typedef
struct
{
int
n_cmd
;
/* number of user data to be processed */
#define USER_DATA_MAX 10
at_command_t
cmd
[
USER_DATA_MAX
];
/* user data to be processed */
}
user_at_commands_t
;
...
...
@@ -39,6 +42,8 @@ typedef struct {
ssize_t
(
*
recv
)
(
void
*
,
char
*
,
size_t
);
ssize_t
(
*
send
)
(
const
void
*
,
const
char
*
,
size_t
);
void
(
*
close
)(
void
*
);
char
recv_buffer
[
USER_API_RECV_BUFFER_SIZE
];
char
send_buffer
[
USER_API_SEND_BUFFER_SIZE
];
}
user_api_id_t
;
...
...
openair3/NAS/UE/nas_user.c
View file @
f05bd7de
...
...
@@ -220,7 +220,7 @@ int nas_user_receive_and_process(nas_user_t *user, char *message)
if
(
message
!=
NULL
)
{
/* Set the message in receive buffer (Use to simulate reception of data from UserProcess) */
bytes
=
user_api_set_data
(
message
);
bytes
=
user_api_set_data
(
user_api_id
,
message
);
}
else
{
/* Read the user data message */
bytes
=
user_api_read_data
(
user_api_id
,
user
->
fd
);
...
...
@@ -270,7 +270,7 @@ int nas_user_receive_and_process(nas_user_t *user, char *message)
/* Send response to UserProcess (If not in simulated reception) */
if
(
message
==
NULL
)
{
/* Encode the user data message */
bytes
=
user_api_encode_data
(
nas_user_get_data
(
user
),
i
==
nb_command
-
1
);
bytes
=
user_api_encode_data
(
user
->
user_api_id
,
nas_user_get_data
(
user
),
i
==
nb_command
-
1
);
if
(
bytes
==
RETURNerror
)
{
/* Failed to encode the user data message;
...
...
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