OpenCSD Library : Library Component Infrastructure

Classes providing library infrastructure and auxilary functionality. More...

## Classes

class | componentAttachPt< T >
| Single component interface pointer attachment point. More...
class | TraceComponent
| Base class for all decode components in the library. More...
class | trcPrintableElem
| Class to provide trace element strings for printing. More...
class | ocsdError

## Functions

template<class Pc , class Pt >
void | trcPrintElemToString (const void *p_pkt, std::string &str)
| componentAttachPt< T >::componentAttachPt ()
virtual | componentAttachPt< T >::~componentAttachPt ()
virtual ocsd_err_t | componentAttachPt< T >::attach (T *component)
virtual ocsd_err_t | componentAttachPt< T >::replace_first (T *component)
virtual ocsd_err_t | componentAttachPt< T >::detach (T *component)
virtual T * | componentAttachPt< T >::first ()
virtual T * | componentAttachPt< T >::next ()
virtual int | componentAttachPt< T >::num_attached ()
virtual void | componentAttachPt< T >::detach_all ()
void | componentAttachPt< T >::set_notifier (IComponentAttachNotifier *notifier)
const bool | componentAttachPt< T >::enabled () const
void | componentAttachPt< T >::set_enabled (const bool enable)
virtual void | trcPrintableElem::toString (std::string &str) const
virtual void | trcPrintableElem::toStringFmt (const uint32_t fmtFlags, std::string &str) const

## Detailed Description

Classes providing library infrastructure and auxilary functionality.

Notification interface for attachment.

Interface to the componentAttachPt classes that allow notification on component connect and disconnect.

## Function Documentation

## attach()

template<class T>

ocsd_err_t componentAttachPt< T >::attach | ( | T * | component | ) |

virtual

Attach an interface of type T to the attachment point.

Parameters

  component | : interface to attach.

Returns
  ocsd_err_t : OCSD_OK if successful, OCSD_ERR_ATTACH_TOO_MANY if too many connections.

Definition at line 167 of file comp_attach_pt_t.h.

Here is the caller graph for this function:

## componentAttachPt()

template<class T >

componentAttachPt< T >::componentAttachPt | ( |  | ) |

Default constructor

Definition at line 153 of file comp_attach_pt_t.h.

## detach()

template<class T>

ocsd_err_t componentAttachPt< T >::detach | ( | T * | component | ) |

virtual

Detach component from the attachment point.

Parameters

  component | : Component to detach.

Returns
  virtual ocsd_err_t : OCSD_OK if successful, OCSD_ERR_ATTACH_COMP_NOT_FOUND if no match to component.

Definition at line 188 of file comp_attach_pt_t.h.

## detach_all()

template<class T >

void componentAttachPt< T >::detach_all | ( |  | ) |

virtual

Detach all components.

Definition at line 213 of file comp_attach_pt_t.h.

## enabled()

template<class T >

const bool componentAttachPt< T >::enabled | ( |  | ) | const

return the enabled flag.

Definition at line 225 of file comp_attach_pt_t.h.

## first()

template<class T >

T * componentAttachPt< T >::first | ( |  | ) |

virtual

Return the current (first) attached interface pointer. Will return 0 if nothing attached or the attachment point is disabled.

Returns
  T* : Current Interface pointer of type T or 0.

Definition at line 198 of file comp_attach_pt_t.h.

Here is the caller graph for this function:

## next()

template<class T >

T * componentAttachPt< T >::next | ( |  | ) |

virtual

Return the next attached interface. The componentAttachPt base implmentation will always return 0 as only a single attachment is possible

Returns
  T* : Always returns 0.

Definition at line 203 of file comp_attach_pt_t.h.

## num_attached()

template<class T >

int componentAttachPt< T >::num_attached | ( |  | ) |

virtual

Returns the number of interface pointers attached to this attachment point.

Returns
  int : number of component interfaces attached.

Definition at line 208 of file comp_attach_pt_t.h.

## replace_first()

template<class T>

ocsd_err_t componentAttachPt< T >::replace_first | ( | T * | component | ) |

virtual

Definition at line 177 of file comp_attach_pt_t.h.

Here is the caller graph for this function:

## set_enabled()

template<class T >

void componentAttachPt< T >::set_enabled | ( | const bool | enable | ) |

Definition at line 230 of file comp_attach_pt_t.h.

## set_notifier()

template<class T >

void componentAttachPt< T >::set_notifier | ( | IComponentAttachNotifier * | notifier | ) |

Attach a notifier interface to the attachment point. Will call back on this interface whenever a component is attached or detached.

Parameters

  *notifier | : pointer to the IComponentAttachNotifier interface.

Definition at line 220 of file comp_attach_pt_t.h.

## toString()

void trcPrintableElem::toString | ( | std::string & | str | ) | const

inline virtual

Reimplemented in EtmV4ITrcPacket, EtmV3TrcPacket, PtmTrcPacket, StmTrcPacket, OcsdTraceElement, and EtmV4DTrcPacket.

Definition at line 68 of file trc_printable_elem.h.

Here is the caller graph for this function:

## toStringFmt()

void trcPrintableElem::toStringFmt | ( | const uint32_t | fmtFlags,
|  | std::string & | str
| ) |  | const

inline virtual

Reimplemented in EtmV4ITrcPacket, EtmV3TrcPacket, PtmTrcPacket, StmTrcPacket, and EtmV4DTrcPacket.

Definition at line 73 of file trc_printable_elem.h.

Here is the call graph for this function:

## trcPrintElemToString()

template<class Pc , class Pt >

void trcPrintElemToString | ( | const void * | p_pkt,
|  | std::string & | str
| ) |  |

static template string function - used in "C" API to provide generic printing

Definition at line 80 of file trc_printable_elem.h.

## ~componentAttachPt()

template<class T >

componentAttachPt< T >::~componentAttachPt | ( |  | ) |

virtual

Default destructor

Definition at line 161 of file comp_attach_pt_t.h.