| eRPC API Reference Rev. 1.8.1 NXP Semiconductors

- Main Page
- API Reference
- Classes
- Files

- File List
- File Members

erpc_rpmsg_lite_transport.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2015-2016, Freescale Semiconductor, Inc.
3 * Copyright 2016-2020 NXP
4 * All rights reserved.
5 *
6 *
7 * SPDX-License-Identifier: BSD-3-Clause
8 */
9
10 #ifndef _EMBEDDED_RPC__RPMSG_LITE_TRANSPORT_H_
11 #define _EMBEDDED_RPC__RPMSG_LITE_TRANSPORT_H_
12
13 #include "erpc_config_internal.h"
14 #include "erpc_message_buffer.h"
15 #include "erpc_rpmsg_lite_base_transport.h"
16 #include "erpc_static_queue.h"
17
18 #include "rpmsg_lite.h"
19
26 // Definitions
29
31 // Classes
33
34 namespace erpc {
40 class RPMsgTransport : public RPMsgBaseTransport
41 {
42 public:
48 RPMsgTransport(void);
49
53 virtual ~RPMsgTransport(void);
54
69 virtual erpc_status_t init(uint32_t src_addr, uint32_t dst_addr, void *base_address, uint32_t length,
70 uint32_t rpmsg_link_id);
71
88 virtual erpc_status_t init(uint32_t src_addr, uint32_t dst_addr, void *base_address, uint32_t rpmsg_link_id,
89 void (*ready_cb)(void), char *nameservice_name);
90
100 virtual erpc_status_t receive(MessageBuffer *message);
101
110 virtual erpc_status_t send(MessageBuffer *message);
111
119 virtual bool hasMessage(void) { return m_messageQueue.size(); }
120
121 protected:
135 static int32_t rpmsg_read_cb(void *payload, uint32_t payload_len, uint32_t src, void *priv);
136
137 StaticQueue<MessageBuffer, ERPC_DEFAULT_BUFFERS_COUNT>
138 m_messageQueue;
140 uint32_t m_dst_addr;
141 struct rpmsg_lite_ept_static_context m_rpmsg_ept_context;
142 struct rpmsg_lite_endpoint *m_rpmsg_ept;
144 static struct rpmsg_lite_instance s_rpmsg_ctxt;
145 };
146
147 } // namespace erpc
148
151 #endif // _EMBEDDED_RPC__RPMSG_LITE_TRANSPORT_H_
erpc::RPMsgTransport::rpmsg_read_cb
static int32_t rpmsg_read_cb(void *payload, uint32_t payload_len, uint32_t src, void *priv)
RPMSG callback for receiving data.
Definition: erpc_rpmsg_lite_transport.cpp:29
erpc_static_queue.h
erpc::RPMsgTransport::~RPMsgTransport
virtual ~RPMsgTransport(void)
Codec destructor.
Definition: erpc_rpmsg_lite_transport.cpp:49
erpc_status_t
enum _erpc_status erpc_status_t
Type used for all status and error return values.
Definition: erpc_common.h:87
erpc::RPMsgTransport::m_rpmsg_ept
struct rpmsg_lite_endpoint * m_rpmsg_ept
Definition: erpc_rpmsg_lite_transport.h:142
erpc::RPMsgTransport::RPMsgTransport
RPMsgTransport(void)
Constructor.
Definition: erpc_rpmsg_lite_transport.cpp:41
erpc::RPMsgTransport::hasMessage
virtual bool hasMessage(void)
Function to check if is message in receive queue and wait for processing.
Definition: erpc_rpmsg_lite_transport.h:119
erpc::RPMsgTransport::m_rpmsg_ept_context
struct rpmsg_lite_ept_static_context m_rpmsg_ept_context
Definition: erpc_rpmsg_lite_transport.h:141
erpc::RPMsgTransport::m_messageQueue
StaticQueue< MessageBuffer, ERPC_DEFAULT_BUFFERS_COUNT > m_messageQueue
Definition: erpc_rpmsg_lite_transport.h:138
erpc::RPMsgTransport::receive
virtual erpc_status_t receive(MessageBuffer *message)
Set message to first received message.
Definition: erpc_rpmsg_lite_transport.cpp:187
erpc::MessageBuffer
Represents a memory buffer containing a message.
Definition: erpc_message_buffer.h:37
erpc
Definition: erpc_arbitrated_client_manager.h:25
erpc::RPMsgTransport::init
virtual erpc_status_t init(uint32_t src_addr, uint32_t dst_addr, void *base_address, uint32_t length, uint32_t rpmsg_link_id)
Initialization of RPMsgTransport layer - as RPMsg master.
Definition: erpc_rpmsg_lite_transport.cpp:74
erpc::RPMsgTransport
Transport that uses RPMsg zero copy API for interprocessor messaging.
Definition: erpc_rpmsg_lite_transport.h:40
erpc::RPMsgTransport::s_rpmsg_ctxt
static struct rpmsg_lite_instance s_rpmsg_ctxt
Definition: erpc_rpmsg_lite_transport.h:144
erpc::RPMsgTransport::m_dst_addr
uint32_t m_dst_addr
Definition: erpc_rpmsg_lite_transport.h:140
erpc_rpmsg_lite_base_transport.h
erpc_message_buffer.h
erpc::RPMsgBaseTransport
Transport that other RPMsg transports inherits.
Definition: erpc_rpmsg_lite_base_transport.h:39
erpc::RPMsgTransport::send
virtual erpc_status_t send(MessageBuffer *message)
Function to send prepared message.
Definition: erpc_rpmsg_lite_transport.cpp:196
erpc::StaticQueue
Template class which implements static queue as ring buffer.
Definition: erpc_static_queue.h:32