-
Notifications
You must be signed in to change notification settings - Fork 251
Expand file tree
/
Copy pathmain_client.c
More file actions
29 lines (24 loc) · 929 Bytes
/
main_client.c
File metadata and controls
29 lines (24 loc) · 929 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "erpc_c/setup/erpc_client_setup.h"
#include "erpc_c/setup/erpc_transport_setup.h"
#include "erpc_c/setup/erpc_mbf_setup.h"
#include "examples/hello_world/shim/c/c_hello_world_client.h"
#include "examples/config.h"
int main()
{
erpc_transport_t transport;
erpc_mbf_t message_buffer_factory;
erpc_client_t client_manager;
/* Init eRPC client infrastructure */
transport = erpc_transport_tcp_init(ERPC_HOSTNAME, ERPC_PORT, false);
message_buffer_factory = erpc_mbf_dynamic_init();
client_manager = erpc_client_init(transport, message_buffer_factory);
/* init eRPC client TextService service */
initTextService_client(client_manager);
/* do eRPC call */
printText("Hello world!");
/* deinit objects */
deinitTextService_client();
erpc_client_deinit(client_manager);
erpc_mbf_dynamic_deinit(message_buffer_factory);
erpc_transport_tcp_deinit(transport);
}