Agora  1.2.0
Agora project
FrameCounters Class Reference

This class stores the counters corresponding to a frame. Specifically, it contains a) the number of symbols per frame and b) the number of tasks per symbol, per frame. More...

#include <message.h>

Public Member Functions

 FrameCounters ()
 
void Init (size_t max_symbol_count, size_t max_task_count=0)
 
void Reset (size_t frame_id)
 
bool CompleteSymbol (size_t frame_id)
 Increments and checks the symbol count for input frame. More...
 
bool CompleteTask (size_t frame_id, size_t symbol_id)
 Increments the task count for input frame and symbol. More...
 
bool CompleteTask (size_t frame_id)
 Increments the symbol count for input frame. More...
 
bool IsLastSymbol (size_t frame_id) const
 Check whether the symbol is the last symbol for a given frame. More...
 
bool IsLastTask (size_t frame_id) const
 Check whether the task is the last task for a given frame while simultaneously incrementing the task count. This is used for tasks performed once per frame (e.g., ZF) More...
 
bool IsLastTask (size_t frame_id, size_t symbol_id) const
 Check whether the task is the last task for a given frame and. More...
 
size_t GetSymbolCount (size_t frame_id) const
 
size_t GetTaskCount (size_t frame_id) const
 
size_t GetTaskCount (size_t frame_id, size_t symbol_id) const
 
size_t MaxSymbolCount () const
 
size_t MaxTaskCount () const
 

Private Attributes

std::array< std::array< size_t, kMaxSymbols >, kFrameWndtask_count_
 
std::array< size_t, kFrameWndsymbol_count_
 
size_t max_symbol_count_ {0}
 
size_t max_task_count_ {0}
 

Detailed Description

This class stores the counters corresponding to a frame. Specifically, it contains a) the number of symbols per frame and b) the number of tasks per symbol, per frame.

Constructor & Destructor Documentation

◆ FrameCounters()

FrameCounters::FrameCounters ( )
inline

Member Function Documentation

◆ CompleteSymbol()

bool FrameCounters::CompleteSymbol ( size_t  frame_id)
inline

Increments and checks the symbol count for input frame.

Parameters
frame_idThe frame id of the symbol to increment
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CompleteTask() [1/2]

bool FrameCounters::CompleteTask ( size_t  frame_id)
inline

Increments the symbol count for input frame.

Parameters
symbol_idThe symbol id to increment
Here is the call graph for this function:

◆ CompleteTask() [2/2]

bool FrameCounters::CompleteTask ( size_t  frame_id,
size_t  symbol_id 
)
inline

Increments the task count for input frame and symbol.

Parameters
frame_slotThe frame index to increment
symbol_idThe symbol id of the task to increment
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetSymbolCount()

size_t FrameCounters::GetSymbolCount ( size_t  frame_id) const
inline
Here is the caller graph for this function:

◆ GetTaskCount() [1/2]

size_t FrameCounters::GetTaskCount ( size_t  frame_id) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetTaskCount() [2/2]

size_t FrameCounters::GetTaskCount ( size_t  frame_id,
size_t  symbol_id 
) const
inline

◆ Init()

void FrameCounters::Init ( size_t  max_symbol_count,
size_t  max_task_count = 0 
)
inline
Here is the caller graph for this function:

◆ IsLastSymbol()

bool FrameCounters::IsLastSymbol ( size_t  frame_id) const
inline

Check whether the symbol is the last symbol for a given frame.

Parameters
frameid The frame id of the symbol to check
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsLastTask() [1/2]

bool FrameCounters::IsLastTask ( size_t  frame_id) const
inline

Check whether the task is the last task for a given frame while simultaneously incrementing the task count. This is used for tasks performed once per frame (e.g., ZF)

Parameters
frame_idThe frame id to check
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsLastTask() [2/2]

bool FrameCounters::IsLastTask ( size_t  frame_id,
size_t  symbol_id 
) const
inline

Check whether the task is the last task for a given frame and.

Parameters
frame_idThe frame id to check
symbol_idThe symbol id to check
Here is the call graph for this function:

◆ MaxSymbolCount()

size_t FrameCounters::MaxSymbolCount ( ) const
inline
Here is the caller graph for this function:

◆ MaxTaskCount()

size_t FrameCounters::MaxTaskCount ( ) const
inline

◆ Reset()

void FrameCounters::Reset ( size_t  frame_id)
inline
Here is the caller graph for this function:

Member Data Documentation

◆ max_symbol_count_

size_t FrameCounters::max_symbol_count_ {0}
private

◆ max_task_count_

size_t FrameCounters::max_task_count_ {0}
private

◆ symbol_count_

std::array<size_t, kFrameWnd> FrameCounters::symbol_count_
private

◆ task_count_

std::array<std::array<size_t, kMaxSymbols>, kFrameWnd> FrameCounters::task_count_
private

The documentation for this class was generated from the following file: