| eRPC API Reference Rev. 1.8.1 NXP Semiconductors

- Main Page
- API Reference
- Classes
- Files

- File List
- File Members

erpc_pre_post_action.h
Go to the documentation of this file.
1 /*
2 * Copyright 2020 NXP
3 * Copyright 2020 ACRIOS Systems s.r.o.
4 * All rights reserved.
5 *
6 *
7 * SPDX-License-Identifier: BSD-3-Clause
8 */
9
10 #ifndef _EMBEDDED_RPC__PREPOSTACTION_H_
11 #define _EMBEDDED_RPC__PREPOSTACTION_H_
12
13 #ifdef __cplusplus
14 #include <cstddef>
20 extern "C" {
21 #endif
22
23 typedef void (*pre_post_action_cb)(void);
24
25 #ifdef __cplusplus
26 }
27
29 // Classes
31
32 namespace erpc {
33
39 class PrePostAction
40 {
41 public:
45 PrePostAction(void)
46 : m_preCB(NULL)
47 , m_postCB(NULL){};
48
55 void addPreCB(pre_post_action_cb preCB);
56
63 void addPostCB(pre_post_action_cb postCB);
64
70 pre_post_action_cb getPreCB(void) { return m_preCB; }
71
77 pre_post_action_cb getPostCB(void) { return m_postCB; }
78
82 ~PrePostAction(void){};
83
84 protected:
85 pre_post_action_cb m_preCB;
86 pre_post_action_cb m_postCB;
87 };
88
89 } // namespace erpc
90
93 #endif
94
95 #endif // _EMBEDDED_RPC__PREPOSTACTION_H_
erpc::PrePostAction::PrePostAction
PrePostAction(void)
PrePostAction constructor.
Definition: erpc_pre_post_action.h:45
erpc::PrePostAction::m_preCB
pre_post_action_cb m_preCB
Definition: erpc_pre_post_action.h:82
erpc::PrePostAction::getPreCB
pre_post_action_cb getPreCB(void)
This function returns "before eRPC call start" callback function.
Definition: erpc_pre_post_action.h:70
erpc::PrePostAction::m_postCB
pre_post_action_cb m_postCB
Definition: erpc_pre_post_action.h:86
erpc::PrePostAction::~PrePostAction
~PrePostAction(void)
PrePostAction destructor.
Definition: erpc_pre_post_action.h:82
erpc::PrePostAction
Client and server may used cb functions before and after rpc call.
Definition: erpc_pre_post_action.h:39
erpc::PrePostAction::addPostCB
void addPostCB(pre_post_action_cb postCB)
This function sets "after eRPC call finish" callback function.
erpc::PrePostAction::addPreCB
void addPreCB(pre_post_action_cb preCB)
This function sets "before eRPC call start" callback function.
erpc
Definition: erpc_arbitrated_client_manager.h:25
erpc::PrePostAction::getPostCB
pre_post_action_cb getPostCB(void)
This function returns "after eRPC call finish" callback function.
Definition: erpc_pre_post_action.h:77