eRPC API Reference  Rev. 1.7.0
NXP Semiconductors
erpc_message_loggers.h
Go to the documentation of this file.
1 /*
2  * The Clear BSD License
3  * Copyright 2017 NXP
4  * All rights reserved.
5  *
6  *
7  * Redistribution and use in source and binary forms, with or without modification,
8  * are permitted (subject to the limitations in the disclaimer below) provided
9  * that the following conditions are met:
10  *
11  * o Redistributions of source code must retain the above copyright notice, this list
12  * of conditions and the following disclaimer.
13  *
14  * o Redistributions in binary form must reproduce the above copyright notice, this
15  * list of conditions and the following disclaimer in the documentation and/or
16  * other materials provided with the distribution.
17  *
18  * o Neither the name of the copyright holder nor the names of its
19  * contributors may be used to endorse or promote products derived from this
20  * software without specific prior written permission.
21  *
22  * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE.
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
26  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
27  * ANY DIRECT, 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 ON
30  * 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 _EMBEDDED_RPC__LOGEVENTLISTENERS_H_
36 #define _EMBEDDED_RPC__LOGEVENTLISTENERS_H_
37 
38 #include "erpc_transport.h"
39 
46 // Classes
49 
50 namespace erpc {
51 
58 {
59 public:
64  : m_next(NULL)
65  , m_transport(transport){};
66 
70  ~MessageLogger(void){};
71 
77  MessageLogger *getNext(void) { return m_next; }
78 
84  void setNext(MessageLogger *next) { m_next = next; }
85 
91  Transport *getLogger(void) { return m_transport; }
92 
93 protected:
96 };
97 
104 {
105 public:
110  : m_logger(NULL){};
111 
115  virtual ~MessageLoggers(void);
116 
125  bool addMessageLogger(Transport *transport);
126 
127 protected:
137  erpc_status_t logMessage(MessageBuffer *msg);
138 };
139 
140 } // namespace erpc
141 
144 #endif // _EMBEDDED_RPC__LOGEVENTLISTENERS_H_
Abstract interface for transport layer.
Definition: erpc_transport.h:61
int32_t erpc_status_t
Type used for all status and error return values.
Definition: erpc_common.h:112
MessageLogger * m_logger
Definition: erpc_message_loggers.h:128
Transport * m_transport
Definition: erpc_message_loggers.h:95
MessageLogger * m_next
Definition: erpc_message_loggers.h:94
MessageLogger(Transport *transport)
MessageLogger constructor.
Definition: erpc_message_loggers.h:63
Logging messages objects used for logging sent/received messages.
Definition: erpc_message_loggers.h:57
MessageLogger * getNext(void)
Return next logger.
Definition: erpc_message_loggers.h:77
Represents a memory buffer containing a message.
Definition: erpc_message_buffer.h:62
Definition: erpc_arbitrated_client_manager.h:51
void setNext(MessageLogger *next)
Set next logger.
Definition: erpc_message_loggers.h:84
MessageLoggers(void)
Constructor.
Definition: erpc_message_loggers.h:109
Transport * getLogger(void)
Returns next transport object used for logging messages.
Definition: erpc_message_loggers.h:91
~MessageLogger(void)
MessageLogger destructor.
Definition: erpc_message_loggers.h:70
Logging messages functionality.
Definition: erpc_message_loggers.h:103