eRPC API Reference  Rev. 1.12.0
NXP Semiconductors
erpc_message_loggers.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2017 NXP
3  * All rights reserved.
4  *
5  *
6  * SPDX-License-Identifier: BSD-3-Clause
7  */
8 
9 #ifndef _EMBEDDED_RPC__LOGEVENTLISTENERS_H_
10 #define _EMBEDDED_RPC__LOGEVENTLISTENERS_H_
11 
12 #include "erpc_transport.hpp"
13 
20 // Classes
23 
24 namespace erpc {
25 
32 {
33 public:
37  explicit MessageLogger(Transport *transport) : m_next(NULL), m_transport(transport){};
38 
42  ~MessageLogger(void){};
43 
49  MessageLogger *getNext(void) { return m_next; }
50 
56  void setNext(MessageLogger *next) { m_next = next; }
57 
63  Transport *getLogger(void) { return m_transport; }
64 
65 protected:
68 };
69 
76 {
77 public:
81  MessageLoggers(void) : m_logger(NULL){};
82 
86  ~MessageLoggers(void);
87 
96  bool addMessageLogger(Transport *transport);
97 
98 protected:
108  erpc_status_t logMessage(MessageBuffer *msg);
109 
110 private:
118  MessageLogger *create(Transport *transport);
119 };
120 
121 } // namespace erpc
122 
125 #endif // _EMBEDDED_RPC__LOGEVENTLISTENERS_H_
Abstract interface for transport layer.
Definition: erpc_transport.hpp:36
enum _erpc_status erpc_status_t
Type used for all status and error return values.
Definition: erpc_common.h:85
MessageLogger * m_logger
Definition: erpc_message_loggers.hpp:99
Transport * m_transport
Definition: erpc_message_loggers.hpp:67
MessageLogger * m_next
Definition: erpc_message_loggers.hpp:66
MessageLogger(Transport *transport)
MessageLogger constructor.
Definition: erpc_message_loggers.hpp:37
Logging messages objects used for logging sent/received messages.
Definition: erpc_message_loggers.hpp:31
MessageLogger * getNext(void)
Return next logger.
Definition: erpc_message_loggers.hpp:49
Represents a memory buffer containing a message.
Definition: erpc_message_buffer.hpp:37
Definition: erpc_arbitrated_client_manager.hpp:25
void setNext(MessageLogger *next)
Set next logger.
Definition: erpc_message_loggers.hpp:56
MessageLoggers(void)
Constructor.
Definition: erpc_message_loggers.hpp:81
Transport * getLogger(void)
Returns next transport object used for logging messages.
Definition: erpc_message_loggers.hpp:63
~MessageLogger(void)
MessageLogger destructor.
Definition: erpc_message_loggers.hpp:42
Logging messages functionality.
Definition: erpc_message_loggers.hpp:75