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)
114 pkt_proc = createPktProc(bUseInstID, instID);
129 *ppTrcComp = pkt_proc;
135 pkt_dcd = createPktDecode(bUseInstID, instID);
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>
314 CSConfig *pConfig = createConfig(pDataStruct);
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);
Base class for configuration data on CoreSight trace component.
DecodeMngrFullDcdExCfg(const std::string &name, ocsd_trace_protocol_t builtInProtocol)
virtual TraceComponent * createPktDecode(const bool useInstID, const int instID)
virtual ~DecodeMngrFullDcdExCfg()
virtual TraceComponent * createPktProc(const bool useInstID, const int instID)
virtual CSConfig * createConfig(const void *pDataStruct)
DecodeMngrFullDcd(const std::string &name, ocsd_trace_protocol_t builtInProtocol)
virtual CSConfig * createConfig(const void *pDataStruct)
virtual TraceComponent * createPktProc(const bool useInstID, const int instID)
virtual ~DecodeMngrFullDcd()
virtual TraceComponent * createPktDecode(const bool useInstID, const int instID)
virtual TraceComponent * createPktProc(const bool useInstID, const int instID)
virtual ~DecodeMngrPktProc()
DecodeMngrPktProc(const std::string &name, ocsd_trace_protocol_t builtInProtocol)
virtual CSConfig * createConfig(const void *pDataStruct)
virtual TraceComponent * createPktDecode(const bool useInstID, const int instID)
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)
virtual const ocsd_trace_protocol_t getProtocolType() const
Get the built in protocol type ID managed by this instance - extern for custom decoders.
virtual ocsd_err_t getDataInputI(TraceComponent *pComponent, ITrcDataIn **ppDataIn)
get raw data input interface from packet processor
virtual ocsd_err_t destroyDecoder(TraceComponent *p_component)
DecoderMngrBase(const std::string &decoderTypeName, ocsd_trace_protocol_t builtInProtocol)
virtual ocsd_err_t attachOutputSink(TraceComponent *pComponent, ITrcGenElemIn *pOutSink)
attach generic output interface to pkt decoder
virtual ~DecoderMngrBase()
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 ...
virtual ocsd_err_t attachErrorLogger(TraceComponent *pComponent, ITraceErrorLog *pIErrorLog)
attach error logger to ptk-processor, or both of pkt processor and pkt decoder pair
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)
virtual ocsd_err_t attachMemAccessor(TraceComponent *pComponent, ITargetMemAccess *pMemAccessor)
attach memory accessor to pkt decoder
virtual ocsd_err_t createConfigFromDataStruct(CSConfig **pConfigBase, const void *pDataStruct)
virtual ocsd_err_t attachInstrDecoder(TraceComponent *pComponent, IInstrDecode *pIInstrDec)
attach instruction decoder to pkt decoder
virtual TraceComponent * createPktProc(const bool useInstID, const int instID)=0
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)=0
Interface class to an instruction opcode decoder.
Interface class providing an input for discrete protocol packets.
Interface class for packet processor monitor.
Interface to target memory access.
Interface to either trace data frame deformatter or packet processor.
Interface for the input of generic trace elements.
Templated interface class to index packet types.
Abstract base class to for interfaces templated types.
const ocsd_err_t registerDecoderTypeByName(const std::string &name, IDecoderMngr *p_decoder_fact)
register a decoder manager interface
static OcsdLibDcdRegister * getDecoderRegister()
Base class for all decode components in the library.
componentAttachPt< ITraceErrorLog > * getErrorLogAttachPt()
TraceComponent * getAssocComponent()
ocsd_err_t setComponentOpMode(uint32_t op_flags)
void setAssocComponent(TraceComponent *assocComp)
componentAttachPt< IInstrDecode > * getInstrDecodeAttachPt()
const bool getUsesIDecode() const
const bool getUsesMemAccess() const
componentAttachPt< ITrcGenElemIn > * getTraceElemOutAttachPt()
componentAttachPt< ITargetMemAccess > * getMemoryAccessAttachPt()
Packet Processor base class. Provides common infrastructure and interconnections for packet processor...
componentAttachPt< IPktRawDataMon< P > > * getRawPacketMonAttachPt()
Attachment point for the protocol packet monitor.
componentAttachPt< IPktDataIn< P > > * getPacketOutAttachPt()
Attachement point for the protocol packet output.
componentAttachPt< ITrcPktIndexer< Pt > > * getTraceIDIndexerAttachPt()
Attachment point for a packet indexer.
Base Packet processing interface.
virtual ocsd_err_t replace_first(T *component)
virtual ocsd_err_t attach(T *component)
#define OCSD_OPFLG_PKTPROC_COMMON
enum _ocsd_trace_protocol_t ocsd_trace_protocol_t
#define OCSD_CREATE_FLG_FULL_DECODER
#define OCSD_OPFLG_COMP_MODE_MASK
#define OCSD_OPFLG_PKTDEC_COMMON
#define OCSD_CREATE_FLG_INST_ID
#define OCSD_CREATE_FLG_PACKET_PROC
enum _ocsd_err_t ocsd_err_t
@ OCSD_ERR_DCD_INTERFACE_UNUSED
@ OCSD_ERR_INVALID_PARAM_VAL
@ OCSD_ERR_INVALID_PARAM_TYPE
ocsd_err_t setProtocolConfig(const Pc *config)
virtual ocsd_err_t setProtocolConfig(const Pc *config)
< Set the protocol specific configuration for the decoder.
OpenCSD : Standard Types used in the library interfaces.
OpenCSD : Trace Packet decoder base class.
OpenCSD : Trace packet processor base class.