OpenCSD - CoreSight Trace Decode Library  1.3.3
Public Member Functions | List of all members
StmTrcPacket Class Reference

STM trace packet with packet printing functionality. More...

#include <trc_pkt_elem_stm.h>

Inheritance diagram for StmTrcPacket:
Inheritance graph
[legend]
Collaboration diagram for StmTrcPacket:
Collaboration graph
[legend]

Public Member Functions

 StmTrcPacket ()
 
 ~StmTrcPacket ()
 
StmTrcPacketoperator= (const ocsd_stm_pkt *p_pkt)
 
virtual const void * c_pkt () const
 return the underlying C API packet structure More...
 
void initStartState ()
 Initialise packet state at start of decoder. More...
 
void initNextPacket ()
 Initialise state for next packet. More...
 
void setPacketType (const ocsd_stm_pkt_type type, const bool bMarker)
 
void updateErrType (const ocsd_stm_pkt_type err_type)
 
void setMaster (const uint8_t master)
 
void setChannel (const uint16_t channel, const bool b8Bit)
 
void setTS (const uint64_t ts_val, const uint8_t updatedBits)
 
void onVersionPkt (const ocsd_stm_ts_type type)
 
void setD4Payload (const uint8_t value)
 
void setD8Payload (const uint8_t value)
 
void setD16Payload (const uint16_t value)
 
void setD32Payload (const uint32_t value)
 
void setD64Payload (const uint64_t value)
 
const bool isMarkerPkt () const
 
const bool isTSPkt () const
 
const ocsd_stm_pkt_type getPktType () const
 
const ocsd_stm_pkt_type getPktErrType () const
 
const uint8_t getMaster () const
 
const uint16_t getChannel () const
 
const ocsd_stm_ts_type getTSType () const
 
const uint64_t getTSVal () const
 
const uint8_t getD4Val () const
 
const uint8_t getD8Val () const
 
const uint16_t getD16Val () const
 
const uint32_t getD32Val () const
 
const uint64_t getD64Val () const
 
const bool isBadPacket () const
 
virtual void toString (std::string &str) const
 
virtual void toStringFmt (const uint32_t fmtFlags, std::string &str) const
 
- Public Member Functions inherited from TrcPacketBase
 TrcPacketBase ()
 
virtual ~TrcPacketBase ()
 
- Public Member Functions inherited from trcPrintableElem
 trcPrintableElem ()
 
virtual ~trcPrintableElem ()
 

Additional Inherited Members

- Static Public Member Functions inherited from trcPrintableElem
static void getValStr (std::string &valStr, const int valTotalBitSize, const int valValidBits, const uint64_t value, const bool asHex=true, const int updateBits=0)
 
- Public Attributes inherited from _ocsd_stm_pkt
ocsd_stm_pkt_type type
 
uint8_t master
 
uint16_t channel
 
uint64_t timestamp
 
uint8_t pkt_ts_bits
 
uint8_t pkt_has_ts
 
ocsd_stm_ts_type ts_type
 
uint8_t pkt_has_marker
 
union {
   uint8_t   D8
 
   uint16_t   D16
 
   uint32_t   D32
 
   uint64_t   D64
 
payload
 
ocsd_stm_pkt_type err_type
 

Detailed Description

STM trace packet with packet printing functionality.

This class allows for the update and access of the current STM trace packet, implementing the STM protocol rules as appropriate. Maintains the intra packet state as well as updates on a per packet basis.

Based on data structure ocsd_stm_pkt.

Definition at line 53 of file trc_pkt_elem_stm.h.

Constructor & Destructor Documentation

◆ StmTrcPacket()

StmTrcPacket::StmTrcPacket ( )

◆ ~StmTrcPacket()

StmTrcPacket::~StmTrcPacket ( )
inline

Definition at line 57 of file trc_pkt_elem_stm.h.

Member Function Documentation

◆ c_pkt()

virtual const void* StmTrcPacket::c_pkt ( ) const
inlinevirtual

return the underlying C API packet structure

Implements TrcPacketBase.

Definition at line 61 of file trc_pkt_elem_stm.h.

◆ getChannel()

const uint16_t StmTrcPacket::getChannel ( ) const
inline

Definition at line 190 of file trc_pkt_elem_stm.h.

◆ getD16Val()

const uint16_t StmTrcPacket::getD16Val ( ) const
inline

Definition at line 215 of file trc_pkt_elem_stm.h.

◆ getD32Val()

const uint32_t StmTrcPacket::getD32Val ( ) const
inline

Definition at line 220 of file trc_pkt_elem_stm.h.

◆ getD4Val()

const uint8_t StmTrcPacket::getD4Val ( ) const
inline

Definition at line 205 of file trc_pkt_elem_stm.h.

◆ getD64Val()

const uint64_t StmTrcPacket::getD64Val ( ) const
inline

Definition at line 225 of file trc_pkt_elem_stm.h.

◆ getD8Val()

const uint8_t StmTrcPacket::getD8Val ( ) const
inline

Definition at line 210 of file trc_pkt_elem_stm.h.

◆ getMaster()

const uint8_t StmTrcPacket::getMaster ( ) const
inline

Definition at line 185 of file trc_pkt_elem_stm.h.

◆ getPktErrType()

const ocsd_stm_pkt_type StmTrcPacket::getPktErrType ( ) const
inline

Definition at line 180 of file trc_pkt_elem_stm.h.

◆ getPktType()

const ocsd_stm_pkt_type StmTrcPacket::getPktType ( ) const
inline

Definition at line 175 of file trc_pkt_elem_stm.h.

◆ getTSType()

const ocsd_stm_ts_type StmTrcPacket::getTSType ( ) const
inline

Definition at line 195 of file trc_pkt_elem_stm.h.

◆ getTSVal()

const uint64_t StmTrcPacket::getTSVal ( ) const
inline

Definition at line 200 of file trc_pkt_elem_stm.h.

◆ initNextPacket()

void StmTrcPacket::initNextPacket ( )

Initialise state for next packet.

◆ initStartState()

void StmTrcPacket::initStartState ( )

Initialise packet state at start of decoder.

◆ isBadPacket()

const bool StmTrcPacket::isBadPacket ( ) const
inline

Definition at line 230 of file trc_pkt_elem_stm.h.

◆ isMarkerPkt()

const bool StmTrcPacket::isMarkerPkt ( ) const
inline

Definition at line 165 of file trc_pkt_elem_stm.h.

◆ isTSPkt()

const bool StmTrcPacket::isTSPkt ( ) const
inline

Definition at line 170 of file trc_pkt_elem_stm.h.

◆ onVersionPkt()

void StmTrcPacket::onVersionPkt ( const ocsd_stm_ts_type  type)
inline

Definition at line 133 of file trc_pkt_elem_stm.h.

◆ operator=()

StmTrcPacket& StmTrcPacket::operator= ( const ocsd_stm_pkt p_pkt)

◆ setChannel()

void StmTrcPacket::setChannel ( const uint16_t  channel,
const bool  b8Bit 
)
inline

Definition at line 125 of file trc_pkt_elem_stm.h.

◆ setD16Payload()

void StmTrcPacket::setD16Payload ( const uint16_t  value)
inline

Definition at line 150 of file trc_pkt_elem_stm.h.

◆ setD32Payload()

void StmTrcPacket::setD32Payload ( const uint32_t  value)
inline

Definition at line 155 of file trc_pkt_elem_stm.h.

◆ setD4Payload()

void StmTrcPacket::setD4Payload ( const uint8_t  value)
inline

Definition at line 140 of file trc_pkt_elem_stm.h.

◆ setD64Payload()

void StmTrcPacket::setD64Payload ( const uint64_t  value)
inline

Definition at line 160 of file trc_pkt_elem_stm.h.

◆ setD8Payload()

void StmTrcPacket::setD8Payload ( const uint8_t  value)
inline

Definition at line 145 of file trc_pkt_elem_stm.h.

◆ setMaster()

void StmTrcPacket::setMaster ( const uint8_t  master)
inline

Definition at line 119 of file trc_pkt_elem_stm.h.

◆ setPacketType()

void StmTrcPacket::setPacketType ( const ocsd_stm_pkt_type  type,
const bool  bMarker 
)
inline

Definition at line 106 of file trc_pkt_elem_stm.h.

◆ setTS()

void StmTrcPacket::setTS ( const uint64_t  ts_val,
const uint8_t  updatedBits 
)

◆ toString()

virtual void StmTrcPacket::toString ( std::string &  str) const
virtual

Reimplemented from trcPrintableElem.

◆ toStringFmt()

virtual void StmTrcPacket::toStringFmt ( const uint32_t  fmtFlags,
std::string &  str 
) const
virtual

Reimplemented from trcPrintableElem.

◆ updateErrType()

void StmTrcPacket::updateErrType ( const ocsd_stm_pkt_type  err_type)
inline

Definition at line 113 of file trc_pkt_elem_stm.h.


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