Loading...
Searching...
No Matches
TrcMemAccBufPtr Class Reference

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

`#include <trc_mem_acc_bufptr.h>`

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

## Public Member Functions

| TrcMemAccBufPtr (const ocsd_vaddr_t s_address, const uint8_t *p_buffer, const uint32_t size)
| TrcMemAccBufPtr ()
void | initAccessor (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 }
Static Public Member Functions inherited from TrcMemAccessorBase
static void | getMemAccSpaceString (std::string &spaceStr, const ocsd_mem_space_acc_t mem_space)
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() [1/2]

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() [2/2]

TrcMemAccBufPtr::TrcMemAccBufPtr | ( |  | ) |

Default constructor - init later

## ~TrcMemAccBufPtr()

virtual TrcMemAccBufPtr::~TrcMemAccBufPtr | ( |  | ) |

inline virtual

Definition at line 81 of file trc_mem_acc_bufptr.h.

## Member Function Documentation

## initAccessor()

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

## 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:

- /build/libopencsd-8WV101/libopencsd-1.5.5/decoder/include/mem_acc/trc_mem_acc_bufptr.h