TrcPktProcPtm Class Reference
OpenCSD Library : Packet Processors.

`#include <trc_pkt_proc_ptm.h>`

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

## Classes

struct | _pkt_i_table_t

## Public Member Functions

| TrcPktProcPtm ()
| TrcPktProcPtm (int instIDNum)
virtual | ~TrcPktProcPtm ()
Public Member Functions inherited from TrcPktProcBase< PtmTrcPacket, ocsd_ptm_pkt_type, PtmConfig >
| TrcPktProcBase (const char *component_name)
| TrcPktProcBase (const char *component_name, int instIDNum)
virtual | ~TrcPktProcBase ()
virtual ocsd_datapath_resp_t | TraceDataIn (const ocsd_datapath_op_t op, const ocsd_trc_index_t index, const uint32_t dataBlockSize, const uint8_t *pDataBlock, uint32_t *numBytesProcessed)
componentAttachPt< IPktDataIn< PtmTrcPacket > > * | getPacketOutAttachPt ()
| Attachement point for the protocol packet output. More...
componentAttachPt< IPktRawDataMon< PtmTrcPacket > > * | getRawPacketMonAttachPt ()
| Attachment point for the protocol packet monitor. More...
componentAttachPt< ITrcPktIndexer< ocsd_ptm_pkt_type > > * | getTraceIDIndexerAttachPt ()
| Attachment point for a packet indexer. More...
virtual ocsd_err_t | setProtocolConfig (const PtmConfig *config)
| < Set the protocol specific configuration for the decoder. More...
virtual const PtmConfig * | getProtocolConfig () const
Public Member Functions inherited from TrcPktProcI
| TrcPktProcI (const char *component_name)
| TrcPktProcI (const char *component_name, int instIDNum)
virtual | ~TrcPktProcI ()
Public Member Functions inherited from TraceComponent
| TraceComponent (const std::string &name)
| TraceComponent (const std::string &name, int instIDNum)
virtual | ~TraceComponent ()
const std::string & | getComponentName () const
void | setComponentName (const std::string &name)
componentAttachPt< ITraceErrorLog > * | getErrorLogAttachPt ()
ocsd_err_t | setComponentOpMode (uint32_t op_flags)
const uint32_t | getComponentOpMode () const
const uint32_t | getSupportedOpModes () const
void | setAssocComponent (TraceComponent *assocComp)
TraceComponent * | getAssocComponent ()
void | LogDefMessage (const std::string &msg)
Public Member Functions inherited from ITrcDataIn
| ITrcDataIn ()
virtual | ~ITrcDataIn ()

## Protected Types

enum | _process_state { WAIT_SYNC, PROC_HDR, PROC_DATA, SEND_PKT }
enum | _async_result { ASYNC, NOT_ASYNC, ASYNC_EXTRA_0, THROW_0, ASYNC_INCOMPLETE }
typedef enum TrcPktProcPtm::_process_state | process_state
typedef enum TrcPktProcPtm::_async_result | async_result_t
typedef void(TrcPktProcPtm::* | PPKTFN) (void)

## Protected Member Functions

virtual ocsd_datapath_resp_t | processData (const ocsd_trc_index_t index, const uint32_t dataBlockSize, const uint8_t *pDataBlock, uint32_t *numBytesProcessed)
| Implementation function for the OCSD_OP_DATA operation. More...
virtual ocsd_datapath_resp_t | onEOT ()
| Implementation function for the OCSD_OP_EOT operation. More...
virtual ocsd_datapath_resp_t | onReset ()
| Implementation function for the OCSD_OP_RESET operation. More...
virtual ocsd_datapath_resp_t | onFlush ()
| Implementation function for the OCSD_OP_FLUSH operation. More...
virtual ocsd_err_t | onProtocolConfig ()
| Called when the configuration object is passed to the decoder. More...
virtual const bool | isBadPacket () const
| check if the current packet is an error / bad packet More...
void | InitPacketState ()
void | InitProcessorState ()
ocsd_datapath_resp_t | outputPacket ()
const bool | readByte (uint8_t &currByte)
const bool | readByte ()
void | unReadByte ()
const bool | isSync () const
ocsd_datapath_resp_t | waitASync ()
| look for first synchronisation point in the packet stream More...
void | pktASync ()
void | pktISync ()
void | pktTrigger ()
void | pktWPointUpdate ()
void | pktIgnore ()
void | pktCtxtID ()
void | pktVMID ()
void | pktAtom ()
void | pktTimeStamp ()
void | pktExceptionRet ()
void | pktBranchAddr ()
void | pktReserved ()
async_result_t | findAsync ()
void | extractCtxtID (int idx, uint32_t &ctxtID)
void | extractCycleCount (int idx, uint32_t &cycleCount)
int | extractTS (uint64_t &tsVal, uint8_t &tsUpdateBits)
uint32_t | extractAddress (const int offset, uint8_t &total_bits)
void | throwMalformedPacketErr (const char *pszErrMsg)
void | throwPacketHeaderErr (const char *pszErrMsg)
void | BuildIPacketTable ()
Protected Member Functions inherited from TrcPktProcBase< PtmTrcPacket, ocsd_ptm_pkt_type, PtmConfig >
ocsd_datapath_resp_t | outputDecodedPacket (const ocsd_trc_index_t index_sop, const PtmTrcPacket *pkt)
void | outputRawPacketToMonitor (const ocsd_trc_index_t index_sop, const PtmTrcPacket *pkt, const uint32_t size, const uint8_t *p_data)
void | indexPacket (const ocsd_trc_index_t index_sop, const ocsd_ptm_pkt_type *packet_type)
ocsd_datapath_resp_t | outputOnAllInterfaces (const ocsd_trc_index_t index_sop, const PtmTrcPacket *pkt, const ocsd_ptm_pkt_type *pkt_type, std::vector< uint8_t > &pktdata)
ocsd_datapath_resp_t | outputOnAllInterfaces (const ocsd_trc_index_t index_sop, const PtmTrcPacket *pkt, const ocsd_ptm_pkt_type *pkt_type, const uint8_t *pktdata, uint32_t pktlen)
const bool | hasRawMon () const
void | ClearConfigObj ()
const bool | checkInit ()
Protected Member Functions inherited from TraceComponent
void | LogError (const ocsdError &Error)
void | LogMessage (const ocsd_err_severity_t filter_level, const std::string &msg)
const ocsd_err_severity_t | getErrorLogLevel () const
const bool | isLoggingErrorLevel (const ocsd_err_severity_t level) const
void | updateErrorLogLevel ()
void | do_attach_notify (const int num_attached)
void | Init (const std::string &name)

## Protected Attributes

process_state | m_process_state
std::vector< uint8_t > | m_currPacketData
uint32_t | m_currPktIdx
PtmTrcPacket | m_curr_packet
ocsd_trc_index_t | m_curr_pkt_index
uint8_t | m_chanIDCopy
const uint8_t * | m_pDataIn
uint32_t | m_dataInLen
uint32_t | m_dataInProcessed
ocsd_trc_index_t | m_block_idx
bool | m_waitASyncSOPkt
bool | m_bAsyncRawOp
bool | m_bOPNotSyncPkt
| true if output not sync packet when waiting for ASYNC More...
int | m_async_0
bool | m_part_async
int | m_numPktBytesReq
bool | m_needCycleCount
bool | m_gotCycleCount
int | m_gotCCBytes
int | m_numCtxtIDBytes
int | m_gotCtxtIDBytes
bool | m_gotTSBytes
| got all TS bytes More...
int | m_tsByteMax
| max size for TS portion of TS packet. More...
bool | m_gotAddrBytes
| got all Addr bytes in branch packet More...
int | m_numAddrBytes
| number of address bytes More...
bool | m_gotExcepBytes
| got all needed exception bytes More...
int | m_numExcepBytes
| got 1st exception byte More...
ocsd_isa | m_addrPktIsa
| ISA of the branch address packet. More...
int | m_excepAltISA
| Alt ISA bit iff exception bytes. More...
PPKTFN | m_pIPktFn
struct TrcPktProcPtm::_pkt_i_table_t | m_i_table [256]
Protected Attributes inherited from TrcPktProcBase< PtmTrcPacket, ocsd_ptm_pkt_type, PtmConfig >
const PtmConfig * | m_config
Protected Attributes inherited from TraceComponent
uint32_t | m_op_flags
| current component operational mode flags. More...
uint32_t | m_supported_op_flags
| supported component operational mode flags - derived class to intialise. More...

## Detailed Description

Definition at line 52 of file trc_pkt_proc_ptm.h.

## Member Typedef Documentation

## async_result_t

typedef enum TrcPktProcPtm::_async_result TrcPktProcPtm::async_result_t

protected

## PPKTFN

typedef void(TrcPktProcPtm::* TrcPktProcPtm::PPKTFN) (void)

protected

Definition at line 177 of file trc_pkt_proc_ptm.h.

## process_state

typedef enum TrcPktProcPtm::_process_state TrcPktProcPtm::process_state

protected

## Member Enumeration Documentation

## _async_result

enum TrcPktProcPtm::_async_result

protected

Enumerator
ASYNC | pattern confirmed async 0x00 x 5, 0x80
NOT_ASYNC | pattern confirmed not async
ASYNC_EXTRA_0 | pattern confirmed 0x00 x N + ASYNC
THROW_0 | long pattern of 0x00 - throw some away.
ASYNC_INCOMPLETE | not enough input data.

Definition at line 124 of file trc_pkt_proc_ptm.h.

## _process_state

enum TrcPktProcPtm::_process_state

protected

Enumerator
WAIT_SYNC |
PROC_HDR |
PROC_DATA |
SEND_PKT |

Definition at line 76 of file trc_pkt_proc_ptm.h.

## Constructor & Destructor Documentation

## TrcPktProcPtm() [1/2]

TrcPktProcPtm::TrcPktProcPtm | ( |  | ) |

## TrcPktProcPtm() [2/2]

TrcPktProcPtm::TrcPktProcPtm | ( | int | instIDNum | ) |

## ~TrcPktProcPtm()

virtual TrcPktProcPtm::~TrcPktProcPtm | ( |  | ) |

virtual

## Member Function Documentation

## BuildIPacketTable()

void TrcPktProcPtm::BuildIPacketTable | ( |  | ) |

protected

## extractAddress()

uint32_t TrcPktProcPtm::extractAddress | ( | const int | offset,
|  | uint8_t & | total_bits
| ) |  |

protected

## extractCtxtID()

void TrcPktProcPtm::extractCtxtID | ( | int | idx,
|  | uint32_t & | ctxtID
| ) |  |

protected

## extractCycleCount()

void TrcPktProcPtm::extractCycleCount | ( | int | idx,
|  | uint32_t & | cycleCount
| ) |  |

protected

## extractTS()

int TrcPktProcPtm::extractTS | ( | uint64_t & | tsVal,
|  | uint8_t & | tsUpdateBits
| ) |  |

protected

## findAsync()

async_result_t TrcPktProcPtm::findAsync | ( |  | ) |

protected

## InitPacketState()

void TrcPktProcPtm::InitPacketState | ( |  | ) |

protected

## InitProcessorState()

void TrcPktProcPtm::InitProcessorState | ( |  | ) |

protected

## isBadPacket()

virtual const bool TrcPktProcPtm::isBadPacket | ( |  | ) | const

protected virtual

check if the current packet is an error / bad packet

Implements TrcPktProcI.

## onEOT()

virtual ocsd_datapath_resp_t TrcPktProcPtm::onEOT | ( |  | ) |

protected virtual

Implementation function for the OCSD_OP_EOT operation.

Implements TrcPktProcI.

## onFlush()

virtual ocsd_datapath_resp_t TrcPktProcPtm::onFlush | ( |  | ) |

protected virtual

Implementation function for the OCSD_OP_FLUSH operation.

Implements TrcPktProcI.

## onProtocolConfig()

virtual ocsd_err_t TrcPktProcPtm::onProtocolConfig | ( |  | ) |

protected virtual

Called when the configuration object is passed to the decoder.

Implements TrcPktProcI.

## onReset()

virtual ocsd_datapath_resp_t TrcPktProcPtm::onReset | ( |  | ) |

protected virtual

Implementation function for the OCSD_OP_RESET operation.

Implements TrcPktProcI.

## outputPacket()

ocsd_datapath_resp_t TrcPktProcPtm::outputPacket | ( |  | ) |

protected

## pktASync()

void TrcPktProcPtm::pktASync | ( |  | ) |

protected

## pktAtom()

void TrcPktProcPtm::pktAtom | ( |  | ) |

protected

## pktBranchAddr()

void TrcPktProcPtm::pktBranchAddr | ( |  | ) |

protected

## pktCtxtID()

void TrcPktProcPtm::pktCtxtID | ( |  | ) |

protected

## pktExceptionRet()

void TrcPktProcPtm::pktExceptionRet | ( |  | ) |

protected

## pktIgnore()

void TrcPktProcPtm::pktIgnore | ( |  | ) |

protected

## pktISync()

void TrcPktProcPtm::pktISync | ( |  | ) |

protected

## pktReserved()

void TrcPktProcPtm::pktReserved | ( |  | ) |

protected

## pktTimeStamp()

void TrcPktProcPtm::pktTimeStamp | ( |  | ) |

protected

## pktTrigger()

void TrcPktProcPtm::pktTrigger | ( |  | ) |

protected

## pktVMID()

void TrcPktProcPtm::pktVMID | ( |  | ) |

protected

## pktWPointUpdate()

void TrcPktProcPtm::pktWPointUpdate | ( |  | ) |

protected

## processData()

virtual ocsd_datapath_resp_t TrcPktProcPtm::processData | ( | const ocsd_trc_index_t | index,
|  | const uint32_t | dataBlockSize,
|  | const uint8_t * | pDataBlock,
|  | uint32_t * | numBytesProcessed
| ) |  |

protected virtual

Implementation function for the OCSD_OP_DATA operation.

Implements TrcPktProcI.

## readByte()

const bool TrcPktProcPtm::readByte | ( | uint8_t & | currByte | ) |

protected

## unReadByte()

void TrcPktProcPtm::unReadByte | ( |  | ) |

protected

## waitASync()

ocsd_datapath_resp_t TrcPktProcPtm::waitASync | ( |  | ) |

protected

look for first synchronisation point in the packet stream

## Member Data Documentation

## m_addrPktIsa

ocsd_isa TrcPktProcPtm::m_addrPktIsa

protected

ISA of the branch address packet.

Definition at line 168 of file trc_pkt_proc_ptm.h.

## m_async_0

int TrcPktProcPtm::m_async_0

protected

Definition at line 134 of file trc_pkt_proc_ptm.h.

## m_bAsyncRawOp

bool TrcPktProcPtm::m_bAsyncRawOp

protected

Definition at line 106 of file trc_pkt_proc_ptm.h.

## m_block_idx

ocsd_trc_index_t TrcPktProcPtm::m_block_idx

protected

Definition at line 100 of file trc_pkt_proc_ptm.h.

## m_bOPNotSyncPkt

bool TrcPktProcPtm::m_bOPNotSyncPkt

protected

true if output not sync packet when waiting for ASYNC

Definition at line 107 of file trc_pkt_proc_ptm.h.

## m_chanIDCopy

uint8_t TrcPktProcPtm::m_chanIDCopy

protected

Definition at line 94 of file trc_pkt_proc_ptm.h.

## m_curr_packet

PtmTrcPacket TrcPktProcPtm::m_curr_packet

protected

Definition at line 87 of file trc_pkt_proc_ptm.h.

## m_curr_pkt_index

ocsd_trc_index_t TrcPktProcPtm::m_curr_pkt_index

protected

Definition at line 88 of file trc_pkt_proc_ptm.h.

## m_currPacketData

std::vector<uint8_t> TrcPktProcPtm::m_currPacketData

protected

Definition at line 85 of file trc_pkt_proc_ptm.h.

## m_currPktIdx

uint32_t TrcPktProcPtm::m_currPktIdx

protected

Definition at line 86 of file trc_pkt_proc_ptm.h.

## m_dataInLen

uint32_t TrcPktProcPtm::m_dataInLen

protected

Definition at line 98 of file trc_pkt_proc_ptm.h.

## m_dataInProcessed

uint32_t TrcPktProcPtm::m_dataInProcessed

protected

Definition at line 99 of file trc_pkt_proc_ptm.h.

## m_excepAltISA

int TrcPktProcPtm::m_excepAltISA

protected

Alt ISA bit iff exception bytes.

Definition at line 169 of file trc_pkt_proc_ptm.h.

## m_gotAddrBytes

bool TrcPktProcPtm::m_gotAddrBytes

protected

got all Addr bytes in branch packet

Definition at line 164 of file trc_pkt_proc_ptm.h.

## m_gotCCBytes

int TrcPktProcPtm::m_gotCCBytes

protected

Definition at line 155 of file trc_pkt_proc_ptm.h.

## m_gotCtxtIDBytes

int TrcPktProcPtm::m_gotCtxtIDBytes

protected

Definition at line 158 of file trc_pkt_proc_ptm.h.

## m_gotCycleCount

bool TrcPktProcPtm::m_gotCycleCount

protected

Definition at line 154 of file trc_pkt_proc_ptm.h.

## m_gotExcepBytes

bool TrcPktProcPtm::m_gotExcepBytes

protected

got all needed exception bytes

Definition at line 166 of file trc_pkt_proc_ptm.h.

## m_gotTSBytes

bool TrcPktProcPtm::m_gotTSBytes

protected

got all TS bytes

Definition at line 160 of file trc_pkt_proc_ptm.h.

## m_i_table

struct TrcPktProcPtm::_pkt_i_table_t TrcPktProcPtm::m_i_table[256]

protected

## m_needCycleCount

bool TrcPktProcPtm::m_needCycleCount

protected

Definition at line 153 of file trc_pkt_proc_ptm.h.

## m_numAddrBytes

int TrcPktProcPtm::m_numAddrBytes

protected

number of address bytes

Definition at line 165 of file trc_pkt_proc_ptm.h.

## m_numCtxtIDBytes

int TrcPktProcPtm::m_numCtxtIDBytes

protected

Definition at line 157 of file trc_pkt_proc_ptm.h.

## m_numExcepBytes

int TrcPktProcPtm::m_numExcepBytes

protected

got 1st exception byte

Definition at line 167 of file trc_pkt_proc_ptm.h.

## m_numPktBytesReq

int TrcPktProcPtm::m_numPktBytesReq

protected

Definition at line 150 of file trc_pkt_proc_ptm.h.

## m_part_async

bool TrcPktProcPtm::m_part_async

protected

Definition at line 136 of file trc_pkt_proc_ptm.h.

## m_pDataIn

const uint8_t* TrcPktProcPtm::m_pDataIn

protected

Definition at line 97 of file trc_pkt_proc_ptm.h.

## m_pIPktFn

PPKTFN TrcPktProcPtm::m_pIPktFn

protected

Definition at line 178 of file trc_pkt_proc_ptm.h.

## m_process_state

process_state TrcPktProcPtm::m_process_state

protected

Definition at line 83 of file trc_pkt_proc_ptm.h.

## m_tsByteMax

int TrcPktProcPtm::m_tsByteMax

protected

max size for TS portion of TS packet.

Definition at line 161 of file trc_pkt_proc_ptm.h.

## m_waitASyncSOPkt

bool TrcPktProcPtm::m_waitASyncSOPkt

protected

Definition at line 105 of file trc_pkt_proc_ptm.h.

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

- /build/libopencsd-WqHKQU/libopencsd-0.12.2/decoder/include/opencsd/ptm/trc_pkt_proc_ptm.h