Agora
1.2.0
Agora project
|
Go to the documentation of this file.
25 static_assert(
kMaxUEs < UINT16_MAX);
48 std::ostringstream ret;
136 static_assert(
sizeof(
gen_tag_t) ==
sizeof(
size_t));
178 std::ostringstream ret;
181 <<
sizeof(
fill_) <<
" empty bytes]";
219 throw std::runtime_error(
"RxPacket free called when memory was empty");
220 }
else if (
value == 1) {
231 static_assert(
sizeof(
RxPacket *) >=
sizeof(
size_t),
232 "RxPacket pounter must fit inside a size_t value");
238 static_assert(
sizeof(
rx_tag_t) ==
sizeof(
size_t));
243 #pragma pack(push, 1)
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) {
261 inline void Crc(
const uint16_t &crc) {
crc_ = crc; }
269 #if defined(ENABLE_RB_IND)
283 inline const unsigned char *
Data()
const {
return data_; };
286 inline void Set(
const uint16_t &f,
const uint16_t &
s,
const uint16_t &
u,
290 inline void LoadData(
const unsigned char *src_data) {
353 void Init(
size_t max_symbol_count,
size_t max_task_count = 0) {
363 const size_t frame_slot = (frame_id %
kFrameWnd);
373 const size_t frame_slot = (frame_id %
kFrameWnd);
384 const size_t frame_slot = (frame_id %
kFrameWnd);
400 const size_t frame_slot = (frame_id %
kFrameWnd);
411 "Unexpected result in IsLastSymbol: Symbol Count %zu, Max Count "
415 throw std::runtime_error(
"IsLastSymbol error!");
434 const size_t frame_slot = frame_id %
kFrameWnd;
435 const size_t task_count = this->
task_count_.at(frame_slot).at(symbol_id);
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);
449 throw std::runtime_error(
"IsLastTask error!");
size_t num_rx_pkts_per_frame_
Definition: message.h:329
RxPacket(Packet *in)
Definition: message.h:195
size_t num_reciprocity_pkts_per_frame_
Definition: message.h:335
@ kCodeblocks
Definition: message.h:29
std::string ToString() const
Definition: message.h:47
Packet(int f, int s, int c, int a)
Definition: message.h:174
uint32_t frame_id_
Definition: message.h:168
auto printf(const S &fmt, const T &... args) -> int
Definition: printf.h:631
size_t offset_
Definition: message.h:306
Definition: message.h:315
size_t GetTaskCount(size_t frame_id, size_t symbol_id) const
Definition: message.h:462
size_t tid_
Definition: message.h:305
uint16_t symbol_id_
Definition: message.h:33
GeneratorWrapper< T > value(T &&value)
Definition: catch.hpp:3999
static constexpr size_t kFrameWnd
Definition: symbols.h:18
size_t MaxTaskCount() const
Definition: message.h:467
static gen_tag_t FrmSymSc(size_t frame_id, size_t symbol_id, size_t sc_id)
Definition: message.h:95
unsigned char data_[]
Definition: message.h:298
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
Definition: symbols.h:42
uint16_t Ue() const
Definition: message.h:280
short data_[]
Definition: message.h:173
std::array< size_t, kFrameWnd > symbol_count_
Definition: message.h:475
MacPacketHeaderPacked header_
Definition: message.h:294
The packet that contains the control information (DCI) that tells each UE which uplink resource block...
Definition: ran_config.h:30
size_t tag_
Definition: message.h:308
bool CompleteTask(size_t frame_id, size_t symbol_id)
Increments the task count for input frame and symbol.
Definition: message.h:383
@ kNone
Definition: symbols.h:117
uint32_t ant_id_
Definition: message.h:171
bool IsLastSymbol(size_t frame_id) const
Check whether the symbol is the last symbol for a given frame.
Definition: message.h:399
static constexpr size_t kInvalidSymbolId
Definition: message.h:23
RxPacket & operator=(const RxPacket &)=delete
std::array< size_t, kMaxTags > tags_
Definition: message.h:146
TagType
Definition: message.h:29
Definition: message.h:227
void Use()
Definition: message.h:215
uint16_t ue_id_
Definition: message.h:37
RxCounters()
Definition: message.h:337
EventType event_type_
Definition: message.h:144
static gen_tag_t FrmSymUe(size_t frame_id, size_t symbol_id, size_t ue_id)
Definition: message.h:84
rx_tag_t(RxPacket *rx_packet)
Definition: message.h:235
static constexpr size_t kHeaderSize
Definition: message.h:276
size_t MaxSymbolCount() const
Definition: message.h:466
std::array< size_t, kFrameWnd > num_pilot_pkts_
Definition: message.h:322
This class stores the counters corresponding to a frame. Specifically, it contains a) the number of s...
Definition: message.h:349
size_t GetTaskCount(size_t frame_id) const
Definition: message.h:458
size_t tag_
Definition: message.h:229
Definition: message.h:142
gen_tag_t(size_t _tag)
Definition: message.h:44
uint32_t cell_id_
Definition: message.h:170
uint16_t ant_id_
Definition: message.h:38
uint32_t num_tags_
Definition: message.h:145
size_t num_pilot_pkts_per_frame_
Definition: message.h:332
TagType tag_type_
Definition: message.h:34
static gen_tag_t FrmSymAnt(size_t frame_id, size_t symbol_id, size_t ant_id)
Definition: message.h:106
void Set(const uint16_t &f, const uint16_t &s, const uint16_t &u, const uint16_t &data_size)
Definition: message.h:286
virtual void GcPacket()
Definition: message.h:191
void Init(size_t max_symbol_count, size_t max_task_count=0)
Definition: message.h:353
RxPacket()
Definition: message.h:194
static constexpr size_t kOffsetOfData
Definition: message.h:166
@ kNone
Definition: message.h:29
uint16_t Frame() const
Definition: message.h:278
Plot Rx waveform for u
Definition: inspect_single_frame.m:108
bool CompleteTask(size_t frame_id)
Increments the symbol count for input frame.
Definition: message.h:393
@ kUsers
Definition: message.h:29
static constexpr size_t kMaxTags
Definition: message.h:143
Definition: message.h:164
uint32_t symbol_id_
Definition: message.h:169
size_t tag_
Definition: message.h:43
std::array< size_t, kFrameWnd > num_pkts_
Definition: message.h:318
uint16_t Symbol() const
Definition: message.h:279
rx_tag_t(RxPacket &rx_packet)
Definition: message.h:234
void Crc(const uint16_t &crc)
Definition: message.h:293
static gen_tag_t FrmSc(size_t frame_id, size_t sc_id)
Definition: message.h:117
Packet * packet_
Definition: message.h:189
static constexpr size_t kMaxDataSCs
Definition: symbols.h:283
Packet * RawPacket()
Definition: message.h:213
data_size
Definition: inspect_agora_results.m:16
for d
Definition: process_rx_frame.m:53
void Reset(size_t frame_id)
Definition: message.h:362
uint16_t Crc() const
Definition: message.h:281
size_t max_symbol_count_
Definition: message.h:478
std::array< size_t, kFrameWnd > num_reciprocity_pkts_
Definition: message.h:326
static gen_tag_t FrmSymCb(size_t frame_id, size_t symbol_id, size_t cb_id)
Definition: message.h:73
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
uint16_t PayloadLength() const
Definition: message.h:282
uint32_t fill_[12]
Definition: message.h:172
unsigned char * DataPtr()
Definition: message.h:294
OutputIterator copy(const RangeT &range, OutputIterator out)
Definition: ranges.h:26
rx_mac_tag_t(size_t _tag)
Definition: message.h:311
rx_tag_t(size_t tag)
Definition: message.h:236
std::atomic< unsigned > references_
Definition: message.h:188
static gen_tag_t FrmSym(size_t frame_id, size_t symbol_id)
Definition: message.h:128
std::string to_string() const
Definition: eth_common.h:64
size_t GetSymbolCount(size_t frame_id) const
Definition: message.h:454
Definition: message.h:186
void LoadData(const unsigned char *src_data)
Definition: message.h:290
EventData(EventType event_type)
Definition: message.h:149
Definition: message.h:274
EventData(EventType event_type, size_t tag)
Definition: message.h:154
@ kSubcarriers
Definition: message.h:29
uint16_t sc_id_
Definition: message.h:39
bool Set(Packet *in_pkt)
Definition: message.h:204
static constexpr size_t kMaxUEs
Definition: symbols.h:289
static constexpr size_t kMaxSymbols
Definition: symbols.h:280
RxPacket(const RxPacket ©)
Definition: message.h:196
uint32_t frame_id_
Definition: message.h:32
static constexpr size_t kMaxAntennas
Definition: symbols.h:286
bool CompleteSymbol(size_t frame_id)
Increments and checks the symbol count for input frame.
Definition: message.h:372
FrameCounters()
Definition: message.h:351
Definition: message.h:303
virtual ~RxPacket()=default
void Free()
Definition: message.h:216
const unsigned char * Data() const
Definition: message.h:283
uint16_t cb_id_
Definition: message.h:36
rx_mac_tag_t(size_t tid, size_t offset)
Definition: message.h:310
bool Empty() const
Definition: message.h:214
size_t max_task_count_
Definition: message.h:480
@ kAntennas
Definition: message.h:29
RxPacket * rx_packet_
Definition: message.h:228
std::array< std::array< size_t, kMaxSymbols >, kFrameWnd > task_count_
Definition: message.h:472
std::string ToString() const
Definition: message.h:177