ocsd_dcd_mngr.h
Go to the documentation of this file.
/*
* \file ocsd_dcd_mngr.h
* \brief OpenCSD : Decoder manager base class.
*
* \copyright Copyright (c) 2016, ARM Limited. All Rights Reserved.
*/
/*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors
* may be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef ARM_OCSD_DCD_MNGR_H_INCLUDED
#define ARM_OCSD_DCD_MNGR_H_INCLUDED
#include "opencsd/ocsd_if_types.h"
#include "common/ocsd_dcd_mngr_i.h"
#include "common/ocsd_lib_dcd_register.h"
#include "common/trc_pkt_decode_base.h"
#include "common/trc_pkt_proc_base.h"
template <class P, class Pt, class Pc>
class DecoderMngrBase : public IDecoderMngr
{
public:
DecoderMngrBase(const std::string &decoderTypeName, ocsd_trace_protocol_t builtInProtocol);
virtual ~DecoderMngrBase() {};
// create decoder interface.
virtual ocsd_err_t createDecoder(const int create_flags, const int instID, const CSConfig *p_config, TraceComponent **p_component);
virtual ocsd_err_t destroyDecoder(TraceComponent *p_component);
virtual const ocsd_trace_protocol_t getProtocolType() const { return m_builtInProtocol; }
// common
virtual ocsd_err_t attachErrorLogger(TraceComponent *pComponent, ITraceErrorLog *pIErrorLog);
// pkt decoder
virtual ocsd_err_t attachInstrDecoder(TraceComponent *pComponent, IInstrDecode *pIInstrDec);
virtual ocsd_err_t attachMemAccessor(TraceComponent *pComponent, ITargetMemAccess *pMemAccessor);
virtual ocsd_err_t attachOutputSink(TraceComponent *pComponent, ITrcGenElemIn *pOutSink);
// pkt processor
virtual ocsd_err_t attachPktMonitor(TraceComponent *pComponent, ITrcTypedBase *pPktRawDataMon);
virtual ocsd_err_t attachPktIndexer(TraceComponent *pComponent, ITrcTypedBase *pPktIndexer);
virtual ocsd_err_t attachPktSink(TraceComponent *pComponent, ITrcTypedBase *pPktDataInSink);
// data input connection interface
virtual ocsd_err_t getDataInputI(TraceComponent *pComponent, ITrcDataIn **ppDataIn);
// generate a Config object from opaque config struct pointer.
virtual ocsd_err_t createConfigFromDataStruct(CSConfig **pConfigBase, const void *pDataStruct);
// implemented by decoder handler derived classes
virtual TraceComponent *createPktProc(const bool useInstID, const int instID) = 0;
virtual TraceComponent *createPktDecode(const bool useInstID, const int instID) { return 0; };
virtual CSConfig *createConfig(const void *pDataStruct) = 0;
private:
ocsd_trace_protocol_t m_builtInProtocol;
};
template <class P, class Pt, class Pc>
DecoderMngrBase<P,Pt,Pc>::DecoderMngrBase(const std::string &decoderTypeName, ocsd_trace_protocol_t builtInProtocol)
{
OcsdLibDcdRegister *pDcdReg = OcsdLibDcdRegister::getDecoderRegister();
if(pDcdReg)
pDcdReg->registerDecoderTypeByName(decoderTypeName,this);
m_builtInProtocol = builtInProtocol;
}
template <class P, class Pt, class Pc>
ocsd_err_t DecoderMngrBase<P,Pt,Pc>::createDecoder(const int create_flags, const int instID, const CSConfig *pConfig, TraceComponent **ppTrcComp)
{
TraceComponent *pkt_proc = 0;
TraceComponent *pkt_dcd = 0;
bool bUseInstID = (create_flags & OCSD_CREATE_FLG_INST_ID) != 0;
bool bDecoder = (create_flags & OCSD_CREATE_FLG_FULL_DECODER) != 0;
bool bUnConfigured = (pConfig == 0);
const Pc *pConf = dynamic_cast< const Pc * >(pConfig);
// check inputs valid...
if((pConf == 0) && !bUnConfigured)
return OCSD_ERR_INVALID_PARAM_TYPE;
if((create_flags & (OCSD_CREATE_FLG_PACKET_PROC | OCSD_CREATE_FLG_FULL_DECODER)) == 0)
return OCSD_ERR_INVALID_PARAM_VAL;
// always need a packet processor
pkt_proc = createPktProc(bUseInstID, instID);
if(!pkt_proc)
return OCSD_ERR_MEM;
// set the configuration
TrcPktProcBase<P,Pt,Pc> *pProcBase = dynamic_cast< TrcPktProcBase<P,Pt,Pc> *>(pkt_proc);
if(pProcBase == 0)
return OCSD_ERR_INVALID_PARAM_TYPE;
if(!bUnConfigured)
pProcBase->setProtocolConfig(pConf);
*ppTrcComp = pkt_proc;
// may need a packet decoder
if(bDecoder)
{
// create the decoder
pkt_dcd = createPktDecode(bUseInstID, instID);
if(!pkt_dcd)
return OCSD_ERR_MEM;
// get the decoder base
TrcPktDecodeBase<P,Pc> *pBase = dynamic_cast< TrcPktDecodeBase<P,Pc> *>(pkt_dcd);
if(pBase == 0)
return OCSD_ERR_INVALID_PARAM_TYPE;
if(!bUnConfigured)
pBase->setProtocolConfig(pConf);
// associate decoder with packet processor
// -> this means a TraceComponent with an associated component is a packet decoder.
// the associated component is the connected packet processor.
pkt_dcd->setAssocComponent(pkt_proc);
// connect packet processor and decoder
pProcBase->getPacketOutAttachPt()->attach(pBase);
*ppTrcComp = pkt_dcd;
}
return OCSD_OK;
}
template <class P, class Pt, class Pc>
ocsd_err_t DecoderMngrBase<P,Pt,Pc>::destroyDecoder(TraceComponent *pComponent)
{
if(pComponent->getAssocComponent() != 0)
delete pComponent->getAssocComponent();
delete pComponent;
return OCSD_OK;
}
template <class P, class Pt, class Pc>
ocsd_err_t DecoderMngrBase<P,Pt,Pc>::attachErrorLogger(TraceComponent *pComponent, ITraceErrorLog *pIErrorLog)
{
return pComponent->getErrorLogAttachPt()->replace_first(pIErrorLog);
}
template <class P, class Pt, class Pc>
ocsd_err_t DecoderMngrBase<P,Pt,Pc>::attachInstrDecoder(TraceComponent *pComponent, IInstrDecode *pIInstrDec)
{
ocsd_err_t err = OCSD_ERR_DCD_INTERFACE_UNUSED;
if(pComponent->getAssocComponent() == 0) // no associated component - so this is a packet processor
return OCSD_ERR_INVALID_PARAM_TYPE;
TrcPktDecodeI *pDcdI = dynamic_cast< TrcPktDecodeI * >(pComponent);
if(pDcdI == 0)
return OCSD_ERR_INVALID_PARAM_TYPE;
if(pDcdI->getUsesIDecode())
err = pDcdI->getInstrDecodeAttachPt()->replace_first(pIInstrDec);
return err;
}
template <class P, class Pt, class Pc>
ocsd_err_t DecoderMngrBase<P,Pt,Pc>::attachMemAccessor(TraceComponent *pComponent, ITargetMemAccess *pMemAccessor)
{
ocsd_err_t err = OCSD_ERR_DCD_INTERFACE_UNUSED;
if(pComponent->getAssocComponent() == 0) // no associated component - so this is a packet processor
return OCSD_ERR_INVALID_PARAM_TYPE;
TrcPktDecodeI *pDcdI = dynamic_cast< TrcPktDecodeI * >(pComponent);
if(pDcdI == 0)
return OCSD_ERR_INVALID_PARAM_TYPE;
if(pDcdI->getUsesMemAccess())
err = pDcdI->getMemoryAccessAttachPt()->replace_first(pMemAccessor);
return err;
}
template <class P, class Pt, class Pc>
ocsd_err_t DecoderMngrBase<P,Pt,Pc>::attachOutputSink(TraceComponent *pComponent, ITrcGenElemIn *pOutSink)
{
ocsd_err_t err = OCSD_ERR_INVALID_PARAM_TYPE;
if(pComponent->getAssocComponent() == 0) // no associated component - so this is a packet processor
return err;
TrcPktDecodeI *pDcdI = dynamic_cast< TrcPktDecodeI * >(pComponent);
if(pDcdI == 0)
return OCSD_ERR_INVALID_PARAM_TYPE;
err = pDcdI->getTraceElemOutAttachPt()->replace_first(pOutSink);
return err;
}
template <class P, class Pt, class Pc>
ocsd_err_t DecoderMngrBase<P,Pt,Pc>::getDataInputI(TraceComponent *pComponent, ITrcDataIn **ppDataIn)
{
// find the packet processor
TraceComponent *pPktProc = pComponent;
if(pComponent->getAssocComponent() != 0)
pPktProc = pComponent->getAssocComponent();
TrcPktProcI *pPPI = dynamic_cast< TrcPktProcI * >(pPktProc);
if(pPPI == 0)
return OCSD_ERR_INVALID_PARAM_TYPE;
*ppDataIn = pPPI;
return OCSD_OK;
}
template <class P, class Pt, class Pc>
ocsd_err_t DecoderMngrBase<P,Pt,Pc>::attachPktMonitor(TraceComponent *pComponent, ITrcTypedBase *pPktRawDataMon)
{
// find the packet processor
TraceComponent *pPktProc = pComponent;
if(pComponent->getAssocComponent() != 0)
pPktProc = pComponent->getAssocComponent();
// get the packet processor
TrcPktProcBase<P,Pt,Pc> *pPktProcBase = dynamic_cast< TrcPktProcBase<P,Pt,Pc> * >(pPktProc);
if(pPktProcBase == 0)
return OCSD_ERR_INVALID_PARAM_TYPE;
// get the interface
IPktRawDataMon<P> *p_If = dynamic_cast< IPktRawDataMon<P> * >(pPktRawDataMon);
if(p_If == 0)
return OCSD_ERR_INVALID_PARAM_TYPE;
return pPktProcBase->getRawPacketMonAttachPt()->replace_first(p_If);
}
template <class P, class Pt, class Pc>
ocsd_err_t DecoderMngrBase<P,Pt,Pc>::attachPktIndexer(TraceComponent *pComponent, ITrcTypedBase *pPktIndexer)
{
// find the packet processor
TraceComponent *pPktProc = pComponent;
if(pComponent->getAssocComponent() != 0)
pPktProc = pComponent->getAssocComponent();
// get the packet processor
TrcPktProcBase<P,Pt,Pc> *pPktProcBase = dynamic_cast< TrcPktProcBase<P,Pt,Pc> * >(pPktProc);
if(pPktProcBase == 0)
return OCSD_ERR_INVALID_PARAM_TYPE;
// get the interface
ITrcPktIndexer<Pt> *p_If = dynamic_cast< ITrcPktIndexer<Pt> * >(pPktIndexer);
if(p_If == 0)
return OCSD_ERR_INVALID_PARAM_TYPE;
return pPktProcBase->getTraceIDIndexerAttachPt()->replace_first(p_If);
}
template <class P, class Pt, class Pc>
ocsd_err_t DecoderMngrBase<P,Pt,Pc>::attachPktSink(TraceComponent *pComponent, ITrcTypedBase *pPktDataInSink)
{
// must be solo packet processor
if(pComponent->getAssocComponent() != 0)
return OCSD_ERR_INVALID_PARAM_TYPE;
// interface must be the correct one.
IPktDataIn<P> *pkt_in_i = dynamic_cast< IPktDataIn<P> * >(pPktDataInSink);
if(pkt_in_i == 0)
return OCSD_ERR_INVALID_PARAM_TYPE;
// get the packet processor
TrcPktProcBase<P,Pt,Pc> *pPktProcBase = dynamic_cast< TrcPktProcBase<P,Pt,Pc> * >(pComponent);
if(pPktProcBase == 0)
return OCSD_ERR_INVALID_PARAM_TYPE;
// attach
return pPktProcBase->getPacketOutAttachPt()->replace_first(pkt_in_i);
}
template <class P, class Pt, class Pc>
ocsd_err_t DecoderMngrBase<P,Pt,Pc>::createConfigFromDataStruct(CSConfig **pConfigBase, const void *pDataStruct)
{
CSConfig *pConfig = createConfig(pDataStruct);
if(!pConfig)
return OCSD_ERR_MEM;
*pConfigBase = pConfig;
return OCSD_OK;
}
/****************************************************************************************************/
/* Full decoder / packet process pair, templated base for creating decoder objects */
/****************************************************************************************************/
template< class P, // Packet class.
class Pt, // Packet enum type ID.
class Pc, // Processor config class.
class PcSt, // Processor config struct type
class PktProc, // Packet processor class.
class PktDcd> // Packet decoder class.
class DecodeMngrFullDcd : public DecoderMngrBase<P,Pt,Pc>
{
public:
DecodeMngrFullDcd (const std::string &name, ocsd_trace_protocol_t builtInProtocol)
: DecoderMngrBase<P,Pt,Pc>(name,builtInProtocol) {};
virtual ~DecodeMngrFullDcd() {};
virtual TraceComponent *createPktProc(const bool useInstID, const int instID)
{
TraceComponent *pComp;
if(useInstID)
pComp = new (std::nothrow) PktProc(instID);
else
pComp = new (std::nothrow) PktProc();
return pComp;
}
virtual TraceComponent *createPktDecode(const bool useInstID, const int instID)
{
TraceComponent *pComp;
if(useInstID)
pComp = new (std::nothrow)PktDcd(instID);
else
pComp = new (std::nothrow)PktDcd();
return pComp;
}
virtual CSConfig *createConfig(const void *pDataStruct)
{
return new (std::nothrow) Pc((PcSt *)pDataStruct);
}
};
/****************************************************************************************************/
/* Packet processor only, templated base for creating decoder objects */
/****************************************************************************************************/
template< class P, // Packet class.
class Pt, // Packet enum type ID.
class Pc, // Processor config class.
class PcSt, // Processor config struct type
class PktProc> // Packet processor class.
class DecodeMngrPktProc : public DecoderMngrBase<P,Pt,Pc>
{
public:
DecodeMngrPktProc (const std::string &name, ocsd_trace_protocol_t builtInProtocol)
: DecoderMngrBase<P,Pt,Pc>(name,builtInProtocol) {};
virtual ~DecodeMngrPktProc() {};
virtual TraceComponent *createPktProc(const bool useInstID, const int instID)
{
TraceComponent *pComp;
if(useInstID)
pComp = new (std::nothrow) PktProc(instID);
else
pComp = new (std::nothrow) PktProc();
return pComp;
}
virtual CSConfig *createConfig(const void *pDataStruct)
{
return new (std::nothrow) Pc((PcSt *)pDataStruct);
}
};
#endif // ARM_OCSD_DCD_MNGR_H_INCLUDED
/* End of File ocsd_dcd_mngr.h */
TrcPktDecodeI
Definition: trc_pkt_decode_base.h:61
DecodeMngrPktProc::createConfig
virtual CSConfig * createConfig(const void *pDataStruct)
Definition: ocsd_dcd_mngr.h:386
DecoderMngrBase::createConfig
virtual CSConfig * createConfig(const void *pDataStruct)=0
ocsd_err_t
enum _ocsd_err_t ocsd_err_t
OCSD_OK
Definition: ocsd_if_types.h:88
TraceComponent::setAssocComponent
void setAssocComponent(TraceComponent *assocComp)
Definition: trc_component.h:103
DecoderMngrBase::getProtocolType
virtual const ocsd_trace_protocol_t getProtocolType() const
Get the built in protocol type ID managed by this instance - extern for custom decoders.
Definition: ocsd_dcd_mngr.h:55
DecoderMngrBase::attachPktMonitor
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)
Definition: ocsd_dcd_mngr.h:243
DecoderMngrBase::getDataInputI
virtual ocsd_err_t getDataInputI(TraceComponent *pComponent, ITrcDataIn **ppDataIn)
get raw data input interface from packet processor
Definition: ocsd_dcd_mngr.h:226
OCSD_CREATE_FLG_PACKET_PROC
#define OCSD_CREATE_FLG_PACKET_PROC
Definition: ocsd_if_types.h:534
DecoderMngrBase
Definition: ocsd_dcd_mngr.h:45
CSConfig
Base class for configuration data on CoreSight trace component.
Definition: trc_cs_config.h:49
DecoderMngrBase::attachErrorLogger
virtual ocsd_err_t attachErrorLogger(TraceComponent *pComponent, ITraceErrorLog *pIErrorLog)
attach error logger to ptk-processor, or both of pkt processor and pkt decoder pair
Definition: ocsd_dcd_mngr.h:167
DecoderMngrBase::attachInstrDecoder
virtual ocsd_err_t attachInstrDecoder(TraceComponent *pComponent, IInstrDecode *pIInstrDec)
attach instruction decoder to pkt decoder
Definition: ocsd_dcd_mngr.h:173
ITraceErrorLog
Error logging interface.
Definition: trc_error_log_i.h:56
TrcPktProcBase::getTraceIDIndexerAttachPt
componentAttachPt< ITrcPktIndexer< Pt > > * getTraceIDIndexerAttachPt()
Attachment point for a packet indexer.
Definition: trc_pkt_proc_base.h:150
DecodeMngrPktProc::~DecodeMngrPktProc
virtual ~DecodeMngrPktProc()
Definition: ocsd_dcd_mngr.h:374
TrcPktDecodeI::getUsesMemAccess
const bool getUsesMemAccess() const
Definition: trc_pkt_decode_base.h:73
TrcPktDecodeI::getUsesIDecode
const bool getUsesIDecode() const
Definition: trc_pkt_decode_base.h:76
DecoderMngrBase::attachMemAccessor
virtual ocsd_err_t attachMemAccessor(TraceComponent *pComponent, ITargetMemAccess *pMemAccessor)
attach memory accessor to pkt decoder
Definition: ocsd_dcd_mngr.h:191
DecodeMngrFullDcd
Definition: ocsd_dcd_mngr.h:325
TrcPktDecodeI::getMemoryAccessAttachPt
componentAttachPt< ITargetMemAccess > * getMemoryAccessAttachPt()
Definition: trc_pkt_decode_base.h:69
DecodeMngrPktProc::createPktProc
virtual TraceComponent * createPktProc(const bool useInstID, const int instID)
Definition: ocsd_dcd_mngr.h:376
DecoderMngrBase::createDecoder
virtual ocsd_err_t createDecoder(const int create_flags, const int instID, const CSConfig *p_config, TraceComponent **p_component)
Definition: ocsd_dcd_mngr.h:96
TrcPktDecodeBase
Definition: trc_pkt_decode_base.h:180
IPktDataIn
Interface class providing an input for discrete protocol packets.
Definition: trc_pkt_in_i.h:54
TrcPktDecodeI::getTraceElemOutAttachPt
componentAttachPt< ITrcGenElemIn > * getTraceElemOutAttachPt()
Definition: trc_pkt_decode_base.h:68
TrcPktProcBase::getPacketOutAttachPt
componentAttachPt< IPktDataIn< P > > * getPacketOutAttachPt()
Attachement point for the protocol packet output.
Definition: trc_pkt_proc_base.h:145
ocsd_if_types.h
OpenCSD : Standard Types used in the library interfaces.
ITrcGenElemIn
Interface for the input of generic trace elements.
Definition: trc_gen_elem_in_i.h:51
OcsdLibDcdRegister::registerDecoderTypeByName
const ocsd_err_t registerDecoderTypeByName(const std::string &name, IDecoderMngr *p_decoder_fact)
register a decoder manager interface
DecoderMngrBase::createConfigFromDataStruct
virtual ocsd_err_t createConfigFromDataStruct(CSConfig **pConfigBase, const void *pDataStruct)
Definition: ocsd_dcd_mngr.h:306
OcsdLibDcdRegister
Definition: ocsd_lib_dcd_register.h:54
DecodeMngrPktProc::DecodeMngrPktProc
DecodeMngrPktProc(const std::string &name, ocsd_trace_protocol_t builtInProtocol)
Definition: ocsd_dcd_mngr.h:371
DecoderMngrBase::createPktDecode
virtual TraceComponent * createPktDecode(const bool useInstID, const int instID)
Definition: ocsd_dcd_mngr.h:78
OcsdLibDcdRegister::getDecoderRegister
static OcsdLibDcdRegister * getDecoderRegister()
TrcPktProcBase::getRawPacketMonAttachPt
componentAttachPt< IPktRawDataMon< P > > * getRawPacketMonAttachPt()
Attachment point for the protocol packet monitor.
Definition: trc_pkt_proc_base.h:147
DecodeMngrFullDcd::createConfig
virtual CSConfig * createConfig(const void *pDataStruct)
Definition: ocsd_dcd_mngr.h:353
componentAttachPt::replace_first
virtual ocsd_err_t replace_first(T *component)
Definition: comp_attach_pt_t.h:177
IPktRawDataMon
Interface class for packet processor monitor.
Definition: trc_pkt_raw_in_i.h:57
DecodeMngrFullDcd::createPktDecode
virtual TraceComponent * createPktDecode(const bool useInstID, const int instID)
Definition: ocsd_dcd_mngr.h:343
DecoderMngrBase::~DecoderMngrBase
virtual ~DecoderMngrBase()
Definition: ocsd_dcd_mngr.h:49
ITargetMemAccess
Interface to target memory access.
Definition: trc_tgt_mem_access_i.h:56
TrcPktDecodeBase::setProtocolConfig
ocsd_err_t setProtocolConfig(const Pc *config)
Definition: trc_pkt_decode_base.h:272
DecodeMngrFullDcd::~DecodeMngrFullDcd
virtual ~DecodeMngrFullDcd()
Definition: ocsd_dcd_mngr.h:331
DecodeMngrFullDcd::createPktProc
virtual TraceComponent * createPktProc(const bool useInstID, const int instID)
Definition: ocsd_dcd_mngr.h:333
TraceComponent
Base class for all decode components in the library.
Definition: trc_component.h:56
OCSD_CREATE_FLG_FULL_DECODER
#define OCSD_CREATE_FLG_FULL_DECODER
Definition: ocsd_if_types.h:535
OCSD_ERR_MEM
Definition: ocsd_if_types.h:90
IInstrDecode
Interface class to an instruction opcode decoder.
Definition: trc_instr_decode_i.h:47
TrcPktDecodeI::getInstrDecodeAttachPt
componentAttachPt< IInstrDecode > * getInstrDecodeAttachPt()
Definition: trc_pkt_decode_base.h:70
TraceComponent::getErrorLogAttachPt
componentAttachPt< ITraceErrorLog > * getErrorLogAttachPt()
Definition: trc_component.h:67
DecoderMngrBase::DecoderMngrBase
DecoderMngrBase(const std::string &decoderTypeName, ocsd_trace_protocol_t builtInProtocol)
Definition: ocsd_dcd_mngr.h:87
DecoderMngrBase::attachPktSink
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 ...
Definition: ocsd_dcd_mngr.h:285
OCSD_ERR_INVALID_PARAM_VAL
Definition: ocsd_if_types.h:94
TraceComponent::getAssocComponent
TraceComponent * getAssocComponent()
Definition: trc_component.h:111
ITrcTypedBase
Abstract base class to for interfaces templated types.
Definition: trc_abs_typed_base_i.h:49
DecoderMngrBase::createPktProc
virtual TraceComponent * createPktProc(const bool useInstID, const int instID)=0
trc_pkt_decode_base.h
OpenCSD : Trace Packet decoder base class.
OCSD_CREATE_FLG_INST_ID
#define OCSD_CREATE_FLG_INST_ID
Definition: ocsd_if_types.h:536
DecoderMngrBase::attachPktIndexer
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)
Definition: ocsd_dcd_mngr.h:264
OCSD_ERR_INVALID_PARAM_TYPE
Definition: ocsd_if_types.h:95
ITrcPktIndexer
Templated interface class to index packet types.
Definition: trc_indexer_pkt_i.h:60
ocsd_dcd_mngr_i.h
ocsd_lib_dcd_register.h
DecodeMngrFullDcd::DecodeMngrFullDcd
DecodeMngrFullDcd(const std::string &name, ocsd_trace_protocol_t builtInProtocol)
Definition: ocsd_dcd_mngr.h:328
DecoderMngrBase::destroyDecoder
virtual ocsd_err_t destroyDecoder(TraceComponent *p_component)
Definition: ocsd_dcd_mngr.h:158
trc_pkt_proc_base.h
OpenCSD : Trace packet processor base class.
TrcPktProcI
Base Packet processing interface.
Definition: trc_pkt_proc_base.h:64
TrcPktProcBase
Packet Processor base class. Provides common infrastructure and interconnections for packet processor...
Definition: trc_pkt_proc_base.h:123
componentAttachPt::attach
virtual ocsd_err_t attach(T *component)
Definition: comp_attach_pt_t.h:167
IDecoderMngr
Definition: ocsd_dcd_mngr_i.h:49
DecoderMngrBase::attachOutputSink
virtual ocsd_err_t attachOutputSink(TraceComponent *pComponent, ITrcGenElemIn *pOutSink)
attach generic output interface to pkt decoder
Definition: ocsd_dcd_mngr.h:209
TrcPktProcBase::setProtocolConfig
virtual ocsd_err_t setProtocolConfig(const Pc *config)
< Set the protocol specific configuration for the decoder.
Definition: trc_pkt_proc_base.h:372
ocsd_trace_protocol_t
enum _ocsd_trace_protocol_t ocsd_trace_protocol_t
ITrcDataIn
Interface to either trace data frame deformatter or packet processor.
Definition: trc_data_raw_in_i.h:52
DecodeMngrPktProc
Definition: ocsd_dcd_mngr.h:368
OCSD_ERR_DCD_INTERFACE_UNUSED
Definition: ocsd_if_types.h:142