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