Loading...
Searching...
No Matches
TrcPktProcBase< P, Pt, Pc > Class Template Reference
OpenCSD Library : Packet Processors.

Packet Processor base class. Provides common infrastructure and interconnections for packet processors. More...

`#include <trc_pkt_proc_base.h>`

Inheritance diagram for TrcPktProcBase< P, Pt, Pc >:
[legend]
Collaboration diagram for TrcPktProcBase< P, Pt, Pc >:
[legend]

## Public Member Functions

| 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< P > > * | getPacketOutAttachPt ()
| Attachement point for the protocol packet output.
componentAttachPt< IPktRawDataMon< P > > * | getRawPacketMonAttachPt ()
| Attachment point for the protocol packet monitor.
componentAttachPt< ITrcPktIndexer< Pt > > * | getTraceIDIndexerAttachPt ()
| Attachment point for a packet indexer.
virtual ocsd_err_t | setProtocolConfig (const Pc *config)
| < Set the protocol specific configuration for the decoder.
virtual const Pc * | getProtocolConfig () const
virtual ocsd_err_t | getStatsBlock (ocsd_decode_stats_t **pp_stats)
virtual void | resetStats ()
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 Member Functions

ocsd_datapath_resp_t | outputDecodedPacket (const ocsd_trc_index_t index_sop, const P *pkt)
void | outputRawPacketToMonitor (const ocsd_trc_index_t index_sop, const P *pkt, const uint32_t size, const uint8_t *p_data)
void | indexPacket (const ocsd_trc_index_t index_sop, const Pt *packet_type)
ocsd_datapath_resp_t | outputOnAllInterfaces (const ocsd_trc_index_t index_sop, const P *pkt, const Pt *pkt_type, std::vector< uint8_t > &pktdata)
ocsd_datapath_resp_t | outputOnAllInterfaces (const ocsd_trc_index_t index_sop, const P *pkt, const Pt *pkt_type, const uint8_t *pktdata, uint32_t pktlen)
const bool | hasRawMon () const
void | ClearConfigObj ()
const bool | checkInit ()
void | statsAddTotalCount (const uint64_t count)
void | statsAddUnsyncCount (const uint64_t count)
void | statsAddBadSeqCount (const uint32_t count)
void | statsAddBadHdrCount (const uint32_t count)
void | statsInit ()
Protected Member Functions inherited from TrcPktProcI
virtual ocsd_datapath_resp_t | processData (const ocsd_trc_index_t index, const uint32_t dataBlockSize, const uint8_t *pDataBlock, uint32_t *numBytesProcessed)=0
| Implementation function for the OCSD_OP_DATA operation.
virtual ocsd_datapath_resp_t | onEOT ()=0
| Implementation function for the OCSD_OP_EOT operation.
virtual ocsd_datapath_resp_t | onReset ()=0
| Implementation function for the OCSD_OP_RESET operation.
virtual ocsd_datapath_resp_t | onFlush ()=0
| Implementation function for the OCSD_OP_FLUSH operation.
virtual ocsd_err_t | onProtocolConfig ()=0
| Called when the configuration object is passed to the decoder.
virtual const bool | isBadPacket () const =0
| check if the current packet is an error / bad packet
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

const Pc * | m_config
Protected Attributes inherited from TraceComponent
uint32_t | m_op_flags
| current component operational mode flags.
uint32_t | m_supported_op_flags
| supported component operational mode flags - derived class to intialise.

## Detailed Description

template<class P, class Pt, class Pc>
class TrcPktProcBase< P, Pt, Pc >

Packet Processor base class. Provides common infrastructure and interconnections for packet processors.

The class is a templated base class.

- P - this is the packet object class.
- Pt - this is the packet type class.
- Pc - this is the packet configuration class.

implementations will provide concrete classes for each of these to operate under the common infrastructures. The base provides the trace data in (ITrcDataIn) interface and operates on the incoming operation type.

Implementions override the 'onFn()' and data process functions defined in TrcPktProcI, with the base class ensuring consistent ordering of operations.

Definition at line 126 of file trc_pkt_proc_base.h.

## Member Function Documentation

## getPacketOutAttachPt()

template<class P, class Pt, class Pc>

componentAttachPt< IPktDataIn< P > > * TrcPktProcBase< P, Pt, Pc >::getPacketOutAttachPt | ( |  | ) |

inline

Attachement point for the protocol packet output.

Definition at line 148 of file trc_pkt_proc_base.h.

Here is the caller graph for this function:

## getProtocolConfig()

template<class P, class Pt, class Pc>

virtual const Pc * TrcPktProcBase< P, Pt, Pc >::getProtocolConfig | ( |  | ) | const

inline virtual

Definition at line 159 of file trc_pkt_proc_base.h.

## getRawPacketMonAttachPt()

template<class P, class Pt, class Pc>

componentAttachPt< IPktRawDataMon< P > > * TrcPktProcBase< P, Pt, Pc >::getRawPacketMonAttachPt | ( |  | ) |

inline

Attachment point for the protocol packet monitor.

Definition at line 150 of file trc_pkt_proc_base.h.

Here is the caller graph for this function:

## getTraceIDIndexerAttachPt()

template<class P, class Pt, class Pc>

componentAttachPt< ITrcPktIndexer< Pt > > * TrcPktProcBase< P, Pt, Pc >::getTraceIDIndexerAttachPt | ( |  | ) |

inline

Attachment point for a packet indexer.

Definition at line 153 of file trc_pkt_proc_base.h.

Here is the caller graph for this function:

## statsAddBadHdrCount()

template<class P, class Pt, class Pc>

void TrcPktProcBase< P, Pt, Pc >::statsAddBadHdrCount | ( | const uint32_t | count | ) |

inline protected

Definition at line 197 of file trc_pkt_proc_base.h.

## statsAddBadSeqCount()

template<class P, class Pt, class Pc>

void TrcPktProcBase< P, Pt, Pc >::statsAddBadSeqCount | ( | const uint32_t | count | ) |

inline protected

Definition at line 196 of file trc_pkt_proc_base.h.

## statsAddTotalCount()

template<class P, class Pt, class Pc>

void TrcPktProcBase< P, Pt, Pc >::statsAddTotalCount | ( | const uint64_t | count | ) |

inline protected

Definition at line 194 of file trc_pkt_proc_base.h.

## statsAddUnsyncCount()

template<class P, class Pt, class Pc>

void TrcPktProcBase< P, Pt, Pc >::statsAddUnsyncCount | ( | const uint64_t | count | ) |

inline protected

Definition at line 195 of file trc_pkt_proc_base.h.

## statsInit()

template<class P, class Pt, class Pc>

void TrcPktProcBase< P, Pt, Pc >::statsInit | ( |  | ) |

inline protected

Definition at line 198 of file trc_pkt_proc_base.h.

## Member Data Documentation

## m_config

template<class P, class Pt, class Pc>

const Pc* TrcPktProcBase< P, Pt, Pc >::m_config

protected

Definition at line 187 of file trc_pkt_proc_base.h.

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

- /build/libopencsd-wPklVS/libopencsd-1.5.5/decoder/include/common/trc_pkt_proc_base.h