36 #ifndef ARM_TRC_PKT_PROC_BASE_H_INCLUDED 37 #define ARM_TRC_PKT_PROC_BASE_H_INCLUDED 68 TrcPktProcI(
const char *component_name,
int instIDNum);
75 const uint32_t dataBlockSize,
76 const uint8_t *pDataBlock,
77 uint32_t *numBytesProcessed) = 0;
85 const uint32_t dataBlockSize,
86 const uint8_t *pDataBlock,
87 uint32_t *numBytesProcessed) = 0;
122 template <
class P,
class Pt,
class Pc>
137 const uint32_t dataBlockSize,
138 const uint8_t *pDataBlock,
139 uint32_t *numBytesProcessed);
154 virtual ocsd_err_t setProtocolConfig(
const Pc *config);
166 const uint8_t *p_data);
177 const bool hasRawMon()
const;
182 void ClearConfigObj();
184 const bool checkInit();
221 const uint32_t dataBlockSize,
222 const uint8_t *pDataBlock,
223 uint32_t *numBytesProcessed)
230 if((dataBlockSize == 0) || (pDataBlock == 0) || (numBytesProcessed == 0))
232 if(numBytesProcessed)
233 *numBytesProcessed = 0;
238 resp =
processData(index,dataBlockSize,pDataBlock,numBytesProcessed);
294 return (resplocal > resp) ? resplocal : resp;
330 const uint8_t *p_data)
342 m_pkt_raw_mon_i.
first()->RawPacketDataMon(
OCSD_OP_DATA,index_sop,pkt,size,p_data);
354 m_pkt_indexer_i.
first()->TracePktIndex(index_sop,packet_type);
360 if(pktdata.size() > 0)
378 m_config =
new (std::nothrow) Pc(*config);
410 #endif // ARM_TRC_PKT_PROC_BASE_H_INCLUDED
enum _ocsd_datapath_op_t ocsd_datapath_op_t
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
virtual ocsd_datapath_resp_t onFlush()=0
Implementation function for the OCSD_OP_FLUSH operation.
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)=0
ocsd_datapath_resp_t outputOnAllInterfaces(const ocsd_trc_index_t index_sop, const P *pkt, const Pt *pkt_type, std::vector< uint8_t > &pktdata)
enum _ocsd_datapath_resp_t ocsd_datapath_resp_t
TrcPktProcI(const char *component_name)
#define OCSD_DATA_RESP_IS_CONT(x)
const uint32_t getComponentOpMode() const
Packet Processor base class. Provides common infrastructure and interconnections for packet processor...
void outputRawPacketToMonitor(const ocsd_trc_index_t index_sop, const P *pkt, const uint32_t size, const uint8_t *p_data)
virtual const Pc * getProtocolConfig() const
#define OCSD_DATA_RESP_IS_FATAL(x)
Base class for all decode components in the library.
TrcPktProcBase(const char *component_name)
virtual ocsd_datapath_resp_t onEOT()=0
Implementation function for the OCSD_OP_EOT operation.
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.
const bool hasAttached() const
enum _ocsd_err_t ocsd_err_t
#define OCSD_OPFLG_PKTPROC_NOMON_BAD_PKTS
Interface to either trace data frame deformatter or packet processor.
void LogError(const ocsdError &Error)
virtual ~TrcPktProcBase()
virtual ocsd_err_t setProtocolConfig(const Pc *config)
< Set the protocol specific configuration for the decoder.
#define OCSD_OPFLG_PKTPROC_NOFWD_BAD_PKTS
componentAttachPt< IPktRawDataMon< P > > * getRawPacketMonAttachPt()
Attachment point for the protocol packet monitor.
ocsd_datapath_resp_t outputDecodedPacket(const ocsd_trc_index_t index_sop, const P *pkt)
componentAttachPt< IPktDataIn< P > > * getPacketOutAttachPt()
Attachement point for the protocol packet output.
Base Packet processing interface.
const bool hasAttachedAndEnabled() const
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)
Single component interface pointer attachment point.
componentAttachPt< ITrcPktIndexer< Pt > > * getTraceIDIndexerAttachPt()
Attachment point for a packet indexer.
uint32_t ocsd_trc_index_t
void indexPacket(const ocsd_trc_index_t index_sop, const Pt *packet_type)
OpenCSD : Base trace decode component.
const bool hasRawMon() const
OpenCSD : Component attachment point interface class.
virtual ocsd_datapath_resp_t onReset()=0
Implementation function for the OCSD_OP_RESET operation.