types.h 3.62 KB
Newer Older
1
/*******************************************************************************
nikaeinn's avatar
nikaeinn committed
2
3
    OpenAirInterface
    Copyright(c) 1999 - 2014 Eurecom
4

nikaeinn's avatar
nikaeinn committed
5
6
7
8
    OpenAirInterface is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
9
10


nikaeinn's avatar
nikaeinn committed
11
12
13
14
    OpenAirInterface is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
15

nikaeinn's avatar
nikaeinn committed
16
17
18
19
    You should have received a copy of the GNU General Public License
    along with OpenAirInterface.The full GNU General Public License is
    included in this distribution in the file called "COPYING". If not,
    see <http://www.gnu.org/licenses/>.
20
21

  Contact Information
nikaeinn's avatar
nikaeinn committed
22
23
24
25
  OpenAirInterface Admin: openair_admin@eurecom.fr
  OpenAirInterface Tech : openair_tech@eurecom.fr
  OpenAirInterface Dev  : openair4g-devel@eurecom.fr

ghaddab's avatar
ghaddab committed
26
  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
27
28
29

*******************************************************************************/

nikaeinn's avatar
nikaeinn committed
30
31
32
33
34
35
36
37
/*! \file pad_list.c
* \brief list management primimtives
* \author Mohamed Said MOSLI BOUKSIAA, Lionel GAUTHIER, Navid Nikaein
* \date 2012 - 2014
* \version 0.5
* @ingroup util
*/

gauthier's avatar
gauthier committed
38
39
#ifndef __FIFO_TYPES_H__
#define __FIFO_TYPES_H__
40
41
42
#include "platform_types.h"

/* Types regrouping both user-defined and regular events */
43
44
typedef enum  {
  MIN_ET=0,
45
  OAI_ET=MIN_ET, // config events
46
47
48
49
50
  SYS_ET,
  TOPO_ET,
  APP_ET,
  EMU_ET,
  DL_ET, // frame events
51
52
53
  UL_ET,
  S_ET,
  PHY_ET, // protocol events
54
55
56
57
58
59
  MAC_ET,
  RLC_ET,
  PDCP_ET,
  RRC_ET,
  MAX_ET
} Event_Type_t;
60
61

/* decomposition of node functions into jobs for a given event */
gauthier's avatar
gauthier committed
62
typedef enum Job_type_e { JT_OTG, JT_PDCP, JT_PHY_MAC, JT_INIT_SYNC, JT_DL, JT_UL, RN_DL, RN_UL, JT_END} Job_Type_t;
63

64
65
typedef enum Operation_Type_e { READ, WRITE, RESET} Operation_Type_t;

gauthier's avatar
gauthier committed
66
typedef struct Job_s {
67
68
69
70
71
72
73
74
  enum Job_type_e type;
  int             exe_time; /* execution time at the worker*/
  int             nid; /* node id*/
  eNB_flag_t      eNB_flag;
  frame_t         frame;
  int             last_slot;
  int             next_slot;
  int             ctime;
gauthier's avatar
gauthier committed
75
} Job_t;
76

gauthier's avatar
gauthier committed
77
typedef struct Signal_buffers_s { // (s = transmit, r,r0 = receive)
78
79
80
81
82
83
  double **s_re;
  double **s_im;
  double **r_re;
  double **r_im;
  double **r_re0;
  double **r_im0;
gauthier's avatar
gauthier committed
84
} Signal_buffers_t;
85
86
87

/*!\brief  sybframe type : DL, UL, SF, */

gauthier's avatar
gauthier committed
88
89
90
91
92
93
94
95
96
typedef struct Packet_otg_s {
  unsigned int              sdu_buffer_size;
  unsigned char            *sdu_buffer;
  module_id_t               module_id;
  rb_id_t                   rb_id;
  module_id_t               dst_id;
  boolean_t                 is_ue;
  pdcp_transmission_mode_t  mode;
} Packet_otg_t;
97

98
typedef struct {
99
100
101
102
103
104
105
  Event_Type_t type;
  enum Operation_Type_e optype; //op
  char             *key;
  void             *value;
  frame_t           frame;
  int ue;
  int lcid;
gauthier's avatar
gauthier committed
106
} Event_t;
107
108

/*typedef struct Global_Time {
gauthier's avatar
gauthier committed
109
110
111
112
  uint32_t frame;
  int32_t slot;
  int32_t last_slot;
  int32_t next_slot;
113
114
115
116
  double time_s;
  double time_ms;
};*/

117
118


gauthier's avatar
gauthier committed
119
typedef struct Packet_otg_elt_s {
120
121
122
  struct Packet_otg_elt_s *next;
  struct Packet_otg_elt_s *previous;
  Packet_otg_t             otg_pkt;
gauthier's avatar
gauthier committed
123
} Packet_otg_elt_t;
124

gauthier's avatar
gauthier committed
125
126
127
128
typedef struct Job_element_s {
  struct Job_element_s *next;
  Job_t                 job;
} Job_elt_t;
129

gauthier's avatar
gauthier committed
130
typedef struct Event_element_s {
131
132
  struct Event_element_s *next;
  struct Event_element_s *previous;
gauthier's avatar
gauthier committed
133
134
135
  Event_t               event;
} Event_elt_t;
#endif