This file is indexed.

/usr/include/ns3.27/ns3/ff-mac-sched-sap.h is in libns3-dev 3.27+dfsg-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation;
 *
 * This program 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.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Author: Manuel Requena <manuel.requena@cttc.es>
 */

#ifndef FF_MAC_SCHED_SAP_H
#define FF_MAC_SCHED_SAP_H

#include <stdint.h>
#include <vector>

#include "ff-mac-common.h"


namespace ns3 {

/**
 * \ingroup ff-api
 * \brief Provides the SCHED SAP
 *
 * This abstract class defines the MAC Scheduler interface specified in the
 * Femto Forum Technical Document:
 *   - LTE MAC Scheduler Interface Specification v1.11
 *
 * The Technical Document contains a detailed description of the API.
 * The documentation of this class refers to sections of this Technical Document.
 *
 * You can found an example of the implementation of this interface
 * in the SampleFfMacSchedSapProvider and SampleFfMacSchedSapUser classes
 */
class FfMacSchedSapProvider
{
public:
  virtual ~FfMacSchedSapProvider ();

  /**
   * Parameters of the API primitives
   */

  /**
   * Parameters of the SCHED_DL_RLC_BUFFER_REQ primitive.
   * See section 4.2.1 for a detailed description of the parameters.
   */
  struct SchedDlRlcBufferReqParameters
  {
    uint16_t  m_rnti; ///< RNTI
    uint8_t   m_logicalChannelIdentity; ///< logical channel identity
    uint32_t  m_rlcTransmissionQueueSize; ///< RLC transmission queue size
    uint16_t  m_rlcTransmissionQueueHolDelay; ///< RLC transmission queue HOL delay
    uint32_t  m_rlcRetransmissionQueueSize; ///< RLC retransmission queue size
    uint16_t  m_rlcRetransmissionHolDelay; ///< RLC retransmission HOL delay
    uint16_t  m_rlcStatusPduSize; ///< RLC status PDU size

    std::vector <struct VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
  };

  /**
   * Parameters of the SCHED_DL_PAGING_BUFFER_REQ primitive.
   * See section 4.2.2 for a detailed description of the parameters.
   */
  struct SchedDlPagingBufferReqParameters
  {
    uint16_t  m_rnti; ///< RNTI
    std::vector <struct PagingInfoListElement_s> m_pagingInfoList; ///< paging info list

    std::vector <struct VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
  };

  /**
   * Parameters of the SCHED_DL_MAC_BUFFER_REQ primitive.
   * See section 4.2.3 for a detailed description of the parameters.
   */
  struct SchedDlMacBufferReqParameters
  {
    uint16_t  m_rnti; ///< RNTI
    enum CeBitmap_e m_ceBitmap; ///< CE bitmap

    std::vector <struct VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
  };

  /**
   * Parameters of the SCHED_DL_TRIGGER_REQ primitive.
   * See section 4.2.4 for a detailed description of the parameters.
   */
  struct SchedDlTriggerReqParameters
  {
    uint16_t  m_sfnSf; ///< sfn SF
    std::vector <struct DlInfoListElement_s> m_dlInfoList; ///< DL info list

    std::vector <struct VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
  };

  /**
   * Parameters of the SCHED_DL_RACH_INFO_REQ primitive.
   * See section 4.2.5 for a detailed description of the parameters.
   */
  struct SchedDlRachInfoReqParameters
  {
    uint16_t  m_sfnSf; ///< sfn SF
    std::vector <struct RachListElement_s> m_rachList; ///< RACH list

    std::vector <struct VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
  };

  /**
   * Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
   * See section 4.2.6 for a detailed description of the parameters.
   */
  struct SchedDlCqiInfoReqParameters
  {
    uint16_t  m_sfnSf; ///< sfn SF
    std::vector <struct CqiListElement_s> m_cqiList; ///< CQI list

    std::vector <struct VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
  };

  /**
   * Parameters of the SCHED_UL_TRIGGER_REQ primitive.
   * See section 4.2.8 for a detailed description of the parameters.
   */
  struct SchedUlTriggerReqParameters
  {
    uint16_t  m_sfnSf; ///< sfn SF
    std::vector <struct UlInfoListElement_s> m_ulInfoList; ///< UL info list

    std::vector <struct VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
  };

  /**
   * Parameters of the SCHED_UL_NOISE_INTERFERENCE_REQ primitive.
   * See section 4.2.9 for a detailed description of the parameters.
   */
  struct SchedUlNoiseInterferenceReqParameters
  {
    uint16_t  m_sfnSf; ///< sfn SF
    uint16_t  m_rip; ///< RIP
    uint16_t  m_tnp; ///< TNP

    std::vector <struct VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
  };

  /**
   * Parameters of the SCHED_UL_SR_INFO_REQ primitive.
   * See section 4.2.10 for a detailed description of the parameters.
   */
  struct SchedUlSrInfoReqParameters
  {
    uint16_t  m_sfnSf; ///< sfn SF
    std::vector <struct SrListElement_s> m_srList; ///< SR list

    std::vector <struct VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
  };

  /**
   * Parameters of the SCHED_UL_MAC_CTRL_INFO_REQ primitive.
   * See section 4.2.11 for a detailed description of the parameters.
   */
  struct SchedUlMacCtrlInfoReqParameters
  {
    uint16_t  m_sfnSf; ///< sfn SF
    std::vector <struct MacCeListElement_s> m_macCeList; ///< MAC CE list

    std::vector <struct VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
  };

  /**
   * Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
   * See section 4.2.12 for a detailed description of the parameters.
   */
  struct SchedUlCqiInfoReqParameters
  {
    uint16_t  m_sfnSf; ///< sfn SF
    struct UlCqi_s m_ulCqi; ///< UL CQI

    std::vector <struct VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
  };

  //
  // SCHED - MAC Scheduler SAP primitives
  // (See 4.2 for description of the primitives)
  //

  /**
   * \brief SCHED_DL_RLC_BUFFER_REQ
   *
   * \param params SchedDlRlcBufferReqParameters
   */
  virtual void SchedDlRlcBufferReq (const struct SchedDlRlcBufferReqParameters& params) = 0;

  /**
   * \brief SCHED_DL_PAGING_BUFFER_REQ
   *
   * \param params SchedDlPagingBufferReqParameters
   */
  virtual void SchedDlPagingBufferReq (const struct SchedDlPagingBufferReqParameters& params) = 0;

  /**
   * \brief SCHED_DL_MAC_BUFFER_REQ
   *
   * \param params SchedDlMacBufferReqParameters
   */
  virtual void SchedDlMacBufferReq (const struct SchedDlMacBufferReqParameters& params) = 0;

  /**
   * \brief SCHED_DL_TRIGGER_REQ
   *
   * \param params SchedDlTriggerReqParameters
   */
  virtual void SchedDlTriggerReq (const struct SchedDlTriggerReqParameters& params) = 0;

  /**
   * \brief SCHED_DL_RACH_INFO_REQ
   *
   * \param params SchedDlRachInfoReqParameters
   */
  virtual void SchedDlRachInfoReq (const struct SchedDlRachInfoReqParameters& params) = 0;

  /**
   * \brief SCHED_DL_CQI_INFO_REQ
   *
   * \param params SchedDlCqiInfoReqParameters
   */
  virtual void SchedDlCqiInfoReq (const struct SchedDlCqiInfoReqParameters& params) = 0;

  /**
   * \brief SCHED_UL_TRIGGER_REQ
   *
   * \param params SchedUlTriggerReqParameters
   */
  virtual void SchedUlTriggerReq (const struct SchedUlTriggerReqParameters& params) = 0;

  /**
   * \brief SCHED_UL_NOISE_INTERFERENCE_REQ
   *
   * \param params SchedUlNoiseInterferenceReqParameters
   */
  virtual void SchedUlNoiseInterferenceReq (const struct SchedUlNoiseInterferenceReqParameters& params) = 0;

  /**
   * \brief SCHED_UL_SR_INFO_REQ
   *
   * \param params SchedUlSrInfoReqParameters
   */
  virtual void SchedUlSrInfoReq (const struct SchedUlSrInfoReqParameters& params) = 0;

  /**
   * \brief SCHED_UL_MAC_CTRL_INFO_REQ
   *
   * \param params SchedUlMacCtrlInfoReqParameters
   */
  virtual void SchedUlMacCtrlInfoReq (const struct SchedUlMacCtrlInfoReqParameters& params) = 0;

  /**
   * \brief SCHED_UL_CQI_INFO_REQ
   *
   * \param params SchedUlCqiInfoReqParameters
   */
  virtual void SchedUlCqiInfoReq (const struct SchedUlCqiInfoReqParameters& params) = 0;

private:
};


/// FfMacSchedSapUser class
class FfMacSchedSapUser
{
public:
  virtual ~FfMacSchedSapUser ();

  /**
   * Parameters of the API primitives
   */

  /**
   * Parameters of the SCHED_DL_CONFIG_IND primitive.
   * See section 4.2.7 for a detailed description of the parameters.
   */
  struct SchedDlConfigIndParameters
  {
    std::vector <struct BuildDataListElement_s>      m_buildDataList; ///< build data list
    std::vector <struct BuildRarListElement_s>       m_buildRarList; ///< build rar list
    std::vector <struct BuildBroadcastListElement_s> m_buildBroadcastList; ///< build broadcast list

    uint8_t m_nrOfPdcchOfdmSymbols; ///< number of PDCCH OFDM symbols

    std::vector <struct VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specfic list
  };

  /**
   * Parameters of the SCHED_UL_CONFIG_IND primitive.
   * See section 4.2.13 for a detailed description of the parameters.
   */
  struct SchedUlConfigIndParameters
  {
    std::vector <struct UlDciListElement_s> m_dciList; ///< DCI list
    std::vector <struct PhichListElement_s> m_phichList; ///< PHICH list

    std::vector <struct VendorSpecificListElement_s> m_vendorSpecificList; ///< vendor specific list
  };

  //
  // SCHED - MAC Scheduler SAP primitives
  // (See 4.2 for description of the primitives)
  //

  /**
   * \brief SCHED_DL_CONFIG_IND
   *
   * \param params SchedDlConfigIndParameters
   */
  virtual void SchedDlConfigInd (const struct SchedDlConfigIndParameters& params) = 0;

  /**
   * \brief SCHED_UL_CONFIG_IND
   *
   * \param params SchedUlConfigIndParameters
   */
  virtual void SchedUlConfigInd (const struct SchedUlConfigIndParameters& params) = 0;

private:
};



/// MemberSchedSapProvider class
template <class C>
class MemberSchedSapProvider : public FfMacSchedSapProvider
{
public:
  /**
   * Constructor
   *
   * \param scheduler the scheduler class
   */
  MemberSchedSapProvider (C* scheduler);

  // inherited from FfMacSchedSapProvider
  virtual void SchedDlRlcBufferReq (const struct SchedDlRlcBufferReqParameters& params);
  virtual void SchedDlPagingBufferReq (const struct SchedDlPagingBufferReqParameters& params);
  virtual void SchedDlMacBufferReq (const struct SchedDlMacBufferReqParameters& params);
  virtual void SchedDlTriggerReq (const struct SchedDlTriggerReqParameters& params);
  virtual void SchedDlRachInfoReq (const struct SchedDlRachInfoReqParameters& params);
  virtual void SchedDlCqiInfoReq (const struct SchedDlCqiInfoReqParameters& params);
  virtual void SchedUlTriggerReq (const struct SchedUlTriggerReqParameters& params);
  virtual void SchedUlNoiseInterferenceReq (const struct SchedUlNoiseInterferenceReqParameters& params);
  virtual void SchedUlSrInfoReq (const struct SchedUlSrInfoReqParameters& params);
  virtual void SchedUlMacCtrlInfoReq (const struct SchedUlMacCtrlInfoReqParameters& params);
  virtual void SchedUlCqiInfoReq (const struct SchedUlCqiInfoReqParameters& params);


private:
  MemberSchedSapProvider ();
  C* m_scheduler; ///< the scheduler class
};


template <class C>
MemberSchedSapProvider<C>::MemberSchedSapProvider ()
{
}


template <class C>
MemberSchedSapProvider<C>::MemberSchedSapProvider (C* scheduler)
  : m_scheduler (scheduler)
{
}

template <class C>
void
MemberSchedSapProvider<C>::SchedDlRlcBufferReq (const struct SchedDlRlcBufferReqParameters& params)
{
  m_scheduler->DoSchedDlRlcBufferReq (params);
}

template <class C>
void
MemberSchedSapProvider<C>::SchedDlPagingBufferReq (const struct SchedDlPagingBufferReqParameters& params)
{
  m_scheduler->DoSchedDlPagingBufferReq (params);
}

template <class C>
void
MemberSchedSapProvider<C>::SchedDlMacBufferReq (const struct SchedDlMacBufferReqParameters& params)
{
  m_scheduler->DoSchedDlMacBufferReq (params);
}

template <class C>
void
MemberSchedSapProvider<C>::SchedDlTriggerReq (const struct SchedDlTriggerReqParameters& params)
{
  m_scheduler->DoSchedDlTriggerReq (params);
}

template <class C>
void
MemberSchedSapProvider<C>::SchedDlRachInfoReq (const struct SchedDlRachInfoReqParameters& params)
{
  m_scheduler->DoSchedDlRachInfoReq (params);
}

template <class C>
void
MemberSchedSapProvider<C>::SchedDlCqiInfoReq (const struct SchedDlCqiInfoReqParameters& params)
{
  m_scheduler->DoSchedDlCqiInfoReq (params);
}

template <class C>
void
MemberSchedSapProvider<C>::SchedUlTriggerReq (const struct SchedUlTriggerReqParameters& params)
{
  m_scheduler->DoSchedUlTriggerReq (params);
}

template <class C>
void
MemberSchedSapProvider<C>::SchedUlNoiseInterferenceReq (const struct SchedUlNoiseInterferenceReqParameters& params)
{
  m_scheduler->DoSchedUlNoiseInterferenceReq (params);
}

template <class C>
void
MemberSchedSapProvider<C>::SchedUlSrInfoReq (const struct SchedUlSrInfoReqParameters& params)
{
  m_scheduler->DoSchedUlSrInfoReq (params);
}

template <class C>
void
MemberSchedSapProvider<C>::SchedUlMacCtrlInfoReq (const struct SchedUlMacCtrlInfoReqParameters& params)
{
  m_scheduler->DoSchedUlMacCtrlInfoReq (params);
}

template <class C>
void
MemberSchedSapProvider<C>::SchedUlCqiInfoReq (const struct SchedUlCqiInfoReqParameters& params)
{
  m_scheduler->DoSchedUlCqiInfoReq (params);
}





} // namespace ns3

#endif /* FF_MAC_SCHED_SAP_H */