35 #ifndef ARM_OCSD_DCD_MNGR_H_INCLUDED 36 #define ARM_OCSD_DCD_MNGR_H_INCLUDED 44 template <
class P,
class Pt,
class Pc>
86 template <
class P,
class Pt,
class Pc>
88 m_builtInProtocol(builtInProtocol)
95 template <
class P,
class Pt,
class Pc>
102 bool bUnConfigured = (pConfig == 0);
104 const Pc *pConf =
dynamic_cast< const Pc *
>(pConfig);
107 if((pConf == 0) && !bUnConfigured)
129 *ppTrcComp = pkt_proc;
158 *ppTrcComp = pkt_dcd;
163 template <
class P,
class Pt,
class Pc>
172 template <
class P,
class Pt,
class Pc>
178 template <
class P,
class Pt,
class Pc>
196 template <
class P,
class Pt,
class Pc>
214 template <
class P,
class Pt,
class Pc>
231 template <
class P,
class Pt,
class Pc>
248 template <
class P,
class Pt,
class Pc>
258 if(pPktProcBase == 0)
269 template <
class P,
class Pt,
class Pc>
279 if(pPktProcBase == 0)
290 template <
class P,
class Pt,
class Pc>
304 if(pPktProcBase == 0)
311 template <
class P,
class Pt,
class Pc>
317 *pConfigBase = pConfig;
343 pComp =
new (std::nothrow) PktProc(instID);
345 pComp =
new (std::nothrow) PktProc();
353 pComp =
new (std::nothrow)PktDcd(instID);
355 pComp =
new (std::nothrow)PktDcd();
361 return new (std::nothrow) Pc((PcSt *)pDataStruct);
385 pComp =
new (std::nothrow) PktProc(instID);
387 pComp =
new (std::nothrow) PktProc();
395 pComp =
new (std::nothrow)PktDcd(instID);
397 pComp =
new (std::nothrow)PktDcd();
403 return new (std::nothrow) PcEx((PcSt *)pDataStruct);
429 pComp =
new (std::nothrow) PktProc(instID);
431 pComp =
new (std::nothrow) PktProc();
437 return new (std::nothrow) Pc((PcSt *)pDataStruct);
443 #endif // ARM_OCSD_DCD_MNGR_H_INCLUDED
DecoderMngrBase(const std::string &decoderTypeName, ocsd_trace_protocol_t builtInProtocol)
DecodeMngrFullDcd(const std::string &name, ocsd_trace_protocol_t builtInProtocol)
DecodeMngrFullDcdExCfg(const std::string &name, ocsd_trace_protocol_t builtInProtocol)
virtual ocsd_err_t attachPktIndexer(TraceComponent *pComponent, ITrcTypedBase *pPktIndexer)
attach a packet indexer to pkt processor (solo pkt processor, or pkt processor part of pair) ...
Interface to target memory access.
Abstract base class to for interfaces templated types.
virtual ocsd_err_t attachPktSink(TraceComponent *pComponent, ITrcTypedBase *pPktDataInSink)
attach a packet data sink to pkt processor output (solo pkt processor only - instead of decoder when ...
DecodeMngrPktProc(const std::string &name, ocsd_trace_protocol_t builtInProtocol)
virtual CSConfig * createConfig(const void *pDataStruct)
virtual ocsd_err_t replace_first(T *component)
virtual ~DecodeMngrFullDcd()
virtual TraceComponent * createPktProc(const bool useInstID, const int instID)
const ocsd_err_t registerDecoderTypeByName(const std::string &name, IDecoderMngr *p_decoder_fact)
register a decoder manager interface
static OcsdLibDcdRegister * getDecoderRegister()
virtual ocsd_err_t destroyDecoder(TraceComponent *p_component)
virtual TraceComponent * createPktProc(const bool useInstID, const int instID)
componentAttachPt< ITrcGenElemIn > * getTraceElemOutAttachPt()
Packet Processor base class. Provides common infrastructure and interconnections for packet processor...
Base class for all decode components in the library.
ocsd_err_t setProtocolConfig(const Pc *config)
Interface class to an instruction opcode decoder.
const bool getUsesMemAccess() const
enum _ocsd_err_t ocsd_err_t
TraceComponent * getAssocComponent()
virtual ocsd_err_t attachPktMonitor(TraceComponent *pComponent, ITrcTypedBase *pPktRawDataMon)
attach a raw packet monitor to pkt processor (solo pkt processor, or pkt processor part of pair) ...
Interface to either trace data frame deformatter or packet processor.
Interface for the input of generic trace elements.
virtual CSConfig * createConfig(const void *pDataStruct)
Templated interface class to index packet types.
virtual TraceComponent * createPktProc(const bool useInstID, const int instID)=0
virtual ~DecodeMngrPktProc()
#define OCSD_OPFLG_PKTPROC_COMMON
const bool getUsesIDecode() const
virtual ocsd_err_t setProtocolConfig(const Pc *config)
< Set the protocol specific configuration for the decoder.
virtual ocsd_err_t createConfigFromDataStruct(CSConfig **pConfigBase, const void *pDataStruct)
OpenCSD : Trace Packet decoder base class.
#define OCSD_CREATE_FLG_PACKET_PROC
componentAttachPt< IPktRawDataMon< P > > * getRawPacketMonAttachPt()
Attachment point for the protocol packet monitor.
componentAttachPt< IInstrDecode > * getInstrDecodeAttachPt()
componentAttachPt< IPktDataIn< P > > * getPacketOutAttachPt()
Attachement point for the protocol packet output.
virtual ocsd_err_t getDataInputI(TraceComponent *pComponent, ITrcDataIn **ppDataIn)
get raw data input interface from packet processor
ocsd_err_t setComponentOpMode(uint32_t op_flags)
#define OCSD_OPFLG_COMP_MODE_MASK
virtual ocsd_err_t attachErrorLogger(TraceComponent *pComponent, ITraceErrorLog *pIErrorLog)
attach error logger to ptk-processor, or both of pkt processor and pkt decoder pair ...
Base class for configuration data on CoreSight trace component.
virtual ocsd_err_t attachInstrDecoder(TraceComponent *pComponent, IInstrDecode *pIInstrDec)
attach instruction decoder to pkt decoder
Base Packet processing interface.
virtual const ocsd_trace_protocol_t getProtocolType() const
Get the built in protocol type ID managed by this instance - extern for custom decoders.
virtual ~DecodeMngrFullDcdExCfg()
virtual ocsd_err_t attachMemAccessor(TraceComponent *pComponent, ITargetMemAccess *pMemAccessor)
attach memory accessor to pkt decoder
Error logging interface.This class provides a standard interface to the decoder error logger for all ...
virtual TraceComponent * createPktProc(const bool useInstID, const int instID)
virtual TraceComponent * createPktDecode(const bool useInstID, const int instID)
virtual ocsd_err_t attachOutputSink(TraceComponent *pComponent, ITrcGenElemIn *pOutSink)
attach generic output interface to pkt decoder
componentAttachPt< ITrcPktIndexer< Pt > > * getTraceIDIndexerAttachPt()
Attachment point for a packet indexer.
virtual ocsd_err_t createDecoder(const int create_flags, const int instID, const CSConfig *p_config, TraceComponent **p_component)
virtual CSConfig * createConfig(const void *pDataStruct)
OpenCSD : Standard Types used in the library interfaces.
#define OCSD_OPFLG_PKTDEC_COMMON
Interface class providing an input for discrete protocol packets.
virtual TraceComponent * createPktDecode(const bool useInstID, const int instID)
virtual TraceComponent * createPktDecode(const bool useInstID, const int instID)
enum _ocsd_trace_protocol_t ocsd_trace_protocol_t
void setAssocComponent(TraceComponent *assocComp)
virtual ocsd_err_t attach(T *component)
OpenCSD : Trace packet processor base class.
#define OCSD_CREATE_FLG_INST_ID
#define OCSD_CREATE_FLG_FULL_DECODER
componentAttachPt< ITraceErrorLog > * getErrorLogAttachPt()
virtual CSConfig * createConfig(const void *pDataStruct)=0
componentAttachPt< ITargetMemAccess > * getMemoryAccessAttachPt()
Interface class for packet processor monitor.
virtual ~DecoderMngrBase()