API/USER: move _user_api_id to nas_user_t

This commit is contained in:
Frédéric Leroy
2017-01-25 13:24:30 +01:00
parent 53fa94785a
commit a99e1a95af
23 changed files with 195 additions and 162 deletions
+10 -22
View File
@@ -43,25 +43,13 @@ Description Implements the API used by the NAS layer running in the UE
#include "commonDef.h"
#include "networkDef.h"
#include "at_command.h"
#include "user_api_defs.h"
#include "user_defs.h"
/****************************************************************************/
/********************* G L O B A L C O N S T A N T S *******************/
/****************************************************************************/
/****************************************************************************/
/************************ G L O B A L T Y P E S ************************/
/****************************************************************************/
/*
* 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;
/****************************************************************************/
/******************** G L O B A L V A R I A B L E S ********************/
/****************************************************************************/
@@ -70,20 +58,20 @@ typedef struct {
/****************** E X P O R T E D F U N C T I O N S ******************/
/****************************************************************************/
int user_api_initialize(const char* host, const char* port, const char* devname, const char* devparams);
int user_api_initialize(user_api_id_t *user_api_id, const char* host, const char* port, const char* devname, const char* devparams);
int user_api_emm_callback(Stat_t stat, tac_t tac, ci_t ci, AcT_t AcT, const char* data, size_t size);
int user_api_esm_callback(int cid, network_pdn_state_t state);
int user_api_emm_callback(user_api_id_t *user_api_id, Stat_t stat, tac_t tac, ci_t ci, AcT_t AcT, const char* data, size_t size);
int user_api_esm_callback(user_api_id_t *user_api_id, int cid, network_pdn_state_t state);
int user_api_get_fd(void);
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(int fd);
int user_api_read_data(user_api_id_t *user_api_id, int fd);
int user_api_set_data(char *message);
int user_api_send_data(int fd, int length);
void user_api_close(int fd);
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_at_commands_t *commands, int length);
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);
#endif /* __USER_API_H__ */