OpenCSD - CoreSight Trace Decode Library  0.14.4
ocsd_dcd_mngr.h
Go to the documentation of this file.
1 /*
2  * \file ocsd_dcd_mngr.h
3  * \brief OpenCSD : Decoder manager base class.
4  *
5  * \copyright Copyright (c) 2016, ARM Limited. All Rights Reserved.
6  */
7 
8 /*
9  * Redistribution and use in source and binary forms, with or without modification,
10  * are permitted provided that the following conditions are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright notice,
13  * this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright notice,
16  * this list of conditions and the following disclaimer in the documentation
17  * and/or other materials provided with the distribution.
18  *
19  * 3. Neither the name of the copyright holder nor the names of its contributors
20  * may be used to endorse or promote products derived from this software without
21  * specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
24  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
26  * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
27  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33  */
34 
35 #ifndef ARM_OCSD_DCD_MNGR_H_INCLUDED
36 #define ARM_OCSD_DCD_MNGR_H_INCLUDED
37 
38 #include "opencsd/ocsd_if_types.h"
39 #include "common/ocsd_dcd_mngr_i.h"
43 
44 template <class P, class Pt, class Pc>
46 {
47 public:
48  DecoderMngrBase(const std::string &decoderTypeName, ocsd_trace_protocol_t builtInProtocol);
49  virtual ~DecoderMngrBase() {};
50 
51  // create decoder interface.
52  virtual ocsd_err_t createDecoder(const int create_flags, const int instID, const CSConfig *p_config, TraceComponent **p_component);
53  virtual ocsd_err_t destroyDecoder(TraceComponent *p_component);
54 
55  virtual const ocsd_trace_protocol_t getProtocolType() const { return m_builtInProtocol; }
56 
57 // common
58  virtual ocsd_err_t attachErrorLogger(TraceComponent *pComponent, ITraceErrorLog *pIErrorLog);
59 
60 // pkt decoder
61  virtual ocsd_err_t attachInstrDecoder(TraceComponent *pComponent, IInstrDecode *pIInstrDec);
62  virtual ocsd_err_t attachMemAccessor(TraceComponent *pComponent, ITargetMemAccess *pMemAccessor);
63  virtual ocsd_err_t attachOutputSink(TraceComponent *pComponent, ITrcGenElemIn *pOutSink);
64 
65 // pkt processor
66  virtual ocsd_err_t attachPktMonitor(TraceComponent *pComponent, ITrcTypedBase *pPktRawDataMon);
67  virtual ocsd_err_t attachPktIndexer(TraceComponent *pComponent, ITrcTypedBase *pPktIndexer);
68  virtual ocsd_err_t attachPktSink(TraceComponent *pComponent, ITrcTypedBase *pPktDataInSink);
69 
70 // data input connection interface
71  virtual ocsd_err_t getDataInputI(TraceComponent *pComponent, ITrcDataIn **ppDataIn);
72 
73 // generate a Config object from opaque config struct pointer.
74  virtual ocsd_err_t createConfigFromDataStruct(CSConfig **pConfigBase, const void *pDataStruct);
75 
76 // implemented by decoder handler derived classes
77  virtual TraceComponent *createPktProc(const bool useInstID, const int instID) = 0;
78  virtual TraceComponent *createPktDecode(const bool useInstID, const int instID) { return 0; };
79  virtual CSConfig *createConfig(const void *pDataStruct) = 0;
80 
81 
82 private:
83  ocsd_trace_protocol_t m_builtInProtocol;
84 };
85 
86 template <class P, class Pt, class Pc>
87 DecoderMngrBase<P,Pt,Pc>::DecoderMngrBase(const std::string &decoderTypeName, ocsd_trace_protocol_t builtInProtocol)
88 {
90  if(pDcdReg)
91  pDcdReg->registerDecoderTypeByName(decoderTypeName,this);
92  m_builtInProtocol = builtInProtocol;
93 }
94 
95 template <class P, class Pt, class Pc>
96 ocsd_err_t DecoderMngrBase<P,Pt,Pc>::createDecoder(const int create_flags, const int instID, const CSConfig *pConfig, TraceComponent **ppTrcComp)
97 {
98  TraceComponent *pkt_proc = 0;
99  TraceComponent *pkt_dcd = 0;
100  bool bUseInstID = (create_flags & OCSD_CREATE_FLG_INST_ID) != 0;
101  bool bDecoder = (create_flags & OCSD_CREATE_FLG_FULL_DECODER) != 0;
102  bool bUnConfigured = (pConfig == 0);
103 
104  const Pc *pConf = dynamic_cast< const Pc * >(pConfig);
105 
106  // check inputs valid...
107  if((pConf == 0) && !bUnConfigured)
109 
110  if((create_flags & (OCSD_CREATE_FLG_PACKET_PROC | OCSD_CREATE_FLG_FULL_DECODER)) == 0)
112 
113  // always need a packet processor
114  pkt_proc = createPktProc(bUseInstID, instID);
115  if(!pkt_proc)
116  return OCSD_ERR_MEM;
117 
118  // set the op mode flags
120 
121  // set the configuration
122  TrcPktProcBase<P,Pt,Pc> *pProcBase = dynamic_cast< TrcPktProcBase<P,Pt,Pc> *>(pkt_proc);
123  if(pProcBase == 0)
125 
126  if(!bUnConfigured)
127  pProcBase->setProtocolConfig(pConf);
128 
129  *ppTrcComp = pkt_proc;
130 
131  // may need a packet decoder
132  if(bDecoder)
133  {
134  // create the decoder
135  pkt_dcd = createPktDecode(bUseInstID, instID);
136  if(!pkt_dcd)
137  return OCSD_ERR_MEM;
138 
139  // set the op mode flags
141 
142  // get the decoder base
143  TrcPktDecodeBase<P,Pc> *pBase = dynamic_cast< TrcPktDecodeBase<P,Pc> *>(pkt_dcd);
144  if(pBase == 0)
146 
147  if(!bUnConfigured)
148  pBase->setProtocolConfig(pConf);
149 
150  // associate decoder with packet processor
151  // -> this means a TraceComponent with an associated component is a packet decoder.
152  // the associated component is the connected packet processor.
153  pkt_dcd->setAssocComponent(pkt_proc);
154 
155  // connect packet processor and decoder
156  pProcBase->getPacketOutAttachPt()->attach(pBase);
157 
158  *ppTrcComp = pkt_dcd;
159  }
160  return OCSD_OK;
161 }
162 
163 template <class P, class Pt, class Pc>
165 {
166  if(pComponent->getAssocComponent() != 0)
167  delete pComponent->getAssocComponent();
168  delete pComponent;
169  return OCSD_OK;
170 }
171 
172 template <class P, class Pt, class Pc>
174 {
175  return pComponent->getErrorLogAttachPt()->replace_first(pIErrorLog);
176 }
177 
178 template <class P, class Pt, class Pc>
180 {
182 
183  if(pComponent->getAssocComponent() == 0) // no associated component - so this is a packet processor
185 
186  TrcPktDecodeI *pDcdI = dynamic_cast< TrcPktDecodeI * >(pComponent);
187  if(pDcdI == 0)
189 
190  if(pDcdI->getUsesIDecode())
191  err = pDcdI->getInstrDecodeAttachPt()->replace_first(pIInstrDec);
192 
193  return err;
194 }
195 
196 template <class P, class Pt, class Pc>
198 {
200 
201  if(pComponent->getAssocComponent() == 0) // no associated component - so this is a packet processor
203 
204  TrcPktDecodeI *pDcdI = dynamic_cast< TrcPktDecodeI * >(pComponent);
205  if(pDcdI == 0)
207 
208  if(pDcdI->getUsesMemAccess())
209  err = pDcdI->getMemoryAccessAttachPt()->replace_first(pMemAccessor);
210 
211  return err;
212 }
213 
214 template <class P, class Pt, class Pc>
216 {
218 
219  if(pComponent->getAssocComponent() == 0) // no associated component - so this is a packet processor
220  return err;
221 
222  TrcPktDecodeI *pDcdI = dynamic_cast< TrcPktDecodeI * >(pComponent);
223  if(pDcdI == 0)
225 
226  err = pDcdI->getTraceElemOutAttachPt()->replace_first(pOutSink);
227 
228  return err;
229 }
230 
231 template <class P, class Pt, class Pc>
233 {
234  // find the packet processor
235  TraceComponent *pPktProc = pComponent;
236  if(pComponent->getAssocComponent() != 0)
237  pPktProc = pComponent->getAssocComponent();
238 
239  TrcPktProcI *pPPI = dynamic_cast< TrcPktProcI * >(pPktProc);
240  if(pPPI == 0)
242 
243  *ppDataIn = pPPI;
244 
245  return OCSD_OK;
246 }
247 
248 template <class P, class Pt, class Pc>
250 {
251  // find the packet processor
252  TraceComponent *pPktProc = pComponent;
253  if(pComponent->getAssocComponent() != 0)
254  pPktProc = pComponent->getAssocComponent();
255 
256  // get the packet processor
257  TrcPktProcBase<P,Pt,Pc> *pPktProcBase = dynamic_cast< TrcPktProcBase<P,Pt,Pc> * >(pPktProc);
258  if(pPktProcBase == 0)
260 
261  // get the interface
262  IPktRawDataMon<P> *p_If = dynamic_cast< IPktRawDataMon<P> * >(pPktRawDataMon);
263  if(p_If == 0)
265 
266  return pPktProcBase->getRawPacketMonAttachPt()->replace_first(p_If);
267 }
268 
269 template <class P, class Pt, class Pc>
271 {
272  // find the packet processor
273  TraceComponent *pPktProc = pComponent;
274  if(pComponent->getAssocComponent() != 0)
275  pPktProc = pComponent->getAssocComponent();
276 
277  // get the packet processor
278  TrcPktProcBase<P,Pt,Pc> *pPktProcBase = dynamic_cast< TrcPktProcBase<P,Pt,Pc> * >(pPktProc);
279  if(pPktProcBase == 0)
281 
282  // get the interface
283  ITrcPktIndexer<Pt> *p_If = dynamic_cast< ITrcPktIndexer<Pt> * >(pPktIndexer);
284  if(p_If == 0)
286 
287  return pPktProcBase->getTraceIDIndexerAttachPt()->replace_first(p_If);
288 }
289 
290 template <class P, class Pt, class Pc>
292 {
293  // must be solo packet processor
294  if(pComponent->getAssocComponent() != 0)
296 
297  // interface must be the correct one.
298  IPktDataIn<P> *pkt_in_i = dynamic_cast< IPktDataIn<P> * >(pPktDataInSink);
299  if(pkt_in_i == 0)
301 
302  // get the packet processor
303  TrcPktProcBase<P,Pt,Pc> *pPktProcBase = dynamic_cast< TrcPktProcBase<P,Pt,Pc> * >(pComponent);
304  if(pPktProcBase == 0)
306 
307  // attach
308  return pPktProcBase->getPacketOutAttachPt()->replace_first(pkt_in_i);
309 }
310 
311 template <class P, class Pt, class Pc>
313 {
314  CSConfig *pConfig = createConfig(pDataStruct);
315  if(!pConfig)
316  return OCSD_ERR_MEM;
317  *pConfigBase = pConfig;
318  return OCSD_OK;
319 }
320 
321 /****************************************************************************************************/
322 /* Full decoder / packet process pair, templated base for creating decoder objects */
323 /****************************************************************************************************/
324 
325 template< class P, // Packet class.
326  class Pt, // Packet enum type ID.
327  class Pc, // Processor config class.
328  class PcSt, // Processor config struct type
329  class PktProc, // Packet processor class.
330  class PktDcd> // Packet decoder class.
331 class DecodeMngrFullDcd : public DecoderMngrBase<P,Pt,Pc>
332 {
333 public:
334  DecodeMngrFullDcd (const std::string &name, ocsd_trace_protocol_t builtInProtocol)
335  : DecoderMngrBase<P,Pt,Pc>(name,builtInProtocol) {};
336 
337  virtual ~DecodeMngrFullDcd() {};
338 
339  virtual TraceComponent *createPktProc(const bool useInstID, const int instID)
340  {
341  TraceComponent *pComp;
342  if(useInstID)
343  pComp = new (std::nothrow) PktProc(instID);
344  else
345  pComp = new (std::nothrow) PktProc();
346  return pComp;
347  }
348 
349  virtual TraceComponent *createPktDecode(const bool useInstID, const int instID)
350  {
351  TraceComponent *pComp;
352  if(useInstID)
353  pComp = new (std::nothrow)PktDcd(instID);
354  else
355  pComp = new (std::nothrow)PktDcd();
356  return pComp;
357  }
358 
359  virtual CSConfig *createConfig(const void *pDataStruct)
360  {
361  return new (std::nothrow) Pc((PcSt *)pDataStruct);
362  }
363 };
364 
365 /****************************************************************************************************/
366 /* Packet processor only, templated base for creating decoder objects */
367 /****************************************************************************************************/
368 
369 template< class P, // Packet class.
370  class Pt, // Packet enum type ID.
371  class Pc, // Processor config class.
372  class PcSt, // Processor config struct type
373  class PktProc> // Packet processor class.
374 class DecodeMngrPktProc : public DecoderMngrBase<P,Pt,Pc>
375 {
376 public:
377  DecodeMngrPktProc (const std::string &name, ocsd_trace_protocol_t builtInProtocol)
378  : DecoderMngrBase<P,Pt,Pc>(name,builtInProtocol) {};
379 
380  virtual ~DecodeMngrPktProc() {};
381 
382  virtual TraceComponent *createPktProc(const bool useInstID, const int instID)
383  {
384  TraceComponent *pComp;
385  if(useInstID)
386  pComp = new (std::nothrow) PktProc(instID);
387  else
388  pComp = new (std::nothrow) PktProc();
389  return pComp;
390  }
391 
392  virtual CSConfig *createConfig(const void *pDataStruct)
393  {
394  return new (std::nothrow) Pc((PcSt *)pDataStruct);
395  }
396 };
397 
398 
399 
400 #endif // ARM_OCSD_DCD_MNGR_H_INCLUDED
401 
402 /* End of File ocsd_dcd_mngr.h */
TrcPktDecodeI
Definition: trc_pkt_decode_base.h:62
DecodeMngrPktProc::createConfig
virtual CSConfig * createConfig(const void *pDataStruct)
Definition: ocsd_dcd_mngr.h:392
DecoderMngrBase::createConfig
virtual CSConfig * createConfig(const void *pDataStruct)=0
OCSD_OK
@ 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
OCSD_OPFLG_COMP_MODE_MASK
#define OCSD_OPFLG_COMP_MODE_MASK
Definition: ocsd_if_types.h:514
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:249
DecoderMngrBase::getDataInputI
virtual ocsd_err_t getDataInputI(TraceComponent *pComponent, ITrcDataIn **ppDataIn)
get raw data input interface from packet processor
Definition: ocsd_dcd_mngr.h:232
OCSD_CREATE_FLG_PACKET_PROC
#define OCSD_CREATE_FLG_PACKET_PROC
Definition: ocsd_if_types.h:541
DecoderMngrBase
Definition: ocsd_dcd_mngr.h:46
CSConfig
Base class for configuration data on CoreSight trace component.
Definition: trc_cs_config.h:50
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:173
DecoderMngrBase::attachInstrDecoder
virtual ocsd_err_t attachInstrDecoder(TraceComponent *pComponent, IInstrDecode *pIInstrDec)
attach instruction decoder to pkt decoder
Definition: ocsd_dcd_mngr.h:179
ITraceErrorLog
Error logging interface.
Definition: trc_error_log_i.h:57
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:380
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:197
DecodeMngrFullDcd
Definition: ocsd_dcd_mngr.h:332
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:382
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:186
IPktDataIn
Interface class providing an input for discrete protocol packets.
Definition: trc_pkt_in_i.h:55
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:52
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:312
OcsdLibDcdRegister
Definition: ocsd_lib_dcd_register.h:55
DecodeMngrPktProc::DecodeMngrPktProc
DecodeMngrPktProc(const std::string &name, ocsd_trace_protocol_t builtInProtocol)
Definition: ocsd_dcd_mngr.h:377
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:359
componentAttachPt::replace_first
virtual ocsd_err_t replace_first(T *component)
Definition: comp_attach_pt_t.h:177
ocsd_err_t
enum _ocsd_err_t ocsd_err_t
TraceComponent::setComponentOpMode
ocsd_err_t setComponentOpMode(uint32_t op_flags)
IPktRawDataMon
Interface class for packet processor monitor.
Definition: trc_pkt_raw_in_i.h:58
DecodeMngrFullDcd::createPktDecode
virtual TraceComponent * createPktDecode(const bool useInstID, const int instID)
Definition: ocsd_dcd_mngr.h:349
OCSD_OPFLG_PKTDEC_COMMON
#define OCSD_OPFLG_PKTDEC_COMMON
Definition: ocsd_if_types.h:527
DecoderMngrBase::~DecoderMngrBase
virtual ~DecoderMngrBase()
Definition: ocsd_dcd_mngr.h:49
ITargetMemAccess
Interface to target memory access.
Definition: trc_tgt_mem_access_i.h:57
TrcPktDecodeBase::setProtocolConfig
ocsd_err_t setProtocolConfig(const Pc *config)
Definition: trc_pkt_decode_base.h:277
DecodeMngrFullDcd::~DecodeMngrFullDcd
virtual ~DecodeMngrFullDcd()
Definition: ocsd_dcd_mngr.h:337
DecodeMngrFullDcd::createPktProc
virtual TraceComponent * createPktProc(const bool useInstID, const int instID)
Definition: ocsd_dcd_mngr.h:339
TraceComponent
Base class for all decode components in the library.
Definition: trc_component.h:57
OCSD_CREATE_FLG_FULL_DECODER
#define OCSD_CREATE_FLG_FULL_DECODER
Definition: ocsd_if_types.h:542
OCSD_ERR_MEM
@ OCSD_ERR_MEM
Definition: ocsd_if_types.h:90
IInstrDecode
Interface class to an instruction opcode decoder.
Definition: trc_instr_decode_i.h:48
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:291
OCSD_ERR_INVALID_PARAM_VAL
@ 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:50
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:543
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:270
OCSD_ERR_INVALID_PARAM_TYPE
@ 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:61
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:334
DecoderMngrBase::destroyDecoder
virtual ocsd_err_t destroyDecoder(TraceComponent *p_component)
Definition: ocsd_dcd_mngr.h:164
trc_pkt_proc_base.h
OpenCSD : Trace packet processor base class.
TrcPktProcI
Base Packet processing interface.
Definition: trc_pkt_proc_base.h:65
TrcPktProcBase
Packet Processor base class. Provides common infrastructure and interconnections for packet processor...
Definition: trc_pkt_proc_base.h:124
componentAttachPt::attach
virtual ocsd_err_t attach(T *component)
Definition: comp_attach_pt_t.h:167
IDecoderMngr
Definition: ocsd_dcd_mngr_i.h:50
DecoderMngrBase::attachOutputSink
virtual ocsd_err_t attachOutputSink(TraceComponent *pComponent, ITrcGenElemIn *pOutSink)
attach generic output interface to pkt decoder
Definition: ocsd_dcd_mngr.h:215
ocsd_trace_protocol_t
enum _ocsd_trace_protocol_t ocsd_trace_protocol_t
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_OPFLG_PKTPROC_COMMON
#define OCSD_OPFLG_PKTPROC_COMMON
Definition: ocsd_if_types.h:508
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:375
OCSD_ERR_DCD_INTERFACE_UNUSED
@ OCSD_ERR_DCD_INTERFACE_UNUSED
Definition: ocsd_if_types.h:142