OpenCSD - CoreSight Trace Decode Library
1.3.3
|
Maintain a list of elements to be output. More...
#include <ocsd_gen_elem_list.h>
Public Member Functions | |
OcsdGenElemList () | |
~OcsdGenElemList () | |
void | initSendIf (componentAttachPt< ITrcGenElemIn > *pGenElemIf) |
void | initCSID (const uint8_t CSID) |
void | reset () |
reset the element list. More... | |
OcsdTraceElement * | getNextElem (const ocsd_trc_index_t trc_pkt_idx) |
get next free element on the stack (add one to the output) More... | |
const int | getNumElem () const |
return the total number of elements on the stack (inlcuding any pended ones). More... | |
const ocsd_gen_trc_elem_t | getElemType (const int entryN) const |
get the type for the nth element in the stack (0 indexed) More... | |
void | pendLastNElem (int numPend) |
Last element to be pended prior to cancel/commit decision. More... | |
void | commitAllPendElem () |
commit all pended elements. More... | |
void | cancelPendElem () |
cancel the last pended element on the stack. More... | |
const int | numPendElem () const |
return the number of pended elements. More... | |
ocsd_datapath_resp_t | sendElements () |
const bool | elemToSend () const |
true if any none-pending elements left to send. More... | |
Maintain a list of elements to be output.
Each incoming packet can result in multiple output elements. These are stacked in this class prior to entering the output phase of processing.
This should remove some of the requirement on the packet processing to be re-enterant, simplifying this code.
Last element(s) on this list can be marked pending to allow for later cancellation. (This required for cancel element in ETMv3 exeception branch).
The "list" is actually a ring buffer - maintaining pointers to indicate current valid elements. This buffer can increase on demand, but will only be released at the end of a decode session.
Definition at line 56 of file ocsd_gen_elem_list.h.
OcsdGenElemList::OcsdGenElemList | ( | ) |
OcsdGenElemList::~OcsdGenElemList | ( | ) |
|
inline |
cancel the last pended element on the stack.
Definition at line 135 of file ocsd_gen_elem_list.h.
|
inline |
commit all pended elements.
Definition at line 130 of file ocsd_gen_elem_list.h.
|
inline |
true if any none-pending elements left to send.
Definition at line 143 of file ocsd_gen_elem_list.h.
const ocsd_gen_trc_elem_t OcsdGenElemList::getElemType | ( | const int | entryN | ) | const |
get the type for the nth element in the stack (0 indexed)
OcsdTraceElement* OcsdGenElemList::getNextElem | ( | const ocsd_trc_index_t | trc_pkt_idx | ) |
get next free element on the stack (add one to the output)
|
inline |
return the total number of elements on the stack (inlcuding any pended ones).
Definition at line 114 of file ocsd_gen_elem_list.h.
|
inline |
Definition at line 63 of file ocsd_gen_elem_list.h.
|
inline |
Definition at line 148 of file ocsd_gen_elem_list.h.
|
inline |
return the number of pended elements.
Definition at line 119 of file ocsd_gen_elem_list.h.
|
inline |
Last element to be pended prior to cancel/commit decision.
Definition at line 124 of file ocsd_gen_elem_list.h.
void OcsdGenElemList::reset | ( | ) |
reset the element list.
ocsd_datapath_resp_t OcsdGenElemList::sendElements | ( | ) |
Send all of the none pended elements Stop sending when all sent or _CONT response.