diff options
Diffstat (limited to 'decoder/include/pkt_printers')
-rw-r--r-- | decoder/include/pkt_printers/gen_elem_printer.h | 95 | ||||
-rw-r--r-- | decoder/include/pkt_printers/item_printer.h | 94 | ||||
-rw-r--r-- | decoder/include/pkt_printers/pkt_printer_t.h | 189 | ||||
-rw-r--r-- | decoder/include/pkt_printers/raw_frame_printer.h | 69 | ||||
-rw-r--r-- | decoder/include/pkt_printers/trc_pkt_printers.h | 43 | ||||
-rw-r--r-- | decoder/include/pkt_printers/trc_print_fact.h | 60 |
6 files changed, 550 insertions, 0 deletions
diff --git a/decoder/include/pkt_printers/gen_elem_printer.h b/decoder/include/pkt_printers/gen_elem_printer.h new file mode 100644 index 0000000..ba3138a --- /dev/null +++ b/decoder/include/pkt_printers/gen_elem_printer.h @@ -0,0 +1,95 @@ +/* + * \file gen_elem_printer.h + * \brief OpenCSD : Generic element printer class. + * + * \copyright Copyright (c) 2015, 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_GEN_ELEM_PRINTER_H_INCLUDED +#define ARM_GEN_ELEM_PRINTER_H_INCLUDED + +#include "opencsd.h" + +class TrcGenericElementPrinter : public ItemPrinter, public ITrcGenElemIn +{ +public: + TrcGenericElementPrinter(); + virtual ~TrcGenericElementPrinter() {}; + + virtual ocsd_datapath_resp_t TraceElemIn(const ocsd_trc_index_t index_sop, + const uint8_t trc_chan_id, + const OcsdTraceElement &elem); + + // funtionality to test wait / flush mechanism + void ackWait() { m_needWaitAck = false; }; + const bool needAckWait() const { return m_needWaitAck; }; + +protected: + bool m_needWaitAck; +}; + + +inline TrcGenericElementPrinter::TrcGenericElementPrinter() : + m_needWaitAck(false) +{ +} + +inline ocsd_datapath_resp_t TrcGenericElementPrinter::TraceElemIn(const ocsd_trc_index_t index_sop, + const uint8_t trc_chan_id, + const OcsdTraceElement &elem) +{ + ocsd_datapath_resp_t resp = OCSD_RESP_CONT; + std::string elemStr; + std::ostringstream oss; + oss << "Idx:" << index_sop << "; ID:"<< std::hex << (uint32_t)trc_chan_id << "; "; + elem.toString(elemStr); + oss << elemStr << std::endl; + itemPrintLine(oss.str()); + + // funtionality to test wait / flush mechanism + if(m_needWaitAck) + { + oss.str(""); + oss << "WARNING: Generic Element Printer; New element without previous _WAIT acknowledged\n"; + itemPrintLine(oss.str()); + m_needWaitAck = false; + } + + if(getTestWaits()) + { + resp = OCSD_RESP_WAIT; // return _WAIT for the 1st N packets. + decTestWaits(); + m_needWaitAck = true; + } + return resp; +} + +#endif // ARM_GEN_ELEM_PRINTER_H_INCLUDED + +/* End of File gen_elem_printer.h */ diff --git a/decoder/include/pkt_printers/item_printer.h b/decoder/include/pkt_printers/item_printer.h new file mode 100644 index 0000000..cc3ec37 --- /dev/null +++ b/decoder/include/pkt_printers/item_printer.h @@ -0,0 +1,94 @@ +/* + * \file item_printer.h + * \brief OpenCSD : + * + * \copyright Copyright (c) 2015, 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_ITEM_PRINTER_H_INCLUDED +#define ARM_ITEM_PRINTER_H_INCLUDED + +#include "opencsd.h" +#include <string> + +class ItemPrinter +{ +public: + ItemPrinter(); + virtual ~ItemPrinter(); + + void setMessageLogger(ocsdMsgLogger *pMsgLogger) { m_pMsgLogger = pMsgLogger; }; + void itemPrintLine(const std::string &msg); + + // return wait for the first N packets - test the wait mechanism. + void setTestWaits(const int num_waits); + const int getTestWaits() const; + void decTestWaits(); + +protected: + ocsdMsgLogger *m_pMsgLogger; + int m_test_waits; +}; + +inline ItemPrinter::ItemPrinter() : + m_pMsgLogger(0), + m_test_waits(0) +{ +} + +inline ItemPrinter::~ItemPrinter() +{ + m_pMsgLogger = 0; +} + +inline void ItemPrinter::itemPrintLine(const std::string &msg) +{ + if(m_pMsgLogger) + m_pMsgLogger->LogMsg(msg); +} + +inline void ItemPrinter::setTestWaits(const int num_waits) +{ + m_test_waits = num_waits; +} + +inline const int ItemPrinter::getTestWaits() const +{ + return m_test_waits; +} + +inline void ItemPrinter::decTestWaits() +{ + m_test_waits--; +} + +#endif // ARM_ITEM_PRINTER_H_INCLUDED + +/* End of File item_printer.h */ diff --git a/decoder/include/pkt_printers/pkt_printer_t.h b/decoder/include/pkt_printers/pkt_printer_t.h new file mode 100644 index 0000000..c00daa1 --- /dev/null +++ b/decoder/include/pkt_printers/pkt_printer_t.h @@ -0,0 +1,189 @@ +/* + * \file pkt_printer_t.h + * \brief OpenCSD : Test packet printer. + * + * \copyright Copyright (c) 2015, 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_PKT_PRINTER_T_H_INCLUDED +#define ARM_PKT_PRINTER_T_H_INCLUDED + +#include "opencsd.h" + +#include <string> +#include <sstream> +//#include <iostream> +#include <iomanip> + +template<class P> +class PacketPrinter : public IPktDataIn<P>, public IPktRawDataMon<P>, public ItemPrinter +{ +public: + PacketPrinter(const uint8_t trcID); + PacketPrinter(const uint8_t trcID, ocsdMsgLogger *pMsgLogger); + virtual ~PacketPrinter(); + + + virtual ocsd_datapath_resp_t PacketDataIn( const ocsd_datapath_op_t op, + const ocsd_trc_index_t index_sop, + const P *p_packet_in); + + virtual void RawPacketDataMon( const ocsd_datapath_op_t op, + const ocsd_trc_index_t index_sop, + const P *pkt, + const uint32_t size, + const uint8_t *p_data); + + +private: + void printIdx_ID(const ocsd_trc_index_t index_sop); + + uint8_t m_trcID; + bool m_bRawPrint; + std::ostringstream m_oss; + ocsd_datapath_resp_t m_last_resp; + +}; + +template<class P> PacketPrinter<P>::PacketPrinter(uint8_t trcID) : + m_trcID(trcID), + m_bRawPrint(false), + m_last_resp(OCSD_RESP_CONT) +{ +} + +template<class P> PacketPrinter<P>::PacketPrinter(const uint8_t trcID, ocsdMsgLogger *pMsgLogger) : + m_trcID(trcID), + m_bRawPrint(false), + m_last_resp(OCSD_RESP_CONT) +{ + setMessageLogger(pMsgLogger); +} + +template<class P> PacketPrinter<P>::~PacketPrinter() +{ +} + +template<class P> ocsd_datapath_resp_t PacketPrinter<P>::PacketDataIn( const ocsd_datapath_op_t op, + const ocsd_trc_index_t index_sop, + const P *p_packet_in) +{ + std::string pktstr; + ocsd_datapath_resp_t resp = OCSD_RESP_CONT; + + // wait / flush test verification + if(!m_bRawPrint && (m_last_resp == OCSD_RESP_WAIT)) + { + // expect a flush or a complete reset after a wait. + if((op != OCSD_OP_FLUSH) && (op != OCSD_OP_RESET)) + { + m_oss <<"ID:"<< std::hex << (uint32_t)m_trcID << "\tERROR: FLUSH operation expected after wait on trace decode path\n"; + itemPrintLine(m_oss.str()); + m_oss.str(""); + return OCSD_RESP_FATAL_INVALID_OP; + } + } + + switch(op) + { + case OCSD_OP_DATA: + p_packet_in->toString(pktstr); + if(!m_bRawPrint) + printIdx_ID(index_sop); + m_oss << ";\t" << pktstr << std::endl; + + // test the wait/flush response mechnism + if(getTestWaits() && !m_bRawPrint) + { + decTestWaits(); + resp = OCSD_RESP_WAIT; + } + break; + + case OCSD_OP_EOT: + m_oss <<"ID:"<< std::hex << (uint32_t)m_trcID << "\tEND OF TRACE DATA\n"; + break; + + case OCSD_OP_FLUSH: + m_oss <<"ID:"<< std::hex << (uint32_t)m_trcID << "\tFLUSH operation on trace decode path\n"; + break; + + case OCSD_OP_RESET: + m_oss <<"ID:"<< std::hex << (uint32_t)m_trcID << "\tRESET operation on trace decode path\n"; + break; + } + + m_last_resp = resp; + itemPrintLine(m_oss.str()); + m_oss.str(""); + return resp; +} + +template<class P> void PacketPrinter<P>::RawPacketDataMon( const ocsd_datapath_op_t op, + const ocsd_trc_index_t index_sop, + const P *pkt, + const uint32_t size, + const uint8_t *p_data) +{ + switch(op) + { + case OCSD_OP_DATA: + printIdx_ID(index_sop); + m_oss << "; ["; + if((size > 0) && (p_data != 0)) + { + uint32_t data = 0; + for(uint32_t i = 0; i < size; i++) + { + data = (uint32_t)(p_data[i] & 0xFF); + m_oss << "0x" << std::hex << std::setw(2) << std::setfill('0') << data << " "; + } + } + m_oss << "]"; + m_bRawPrint = true; + PacketDataIn(op,index_sop,pkt); + m_bRawPrint = false; + break; + + default: + PacketDataIn(op,index_sop,pkt); + break; + } + +} + +template<class P> void PacketPrinter<P>::printIdx_ID(const ocsd_trc_index_t index_sop) +{ + m_oss << "Idx:" << std::dec << index_sop << "; ID:"<< std::hex << (uint32_t)m_trcID; +} + +#endif // ARM_PKT_PRINTER_T_H_INCLUDED + +/* End of File pkt_printer_t.h */ diff --git a/decoder/include/pkt_printers/raw_frame_printer.h b/decoder/include/pkt_printers/raw_frame_printer.h new file mode 100644 index 0000000..50caeb8 --- /dev/null +++ b/decoder/include/pkt_printers/raw_frame_printer.h @@ -0,0 +1,69 @@ +/* + * \file raw_frame_printer.h + * \brief OpenCSD : + * + * \copyright Copyright (c) 2015, 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_RAW_FRAME_PRINTER_H_INCLUDED +#define ARM_RAW_FRAME_PRINTER_H_INCLUDED + +#include "opencsd.h" + +#include <string> +#include <sstream> + +class RawFramePrinter : public ITrcRawFrameIn, public ItemPrinter +{ +public: + RawFramePrinter() {}; + RawFramePrinter(ocsdMsgLogger *pMsgLogger); + virtual ~RawFramePrinter() {}; + + virtual ocsd_err_t TraceRawFrameIn( const ocsd_datapath_op_t op, + const ocsd_trc_index_t index, + const ocsd_rawframe_elem_t frame_element, + const int dataBlockSize, + const uint8_t *pDataBlock, + const uint8_t traceID); + +private: + void createDataString(const int dataSize, const uint8_t *pData, int bytesPerLine, std::string &dataStr); + +}; + +inline RawFramePrinter::RawFramePrinter(ocsdMsgLogger *pMsgLogger) +{ + setMessageLogger(pMsgLogger); +} + +#endif // ARM_RAW_FRAME_PRINTER_H_INCLUDED + +/* End of File raw_frame_printer.h */ diff --git a/decoder/include/pkt_printers/trc_pkt_printers.h b/decoder/include/pkt_printers/trc_pkt_printers.h new file mode 100644 index 0000000..439701a --- /dev/null +++ b/decoder/include/pkt_printers/trc_pkt_printers.h @@ -0,0 +1,43 @@ +/* +* \file trc_pkt_printers.h +* \brief OpenCSD : Known protocol packet printers. +* +* \copyright Copyright (c) 2015, 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_TRC_PKT_PRINTERS_H_INCLUDED +#define ARM_TRC_PKT_PRINTERS_H_INCLUDED + +#include "pkt_printers/item_printer.h" +#include "pkt_printers/pkt_printer_t.h" +#include "pkt_printers/gen_elem_printer.h" +#include "pkt_printers/raw_frame_printer.h" + +#endif // ARM_TRC_PKT_PRINTERS_H_INCLUDED diff --git a/decoder/include/pkt_printers/trc_print_fact.h b/decoder/include/pkt_printers/trc_print_fact.h new file mode 100644 index 0000000..73dd9dc --- /dev/null +++ b/decoder/include/pkt_printers/trc_print_fact.h @@ -0,0 +1,60 @@ +/* +* \file trc_print_fact.h +* \brief OpenCSD : Factory for protocol packet printers. +* +* \copyright Copyright (c) 2015, 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_TRC_PRINT_FACT_H_INCLUDED +#define ARM_TRC_PRINT_FACT_H_INCLUDED + +#include "opencsd.h" + +class PktPrinterFact +{ +public: + static ItemPrinter *createProtocolPrinter(std::vector<ItemPrinter *> &printer_list, ocsd_trace_protocol_t protocol, uint8_t elemID, ocsdMsgLogger *pMsgLogger = 0); + static RawFramePrinter *createRawFramePrinter(std::vector<ItemPrinter *> &printer_list, ocsdMsgLogger *pMsgLogger = 0); + static TrcGenericElementPrinter *createGenElemPrinter(std::vector<ItemPrinter *> &printer_list, ocsdMsgLogger *pMsgLogger = 0); + + static void destroyPrinter(std::vector<ItemPrinter *> &printer_list, ItemPrinter *pPrinter); + static void destroyAllPrinters(std::vector<ItemPrinter *> &printer_list); + static const int numPrinters(std::vector<ItemPrinter *> &printer_list); + +private: + static void SavePrinter(std::vector<ItemPrinter *> &printer_list, ItemPrinter *pPrinter, ocsdMsgLogger *pMsgLogger); + + PktPrinterFact() {}; + ~PktPrinterFact() {}; +}; + +#endif // ARM_TRC_PRINT_FACT_H_INCLUDED + +/* end of file trc_print_fact.h */ |