OpenSplice ISO C++ 2 FACE API  v7.x
OpenSplice Future Airborne Capability Environment (FACE) ISO C++ 2 API
ReportSupport.hpp
Go to the documentation of this file.
1 /*
2  * Vortex OpenSplice
3  *
4  * This software and documentation are Copyright 2006 to 2021 ADLINK
5  * Technology Limited, its affiliated companies and licensors. All rights
6  * reserved.
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21 #ifndef VORTEX_FACE_REPORT_SUPPORT_HPP_
22 #define VORTEX_FACE_REPORT_SUPPORT_HPP_
23 
24 #include "Vortex_FACE.hpp"
25 #include <os_report.h>
26 #include <stdarg.h>
27 
28 
29 namespace Vortex {
30 namespace FACE {
31 
32 #define FACE_REPORT_STACK_BEGIN() \
33  Vortex::FACE::report_stack_open( \
34  __FILE__, \
35  __LINE__, \
36  OS_PRETTY_FUNCTION)
37 
38 #define FACE_REPORT_STACK_END(flush) \
39  Vortex::FACE::report_stack_close( \
40  -1, \
41  __FILE__, \
42  __LINE__, \
43  OS_PRETTY_FUNCTION, \
44  flush)
45 
46 #define FACE_REPORT_STACK_CID_END(cid, flush) \
47  Vortex::FACE::report_stack_close( \
48  (cid), \
49  __FILE__, \
50  __LINE__, \
51  OS_PRETTY_FUNCTION, \
52  flush)
53 
54 #define FACE_REPORT_ERROR(code, ...) \
55  Vortex::FACE::report( \
56  (code), \
57  OS_ERROR, \
58  __FILE__, \
59  __LINE__, \
60  OS_PRETTY_FUNCTION, \
61  __VA_ARGS__)
62 
63 
64 VORTEX_FACE_API std::string
66 
68 exceptionToReturnCode(const dds::core::Exception& e);
69 
70 
71 VORTEX_FACE_API void
73  const char *file,
74  int32_t line,
75  const char *signature);
76 
77 VORTEX_FACE_API void
79  ::FACE::CONNECTION_ID_TYPE connectionId,
80  const char *file,
81  int32_t line,
82  const char *signature,
83  bool flush);
84 
85 VORTEX_FACE_API void
86 report(
88  os_reportType reportType,
89  const os_char *file,
90  int32_t line,
91  const os_char *signature,
92  const os_char *format,
93  ...);
94 
95 }; /* namespace FACE */
96 }; /* namespace Vortex */
97 
98 #endif /* VORTEX_FACE_REPORT_SUPPORT_HPP_ */
int64_t CONNECTION_ID_TYPE
VORTEX_FACE_API void report(::FACE::RETURN_CODE_TYPE code, os_reportType reportType, const os_char *file, int32_t line, const os_char *signature, const os_char *format,...)
RETURN_CODE_TYPE
Definition: FACE_common.h:54
VORTEX_FACE_API void report_stack_open(const char *file, int32_t line, const char *signature)
VORTEX_FACE_API void report_stack_close(::FACE::CONNECTION_ID_TYPE connectionId, const char *file, int32_t line, const char *signature, bool flush)
VORTEX_FACE_API std::string returnCodeToString(::FACE::RETURN_CODE_TYPE return_code)
VORTEX_FACE_API ::FACE::RETURN_CODE_TYPE exceptionToReturnCode(const dds::core::Exception &e)
#define VORTEX_FACE_API
Definition: Macros.hpp:34