| eRPC API Reference Rev. 1.8.1 NXP Semiconductors

- Main Page
- API Reference
- Classes
- Files

- File List
- File Members

erpc_server_setup.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2014-2016, Freescale Semiconductor, Inc.
3 * Copyright 2016-2017 NXP
4 * Copyright 2020 ACRIOS Systems s.r.o.
5 * All rights reserved.
6 *
7 *
8 * SPDX-License-Identifier: BSD-3-Clause
9 */
10
11 #ifndef _EMBEDDED_RPC__SERVER_SETUP_H_
12 #define _EMBEDDED_RPC__SERVER_SETUP_H_
13
14 #include "erpc_common.h"
15 #include "erpc_config_internal.h"
16 #include "erpc_mbf_setup.h"
17 #include "erpc_transport_setup.h"
18 #if ERPC_PRE_POST_ACTION
19 #include "erpc_pre_post_action.h"
20 #endif
21
28 // API
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 #include <stdbool.h>
37 #include <stdint.h>
38
40 typedef struct ServerType *erpc_server_t;
41
43
44
52 erpc_server_t erpc_server_init(erpc_transport_t transport, erpc_mbf_t message_buffer_factory);
53
59 void erpc_server_deinit(void);
60
68 void erpc_add_service_to_server(void *service);
69
75 void erpc_remove_service_from_server(void *service);
76
86 void erpc_server_set_crc(uint32_t crcStart);
88
90
91
100 erpc_status_t erpc_server_run(void);
101
109 erpc_status_t erpc_server_poll(void);
110
117 void erpc_server_stop(void);
118
119 #if ERPC_MESSAGE_LOGGING
120
128 bool erpc_server_add_message_logger(erpc_transport_t transport);
129 #endif
130
131 #if ERPC_PRE_POST_ACTION
132
138 void erpc_server_add_pre_cb_action(pre_post_action_cb preCB);
139
146 void erpc_server_add_post_cb_action(pre_post_action_cb postCB);
147 #endif
148
150
151 #ifdef __cplusplus
152 }
153 #endif
154
157 #endif // _EMBEDDED_RPC__SERVER_SETUP_H_
erpc_transport_t
struct ErpcTransport * erpc_transport_t
Opaque transport object type.
Definition: erpc_transport_setup.h:25
erpc_server_stop
void erpc_server_stop(void)
This functions should be used when client is calling quit server.
Definition: erpc_server_setup.cpp:121
erpc_mbf_setup.h
erpc_pre_post_action.h
erpc_status_t
enum _erpc_status erpc_status_t
Type used for all status and error return values.
Definition: erpc_common.h:87
erpc_mbf_t
struct ErpcMessageBufferFactory * erpc_mbf_t
Opaque MessageBufferFactory object type.
Definition: erpc_mbf_setup.h:26
erpc_remove_service_from_server
void erpc_remove_service_from_server(void *service)
This function removes service from server.
Definition: erpc_server_setup.cpp:76
erpc_server_init
erpc_server_t erpc_server_init(erpc_transport_t transport, erpc_mbf_t message_buffer_factory)
This function initializes server.
Definition: erpc_server_setup.cpp:39
erpc_transport_setup.h
erpc_server_set_crc
void erpc_server_set_crc(uint32_t crcStart)
Can be used to set own crcStart number.
Definition: erpc_server_setup.cpp:84
erpc_server_run
erpc_status_t erpc_server_run(void)
This function calls server implementation until it is stopped.
Definition: erpc_server_setup.cpp:89
erpc_server_poll
erpc_status_t erpc_server_poll(void)
This function calls server implementation only once.
Definition: erpc_server_setup.cpp:105
erpc_server_t
struct ServerType * erpc_server_t
Opaque server object type.
Definition: erpc_server_setup.h:40
erpc_server_deinit
void erpc_server_deinit(void)
This function de-initializes server.
Definition: erpc_server_setup.cpp:60
erpc_add_service_to_server
void erpc_add_service_to_server(void *service)
This function adds service to server.
Definition: erpc_server_setup.cpp:68