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

Trace memory accessor for a memory buffer. More...

#include <trc_mem_acc_bufptr.h>

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

Public Member Functions

 TrcMemAccBufPtr (const ocsd_vaddr_t s_address, const uint8_t *p_buffer, const uint32_t size)
 
virtual ~TrcMemAccBufPtr ()
 
virtual const uint32_t readBytes (const ocsd_vaddr_t address, const ocsd_mem_space_acc_t memSpace, const uint8_t trcID, const uint32_t reqBytes, uint8_t *byteBuffer)
 
- Public Member Functions inherited from TrcMemAccessorBase
 TrcMemAccessorBase (MemAccTypes type)
 
 TrcMemAccessorBase (MemAccTypes type, ocsd_vaddr_t startAddr, ocsd_vaddr_t endAddr)
 
virtual ~TrcMemAccessorBase ()
 
void setRange (ocsd_vaddr_t startAddr, ocsd_vaddr_t endAddr)
 
virtual const bool addrInRange (const ocsd_vaddr_t s_address) const
 
virtual const bool addrStartOfRange (const ocsd_vaddr_t s_address) const
 
virtual const uint32_t bytesInRange (const ocsd_vaddr_t s_address, const uint32_t reqBytes) const
 
virtual const bool overLapRange (const TrcMemAccessorBase *p_test_acc) const
 
virtual const bool validateRange ()
 
enum MemAccTypes getType () const
 
void setMemSpace (ocsd_mem_space_acc_t memSpace)
 
const ocsd_mem_space_acc_t getMemSpace () const
 
const bool inMemSpace (const ocsd_mem_space_acc_t mem_space) const
 
virtual void getMemAccString (std::string &accStr) const
 

Additional Inherited Members

- Public Types inherited from TrcMemAccessorBase
enum  MemAccTypes { MEMACC_UNKNOWN , MEMACC_FILE , MEMACC_BUFPTR , MEMACC_CB_IF }
 
- Protected Attributes inherited from TrcMemAccessorBase
ocsd_vaddr_t m_startAddress
 
ocsd_vaddr_t m_endAddress
 
const MemAccTypes m_type
 
ocsd_mem_space_acc_t m_mem_space
 

Detailed Description

Trace memory accessor for a memory buffer.

Wraps a memory buffer in an memory range accessor object. Takes a copy of the buffer pointer which must remain valid for the lifetime of the object.

Definition at line 49 of file trc_mem_acc_bufptr.h.

Constructor & Destructor Documentation

◆ TrcMemAccBufPtr()

TrcMemAccBufPtr::TrcMemAccBufPtr ( const ocsd_vaddr_t  s_address,
const uint8_t *  p_buffer,
const uint32_t  size 
)

Construct the accessor. uses the start address as the start of range and calculates the end address according to the buffer size

Parameters
s_address: Start address in memory map represented by the data in the buffer.
*p_buffer: pointer to a buffer of binary data.
size: size of the buffer.

◆ ~TrcMemAccBufPtr()

virtual TrcMemAccBufPtr::~TrcMemAccBufPtr ( )
inlinevirtual

Definition at line 64 of file trc_mem_acc_bufptr.h.

Member Function Documentation

◆ readBytes()

virtual const uint32_t TrcMemAccBufPtr::readBytes ( const ocsd_vaddr_t  address,
const ocsd_mem_space_acc_t  memSpace,
const uint8_t  trcID,
const uint32_t  reqBytes,
uint8_t *  byteBuffer 
)
virtual

default destructor Memory access override - allow decoder to read bytes from the buffer.

Implements TrcMemAccessorBase.


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