flexran_agent_mac_defs.h 3.17 KB
Newer Older
1
2
3
4
5
/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
Cedric Roux's avatar
Cedric Roux committed
6
 * the OAI Public License, Version 1.1  (the "License"); you may not use this file
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 * except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */ 
21

22
23
/*! \file flexran_agent_mac_defs.h
 * \brief FlexRAN agent - mac interface primitives
24
25
26
27
28
29
 * \author Xenofon Foukas
 * \date 2016
 * \version 0.1
 * \mail x.foukas@sms.ed.ac.uk
 */

30
31
#ifndef __FLEXRAN_AGENT_MAC_PRIMITIVES_H__
#define __FLEXRAN_AGENT_MAC_PRIMITIVES_H__
32

33
#include "flexran_agent_defs.h"
34
#include "flexran.pb-c.h"
35
#include "header.pb-c.h"
36

37
38
#define RINGBUFFER_SIZE 100

39
/* FLEXRAN AGENT-MAC Interface */
40
typedef struct {
41
  //msg_context_t *agent_ctxt;
42
43

  /// Inform the controller about the scheduling requests received during the subframe
44
  void (*flexran_agent_send_sr_info)(mid_t mod_id);
45
46
  
  /// Inform the controller about the current UL/DL subframe
47
  void (*flexran_agent_send_sf_trigger)(mid_t mod_id);
48

49
50
  /// Send to the controller all the mac stat updates that occured during this subframe
  /// based on the stats request configuration
shahab's avatar
shahab committed
51
  // void (*flexran_agent_send_update_mac_stats)(mid_t mod_id);
52

53
  /// Provide to the scheduler a pending dl_mac_config message
54
55
  void (*flexran_agent_get_pending_dl_mac_config)(mid_t mod_id,
						  Protocol__FlexranMessage **msg);
56
  
57
58
59
  /// Run the UE DL scheduler and fill the Protocol__FlexranMessage. Assumes that
  /// dl_info is already initialized as flex_dl_mac_config and fills the
  /// flex_dl_data part of it
60
61
62
  void (*flexran_agent_schedule_ue_spec)(mid_t mod_id, uint32_t frame, uint32_t subframe,
					 int *mbsfn_flag, Protocol__FlexranMessage **dl_info);
  
shahab's avatar
shahab committed
63
64
65
66
  /// Run the UE UL scheduler and fill the Protocol__FlexranMessage. Assumes that
  
 void (*flexran_agent_schedule_ul_spec)(mid_t module_idP,  uint32_t frameP, uint32_t cooperation_flag,
        int subframeP, unsigned char sched_subframe, Protocol__FlexranMessage **ul_info);
67
68
69

  /// Notify the controller for a state change of a particular UE, by sending the proper
  /// UE state change message (ACTIVATION, DEACTIVATION, HANDOVER)
shahab's avatar
shahab committed
70
71
  // int (*flexran_agent_notify_ue_state_change)(mid_t mod_id, uint32_t rnti,
		// 			       uint8_t state_change);
72
  
73
74
  
  void *dl_scheduler_loaded_lib;
shahab's avatar
shahab committed
75
  void *ul_scheduler_loaded_lib;
76
77
78
79
80
  /*TODO: Fill in with the rest of the MAC layer technology specific callbacks (UL/DL scheduling, RACH info etc)*/

} AGENT_MAC_xface;

#endif