OpenCSD - CoreSight Trace Decode Library
0.12.1
|
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);
126 *ppTrcComp = pkt_proc;
132 pkt_dcd = createPktDecode(bUseInstID, instID);
152 *ppTrcComp = pkt_dcd;
157 template <
class P,
class Pt,
class Pc>
166 template <
class P,
class Pt,
class Pc>
172 template <
class P,
class Pt,
class Pc>
180 TrcPktDecodeI *pDcdI = dynamic_cast< TrcPktDecodeI * >(pComponent);
190 template <
class P,
class Pt,
class Pc>
198 TrcPktDecodeI *pDcdI = dynamic_cast< TrcPktDecodeI * >(pComponent);
208 template <
class P,
class Pt,
class Pc>
216 TrcPktDecodeI *pDcdI = dynamic_cast< TrcPktDecodeI * >(pComponent);
225 template <
class P,
class Pt,
class Pc>
233 TrcPktProcI *pPPI = dynamic_cast< TrcPktProcI * >(pPktProc);
242 template <
class P,
class Pt,
class Pc>
252 if(pPktProcBase == 0)
263 template <
class P,
class Pt,
class Pc>
273 if(pPktProcBase == 0)
284 template <
class P,
class Pt,
class Pc>
298 if(pPktProcBase == 0)
305 template <
class P,
class Pt,
class Pc>
308 CSConfig *pConfig = createConfig(pDataStruct);
311 *pConfigBase = pConfig;
337 pComp =
new (std::nothrow) PktProc(instID);
339 pComp =
new (std::nothrow) PktProc();
347 pComp =
new (std::nothrow)PktDcd(instID);
349 pComp =
new (std::nothrow)PktDcd();
355 return new (std::nothrow) Pc((PcSt *)pDataStruct);
380 pComp =
new (std::nothrow) PktProc(instID);
382 pComp =
new (std::nothrow) PktProc();
388 return new (std::nothrow) Pc((PcSt *)pDataStruct);
394 #endif // ARM_OCSD_DCD_MNGR_H_INCLUDED
virtual CSConfig * createConfig(const void *pDataStruct)
virtual CSConfig * createConfig(const void *pDataStruct)=0
enum _ocsd_err_t ocsd_err_t
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.
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)
Interface class for packet processor monitor.
virtual TraceComponent * createPktDecode(const bool useInstID, const int instID)
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 ...
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)
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
virtual ocsd_err_t setProtocolConfig(const Pc *config)
< Set the protocol specific configuration for the decoder.
enum _ocsd_trace_protocol_t ocsd_trace_protocol_t
Interface to either trace data frame deformatter or packet processor.