Agora  1.2.0
Agora project
message.h
Go to the documentation of this file.
1 
5 #ifndef MESSAGE_H_
6 #define MESSAGE_H_
7 
8 #include <array>
9 #include <atomic>
10 #include <cassert>
11 #include <cstddef>
12 #include <cstdint>
13 #include <cstring>
14 #include <sstream>
15 #include <string>
16 
17 #include "ran_config.h"
18 #include "symbols.h"
19 
20 // A generic tag type for Agora tasks. The tag for a particular task will
21 // have only a subset of the fields initialized.
22 union gen_tag_t {
23  static constexpr size_t kInvalidSymbolId = (1ull << 13) - 1;
24  static_assert(kMaxSymbols < ((1ull << 13) - 1));
25  static_assert(kMaxUEs < UINT16_MAX);
26  static_assert(kMaxAntennas < UINT16_MAX);
27  static_assert(kMaxDataSCs < UINT16_MAX);
28 
30 
31  struct {
32  uint32_t frame_id_;
33  uint16_t symbol_id_ : 13;
35  union {
36  uint16_t cb_id_; // code block
37  uint16_t ue_id_;
38  uint16_t ant_id_;
39  uint16_t sc_id_;
40  };
41  };
42 
43  size_t tag_;
44  explicit gen_tag_t(size_t _tag) : tag_(_tag) {}
45 
46  // Return a string representation of this tag
47  std::string ToString() const {
48  std::ostringstream ret;
49  ret << "[Frame ID " << std::to_string(frame_id_) << ", symbol ID "
51  switch (tag_type_) {
52  case kCodeblocks:
53  ret << ", code block ID " << std::to_string(cb_id_) << "]";
54  break;
55  case kUsers:
56  ret << ", user ID " << std::to_string(ue_id_) << "]";
57  break;
58  case kAntennas:
59  ret << ", antenna ID " << std::to_string(ant_id_) << "]";
60  break;
61  case kSubcarriers:
62  ret << ", subcarrier ID " << std::to_string(sc_id_) << "]";
63  break;
64  case kNone:
65  ret << "] ";
66  break;
67  }
68  return ret.str();
69  }
70 
71  // Generate a tag with code block ID, frame ID, and symbol ID bits set and
72  // other fields blank
73  static gen_tag_t FrmSymCb(size_t frame_id, size_t symbol_id, size_t cb_id) {
74  gen_tag_t ret(0);
75  ret.frame_id_ = frame_id;
76  ret.symbol_id_ = symbol_id;
77  ret.tag_type_ = TagType::kCodeblocks;
78  ret.cb_id_ = cb_id;
79  return ret;
80  }
81 
82  // Generate a tag with user ID, frame ID, and symbol ID bits set and
83  // other fields blank
84  static gen_tag_t FrmSymUe(size_t frame_id, size_t symbol_id, size_t ue_id) {
85  gen_tag_t ret(0);
86  ret.frame_id_ = frame_id;
87  ret.symbol_id_ = symbol_id;
88  ret.tag_type_ = TagType::kUsers;
89  ret.ue_id_ = ue_id;
90  return ret;
91  }
92 
93  // Generate a tag with frame ID, symbol ID, and subcarrier ID bits set and
94  // other fields blank
95  static gen_tag_t FrmSymSc(size_t frame_id, size_t symbol_id, size_t sc_id) {
96  gen_tag_t ret(0);
97  ret.frame_id_ = frame_id;
98  ret.symbol_id_ = symbol_id;
99  ret.tag_type_ = TagType::kSubcarriers;
100  ret.sc_id_ = sc_id;
101  return ret;
102  }
103 
104  // Generate a tag with antenna ID, frame ID, and symbol ID bits set and
105  // other fields blank
106  static gen_tag_t FrmSymAnt(size_t frame_id, size_t symbol_id, size_t ant_id) {
107  gen_tag_t ret(0);
108  ret.frame_id_ = frame_id;
109  ret.symbol_id_ = symbol_id;
110  ret.tag_type_ = TagType::kAntennas;
111  ret.ant_id_ = ant_id;
112  return ret;
113  }
114 
115  // Generate a tag with frame ID and subcarrier ID bits set, and other fields
116  // blank
117  static gen_tag_t FrmSc(size_t frame_id, size_t sc_id) {
118  gen_tag_t ret(0);
119  ret.frame_id_ = frame_id;
121  ret.tag_type_ = TagType::kSubcarriers;
122  ret.sc_id_ = sc_id;
123  return ret;
124  }
125 
126  // Generate a tag with frame ID and symbol ID bits set, and other fields
127  // blank
128  static gen_tag_t FrmSym(size_t frame_id, size_t symbol_id) {
129  gen_tag_t ret(0);
130  ret.frame_id_ = frame_id;
131  ret.symbol_id_ = symbol_id;
133  return ret;
134  }
135 };
136 static_assert(sizeof(gen_tag_t) == sizeof(size_t));
137 
142 struct EventData {
143  static constexpr size_t kMaxTags = 7;
145  uint32_t num_tags_{0};
146  std::array<size_t, kMaxTags> tags_;
147 
148  // Initialize an event with only the event type field set
149  explicit EventData(EventType event_type) : event_type_(event_type) {
150  tags_.fill(0);
151  }
152 
153  // Create an event with one tag
154  EventData(EventType event_type, size_t tag)
155  : event_type_(event_type), num_tags_(1) {
156  tags_.fill(0);
157  tags_.at(0) = tag;
158  }
159 
160  EventData() = default;
161 };
162 static_assert(sizeof(EventData) == 64);
163 
164 struct Packet {
165  // The packet's data starts at kOffsetOfData bytes from the start
166  static constexpr size_t kOffsetOfData = 64;
167 
168  uint32_t frame_id_;
169  uint32_t symbol_id_;
170  uint32_t cell_id_;
171  uint32_t ant_id_;
172  uint32_t fill_[12]; // Padding for 64-byte alignment needed for SIMD
173  short data_[]; // Elements sent by antennae are two bytes (I/Q samples)
174  Packet(int f, int s, int c, int a) // TODO: Should be unsigned integers
175  : frame_id_(f), symbol_id_(s), cell_id_(c), ant_id_(a) {}
176 
177  std::string ToString() const {
178  std::ostringstream ret;
179  ret << "[Frame seq num " << frame_id_ << ", symbol ID " << symbol_id_
180  << ", cell ID " << cell_id_ << ", antenna ID " << ant_id_ << ", "
181  << sizeof(fill_) << " empty bytes]";
182  return ret.str();
183  }
184 };
185 
186 class RxPacket {
187  private:
188  std::atomic<unsigned> references_;
190 
191  inline virtual void GcPacket() {}
192 
193  public:
194  RxPacket() : references_(0) { packet_ = nullptr; }
195  explicit RxPacket(Packet *in) : references_(0) { Set(in); }
197  references_.store(copy.references_.load());
198  }
199  virtual ~RxPacket() = default;
200 
201  // Disallow copy
202  RxPacket &operator=(const RxPacket &) = delete;
203 
204  inline bool Set(Packet *in_pkt) {
205  if (references_.load() == 0) {
206  packet_ = in_pkt;
207  return true;
208  } else {
209  return false;
210  }
211  }
212 
213  inline Packet *RawPacket() { return packet_; }
214  inline bool Empty() const { return references_.load() == 0; }
215  inline void Use() { references_.fetch_add(1); }
216  inline void Free() {
217  unsigned value = references_.fetch_sub(1);
218  if (value == 0) {
219  throw std::runtime_error("RxPacket free called when memory was empty");
220  } else if (value == 1) {
221  GcPacket();
222  }
223  }
224 };
225 
226 // Event data tag for RX events
227 union rx_tag_t {
229  size_t tag_;
230 
231  static_assert(sizeof(RxPacket *) >= sizeof(size_t),
232  "RxPacket pounter must fit inside a size_t value");
233 
234  explicit rx_tag_t(RxPacket &rx_packet) : rx_packet_(&rx_packet) {}
235  explicit rx_tag_t(RxPacket *rx_packet) : rx_packet_(rx_packet) {}
236  explicit rx_tag_t(size_t tag) : tag_(tag) {}
237 };
238 static_assert(sizeof(rx_tag_t) == sizeof(size_t));
239 
240 // Event data tag for FFT task requests
242 
243 #pragma pack(push, 1)
245  public:
246  inline uint16_t Frame() const { return frame_id_; }
247  inline uint16_t Symbol() const { return symbol_id_; }
248  inline uint16_t Ue() const { return ue_id_; }
249  inline uint16_t Crc() const { return crc_; }
250  inline uint16_t PayloadLength() const { return datalen_; }
251 
252  // Modifiers
253  inline void Set(const uint16_t &f, const uint16_t &s, const uint16_t &u,
254  const uint16_t &d, const uint16_t &cc) {
255  frame_id_ = f;
256  symbol_id_ = s;
257  ue_id_ = u;
258  datalen_ = d;
259  crc_ = cc;
260  }
261  inline void Crc(const uint16_t &crc) { crc_ = crc; }
262 
263  private:
264  uint16_t frame_id_;
265  uint16_t symbol_id_;
266  uint16_t ue_id_;
267  uint16_t datalen_; // length of payload in bytes or array data[]
268  uint16_t crc_; // 16 bits CRC over calculated for the data[] array
269 #if defined(ENABLE_RB_IND)
270  RBIndicator rb_indicator_; // RAN scheduling details for PHY
271 #endif
272 };
273 
275  public:
276  static constexpr size_t kHeaderSize = sizeof(MacPacketHeaderPacked);
277 
278  inline uint16_t Frame() const { return header_.Frame(); }
279  inline uint16_t Symbol() const { return header_.Symbol(); }
280  inline uint16_t Ue() const { return header_.Ue(); }
281  inline uint16_t Crc() const { return header_.Crc(); }
282  inline uint16_t PayloadLength() const { return header_.PayloadLength(); }
283  inline const unsigned char *Data() const { return data_; };
284 
285  // Modifiers
286  inline void Set(const uint16_t &f, const uint16_t &s, const uint16_t &u,
287  const uint16_t &data_size) {
288  header_.Set(f, s, u, data_size, 0);
289  }
290  inline void LoadData(const unsigned char *src_data) {
291  std::memcpy(this->data_, src_data, this->PayloadLength());
292  }
293  inline void Crc(const uint16_t &crc) { header_.Crc(crc); }
294  inline unsigned char *DataPtr() { return data_; };
295 
296  private:
298  unsigned char data_[]; // Mac packet payload data
299 };
300 #pragma pack(pop)
301 
302 // Event data tag for Mac RX events
304  struct {
305  size_t tid_ : 8; // ID of the socket thread that received the packet
306  size_t offset_ : 56; // Offset in the socket thread's RX buffer
307  };
308  size_t tag_;
309 
310  rx_mac_tag_t(size_t tid, size_t offset) : tid_(tid), offset_(offset) {}
311  explicit rx_mac_tag_t(size_t _tag) : tag_(_tag) {}
312 };
313 static_assert(sizeof(rx_mac_tag_t) == sizeof(size_t));
314 
315 class RxCounters {
316  public:
317  // num_pkt[i] is the total number of packets we've received for frame i
318  std::array<size_t, kFrameWnd> num_pkts_;
319 
320  // num_pilot_pkts[i] is the total number of pilot packets we've received
321  // for frame i
322  std::array<size_t, kFrameWnd> num_pilot_pkts_;
323 
324  // num_rc_pkts[i] is the total number of reciprocity pilot packets we've
325  // received for frame i
326  std::array<size_t, kFrameWnd> num_reciprocity_pkts_;
327 
328  // Number of packets we'll receive per frame on the uplink
330 
331  // Number of pilot packets we'll receive per frame
333 
334  // Number of reciprocity pilot packets we'll receive per frame
336 
338  num_pkts_.fill(0);
339  num_pilot_pkts_.fill(0);
340  num_reciprocity_pkts_.fill(0);
341  }
342 };
343 
350  public:
352 
353  void Init(size_t max_symbol_count, size_t max_task_count = 0) {
354  this->max_symbol_count_ = max_symbol_count;
355  this->max_task_count_ = max_task_count;
356  this->symbol_count_.fill(0);
357  for (auto &frame : task_count_) {
358  frame.fill(0);
359  }
360  }
361 
362  void Reset(size_t frame_id) {
363  const size_t frame_slot = (frame_id % kFrameWnd);
364  this->symbol_count_.at(frame_slot) = 0;
365  this->task_count_.at(frame_slot).fill(0);
366  }
367 
372  bool CompleteSymbol(size_t frame_id) {
373  const size_t frame_slot = (frame_id % kFrameWnd);
374  this->symbol_count_.at(frame_slot)++;
375  return this->IsLastSymbol(frame_slot);
376  }
377 
383  bool CompleteTask(size_t frame_id, size_t symbol_id) {
384  const size_t frame_slot = (frame_id % kFrameWnd);
385  this->task_count_.at(frame_slot).at(symbol_id)++;
386  return this->IsLastTask(frame_id, symbol_id);
387  }
388 
393  bool CompleteTask(size_t frame_id) { return this->CompleteSymbol(frame_id); }
394 
399  bool IsLastSymbol(size_t frame_id) const {
400  const size_t frame_slot = (frame_id % kFrameWnd);
401  const size_t symbol_count = symbol_count_.at(frame_slot);
402  bool is_last;
403  if (symbol_count == max_symbol_count_) {
404  is_last = true;
405  } else if (symbol_count < max_symbol_count_) {
406  is_last = false;
407  } else {
408  /* This should never happen */
409  is_last = true;
410  std::printf(
411  "Unexpected result in IsLastSymbol: Symbol Count %zu, Max Count "
412  "%zu, Frame %zu\n",
413  symbol_count, max_symbol_count_, frame_id);
414  assert(false);
415  throw std::runtime_error("IsLastSymbol error!");
416  }
417  return is_last;
418  }
419 
426  bool IsLastTask(size_t frame_id) const { return IsLastSymbol(frame_id); }
427 
433  bool IsLastTask(size_t frame_id, size_t symbol_id) const {
434  const size_t frame_slot = frame_id % kFrameWnd;
435  const size_t task_count = this->task_count_.at(frame_slot).at(symbol_id);
436  bool is_last;
437  if (task_count == this->max_task_count_) {
438  is_last = true;
439  } else if (task_count < this->max_task_count_) {
440  is_last = false;
441  } else {
442  // This should never happen
443  is_last = true;
444  std::printf(
445  "Unexpected result in IsLastTask: Task Count %zu, Max Count %zu, "
446  "Frame %zu, Symbol %zu\n",
447  task_count, this->max_task_count_, frame_id, symbol_id);
448  assert(false);
449  throw std::runtime_error("IsLastTask error!");
450  }
451  return is_last;
452  }
453 
454  size_t GetSymbolCount(size_t frame_id) const {
455  return this->symbol_count_.at(frame_id % kFrameWnd);
456  }
457 
458  size_t GetTaskCount(size_t frame_id) const {
459  return this->GetSymbolCount(frame_id);
460  }
461 
462  size_t GetTaskCount(size_t frame_id, size_t symbol_id) const {
463  return this->task_count_.at(frame_id % kFrameWnd).at(symbol_id);
464  }
465 
466  inline size_t MaxSymbolCount() const { return this->max_symbol_count_; }
467  inline size_t MaxTaskCount() const { return this->max_task_count_; }
468 
469  private:
470  // task_count[i][j] is the number of tasks completed for
471  // frame (i % kFrameWnd) and symbol j
472  std::array<std::array<size_t, kMaxSymbols>, kFrameWnd> task_count_;
473  // symbol_count[i] is the number of symbols completed for
474  // frame (i % kFrameWnd)
475  std::array<size_t, kFrameWnd> symbol_count_;
476 
477  // Maximum number of symbols in a frame
478  size_t max_symbol_count_{0};
479  // Maximum number of tasks in a symbol
480  size_t max_task_count_{0};
481 };
482 
483 #endif // MESSAGE_H_
RxCounters::num_rx_pkts_per_frame_
size_t num_rx_pkts_per_frame_
Definition: message.h:329
RxPacket::RxPacket
RxPacket(Packet *in)
Definition: message.h:195
RxCounters::num_reciprocity_pkts_per_frame_
size_t num_reciprocity_pkts_per_frame_
Definition: message.h:335
gen_tag_t::kCodeblocks
@ kCodeblocks
Definition: message.h:29
gen_tag_t::ToString
std::string ToString() const
Definition: message.h:47
Packet::Packet
Packet(int f, int s, int c, int a)
Definition: message.h:174
Packet::frame_id_
uint32_t frame_id_
Definition: message.h:168
MacPacketHeaderPacked::Frame
uint16_t Frame() const
Definition: message.h:246
fmt::v8::printf
auto printf(const S &fmt, const T &... args) -> int
Definition: printf.h:631
rx_mac_tag_t::offset_
size_t offset_
Definition: message.h:306
RxCounters
Definition: message.h:315
FrameCounters::GetTaskCount
size_t GetTaskCount(size_t frame_id, size_t symbol_id) const
Definition: message.h:462
rx_mac_tag_t::tid_
size_t tid_
Definition: message.h:305
gen_tag_t::symbol_id_
uint16_t symbol_id_
Definition: message.h:33
Catch::Generators::value
GeneratorWrapper< T > value(T &&value)
Definition: catch.hpp:3999
kFrameWnd
static constexpr size_t kFrameWnd
Definition: symbols.h:18
EventData::EventData
EventData()=default
FrameCounters::MaxTaskCount
size_t MaxTaskCount() const
Definition: message.h:467
gen_tag_t::FrmSymSc
static gen_tag_t FrmSymSc(size_t frame_id, size_t symbol_id, size_t sc_id)
Definition: message.h:95
MacPacketPacked::data_
unsigned char data_[]
Definition: message.h:298
FrameCounters::IsLastTask
bool IsLastTask(size_t frame_id) const
Check whether the task is the last task for a given frame while simultaneously incrementing the task ...
Definition: message.h:426
EventType
EventType
Definition: symbols.h:42
MacPacketPacked::Ue
uint16_t Ue() const
Definition: message.h:280
Packet::data_
short data_[]
Definition: message.h:173
FrameCounters::symbol_count_
std::array< size_t, kFrameWnd > symbol_count_
Definition: message.h:475
MacPacketPacked::header_
MacPacketHeaderPacked header_
Definition: message.h:294
RBIndicator
The packet that contains the control information (DCI) that tells each UE which uplink resource block...
Definition: ran_config.h:30
rx_mac_tag_t::tag_
size_t tag_
Definition: message.h:308
FrameCounters::CompleteTask
bool CompleteTask(size_t frame_id, size_t symbol_id)
Increments the task count for input frame and symbol.
Definition: message.h:383
kNone
@ kNone
Definition: symbols.h:117
Packet::ant_id_
uint32_t ant_id_
Definition: message.h:171
FrameCounters::IsLastSymbol
bool IsLastSymbol(size_t frame_id) const
Check whether the symbol is the last symbol for a given frame.
Definition: message.h:399
gen_tag_t::kInvalidSymbolId
static constexpr size_t kInvalidSymbolId
Definition: message.h:23
RxPacket::operator=
RxPacket & operator=(const RxPacket &)=delete
EventData::tags_
std::array< size_t, kMaxTags > tags_
Definition: message.h:146
MacPacketHeaderPacked::datalen_
uint16_t datalen_
Definition: message.h:267
gen_tag_t::TagType
TagType
Definition: message.h:29
MacPacketHeaderPacked::rb_indicator_
RBIndicator rb_indicator_
Definition: message.h:270
rx_tag_t
Definition: message.h:227
RxPacket::Use
void Use()
Definition: message.h:215
gen_tag_t::ue_id_
uint16_t ue_id_
Definition: message.h:37
MacPacketHeaderPacked::ue_id_
uint16_t ue_id_
Definition: message.h:266
RxCounters::RxCounters
RxCounters()
Definition: message.h:337
EventData::event_type_
EventType event_type_
Definition: message.h:144
gen_tag_t::FrmSymUe
static gen_tag_t FrmSymUe(size_t frame_id, size_t symbol_id, size_t ue_id)
Definition: message.h:84
gen_tag_t
Definition: message.h:22
rx_tag_t::rx_tag_t
rx_tag_t(RxPacket *rx_packet)
Definition: message.h:235
MacPacketPacked::kHeaderSize
static constexpr size_t kHeaderSize
Definition: message.h:276
FrameCounters::MaxSymbolCount
size_t MaxSymbolCount() const
Definition: message.h:466
RxCounters::num_pilot_pkts_
std::array< size_t, kFrameWnd > num_pilot_pkts_
Definition: message.h:322
MacPacketHeaderPacked::Set
void Set(const uint16_t &f, const uint16_t &s, const uint16_t &u, const uint16_t &d, const uint16_t &cc)
Definition: message.h:253
FrameCounters
This class stores the counters corresponding to a frame. Specifically, it contains a) the number of s...
Definition: message.h:349
FrameCounters::GetTaskCount
size_t GetTaskCount(size_t frame_id) const
Definition: message.h:458
rx_tag_t::tag_
size_t tag_
Definition: message.h:229
EventData
Definition: message.h:142
MacPacketHeaderPacked::Crc
uint16_t Crc() const
Definition: message.h:249
gen_tag_t::gen_tag_t
gen_tag_t(size_t _tag)
Definition: message.h:44
Packet::cell_id_
uint32_t cell_id_
Definition: message.h:170
gen_tag_t::ant_id_
uint16_t ant_id_
Definition: message.h:38
EventData::num_tags_
uint32_t num_tags_
Definition: message.h:145
RxCounters::num_pilot_pkts_per_frame_
size_t num_pilot_pkts_per_frame_
Definition: message.h:332
gen_tag_t::tag_type_
TagType tag_type_
Definition: message.h:34
gen_tag_t::FrmSymAnt
static gen_tag_t FrmSymAnt(size_t frame_id, size_t symbol_id, size_t ant_id)
Definition: message.h:106
MacPacketHeaderPacked
Definition: message.h:244
MacPacketPacked::Set
void Set(const uint16_t &f, const uint16_t &s, const uint16_t &u, const uint16_t &data_size)
Definition: message.h:286
RxPacket::GcPacket
virtual void GcPacket()
Definition: message.h:191
FrameCounters::Init
void Init(size_t max_symbol_count, size_t max_task_count=0)
Definition: message.h:353
RxPacket::RxPacket
RxPacket()
Definition: message.h:194
Packet::kOffsetOfData
static constexpr size_t kOffsetOfData
Definition: message.h:166
gen_tag_t::kNone
@ kNone
Definition: message.h:29
MacPacketPacked::Frame
uint16_t Frame() const
Definition: message.h:278
u
Plot Rx waveform for u
Definition: inspect_single_frame.m:108
FrameCounters::CompleteTask
bool CompleteTask(size_t frame_id)
Increments the symbol count for input frame.
Definition: message.h:393
gen_tag_t::kUsers
@ kUsers
Definition: message.h:29
MacPacketHeaderPacked::PayloadLength
uint16_t PayloadLength() const
Definition: message.h:250
EventData::kMaxTags
static constexpr size_t kMaxTags
Definition: message.h:143
MacPacketHeaderPacked::Ue
uint16_t Ue() const
Definition: message.h:248
Packet
Definition: message.h:164
Packet::symbol_id_
uint32_t symbol_id_
Definition: message.h:169
gen_tag_t::tag_
size_t tag_
Definition: message.h:43
RxCounters::num_pkts_
std::array< size_t, kFrameWnd > num_pkts_
Definition: message.h:318
MacPacketPacked::Symbol
uint16_t Symbol() const
Definition: message.h:279
rx_tag_t::rx_tag_t
rx_tag_t(RxPacket &rx_packet)
Definition: message.h:234
MacPacketPacked::Crc
void Crc(const uint16_t &crc)
Definition: message.h:293
s
s
Definition: simulate_performance.m:3
MacPacketHeaderPacked::Symbol
uint16_t Symbol() const
Definition: message.h:247
symbols.h
gen_tag_t::FrmSc
static gen_tag_t FrmSc(size_t frame_id, size_t sc_id)
Definition: message.h:117
ran_config.h
RxPacket::packet_
Packet * packet_
Definition: message.h:189
kMaxDataSCs
static constexpr size_t kMaxDataSCs
Definition: symbols.h:283
RxPacket::RawPacket
Packet * RawPacket()
Definition: message.h:213
data_size
data_size
Definition: inspect_agora_results.m:16
d
for d
Definition: process_rx_frame.m:53
FrameCounters::Reset
void Reset(size_t frame_id)
Definition: message.h:362
MacPacketPacked::Crc
uint16_t Crc() const
Definition: message.h:281
FrameCounters::max_symbol_count_
size_t max_symbol_count_
Definition: message.h:478
RxCounters::num_reciprocity_pkts_
std::array< size_t, kFrameWnd > num_reciprocity_pkts_
Definition: message.h:326
gen_tag_t::FrmSymCb
static gen_tag_t FrmSymCb(size_t frame_id, size_t symbol_id, size_t cb_id)
Definition: message.h:73
FrameCounters::IsLastTask
bool IsLastTask(size_t frame_id, size_t symbol_id) const
Check whether the task is the last task for a given frame and.
Definition: message.h:433
MacPacketPacked::PayloadLength
uint16_t PayloadLength() const
Definition: message.h:282
Packet::fill_
uint32_t fill_[12]
Definition: message.h:172
MacPacketPacked::DataPtr
unsigned char * DataPtr()
Definition: message.h:294
fmt::v8::detail::copy
OutputIterator copy(const RangeT &range, OutputIterator out)
Definition: ranges.h:26
MacPacketHeaderPacked::crc_
uint16_t crc_
Definition: message.h:268
rx_mac_tag_t::rx_mac_tag_t
rx_mac_tag_t(size_t _tag)
Definition: message.h:311
rx_tag_t::rx_tag_t
rx_tag_t(size_t tag)
Definition: message.h:236
RxPacket::references_
std::atomic< unsigned > references_
Definition: message.h:188
gen_tag_t::FrmSym
static gen_tag_t FrmSym(size_t frame_id, size_t symbol_id)
Definition: message.h:128
to_string
std::string to_string() const
Definition: eth_common.h:64
FrameCounters::GetSymbolCount
size_t GetSymbolCount(size_t frame_id) const
Definition: message.h:454
RxPacket
Definition: message.h:186
MacPacketHeaderPacked::symbol_id_
uint16_t symbol_id_
Definition: message.h:265
MacPacketHeaderPacked::Crc
void Crc(const uint16_t &crc)
Definition: message.h:261
MacPacketPacked::LoadData
void LoadData(const unsigned char *src_data)
Definition: message.h:290
EventData::EventData
EventData(EventType event_type)
Definition: message.h:149
MacPacketPacked
Definition: message.h:274
EventData::EventData
EventData(EventType event_type, size_t tag)
Definition: message.h:154
gen_tag_t::kSubcarriers
@ kSubcarriers
Definition: message.h:29
gen_tag_t::sc_id_
uint16_t sc_id_
Definition: message.h:39
RxPacket::Set
bool Set(Packet *in_pkt)
Definition: message.h:204
kMaxUEs
static constexpr size_t kMaxUEs
Definition: symbols.h:289
kMaxSymbols
static constexpr size_t kMaxSymbols
Definition: symbols.h:280
RxPacket::RxPacket
RxPacket(const RxPacket &copy)
Definition: message.h:196
gen_tag_t::frame_id_
uint32_t frame_id_
Definition: message.h:32
MacPacketHeaderPacked::frame_id_
uint16_t frame_id_
Definition: message.h:264
kMaxAntennas
static constexpr size_t kMaxAntennas
Definition: symbols.h:286
FrameCounters::CompleteSymbol
bool CompleteSymbol(size_t frame_id)
Increments and checks the symbol count for input frame.
Definition: message.h:372
FrameCounters::FrameCounters
FrameCounters()
Definition: message.h:351
rx_mac_tag_t
Definition: message.h:303
RxPacket::~RxPacket
virtual ~RxPacket()=default
RxPacket::Free
void Free()
Definition: message.h:216
MacPacketPacked::Data
const unsigned char * Data() const
Definition: message.h:283
gen_tag_t::cb_id_
uint16_t cb_id_
Definition: message.h:36
rx_mac_tag_t::rx_mac_tag_t
rx_mac_tag_t(size_t tid, size_t offset)
Definition: message.h:310
RxPacket::Empty
bool Empty() const
Definition: message.h:214
FrameCounters::max_task_count_
size_t max_task_count_
Definition: message.h:480
gen_tag_t::kAntennas
@ kAntennas
Definition: message.h:29
rx_tag_t::rx_packet_
RxPacket * rx_packet_
Definition: message.h:228
FrameCounters::task_count_
std::array< std::array< size_t, kMaxSymbols >, kFrameWnd > task_count_
Definition: message.h:472
Packet::ToString
std::string ToString() const
Definition: message.h:177