Init basesystem source codes.
[staging/basesystem.git] / nsframework / framework_unified / client / include / native_service / nsfw_message.h
1 /*
2  * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 /**
17  * @file nsfw_message.h
18  * @brief \~english  The file definition of NSFW message for NSFW independent module reference
19  *
20  */
21 /** @addtogroup BaseSystem
22  *  @{
23  */
24 /** @addtogroup native_service
25  *  @ingroup BaseSystem
26  *  @{
27  */
28 /** @addtogroup framework_unified
29  *  @ingroup native_service
30  *  @{
31  */
32 /** @addtogroup utility
33  *  @ingroup framework_unified
34  *  @{
35  */
36 /*
37  * The definition of NSFW message for NSFW independent module reference.
38  *
39  */
40 //@{
41 #ifndef _nsfw_message_h_  // NOLINT  (build/header_guard)
42 #define _nsfw_message_h_
43
44 /*
45  * The following definitions are defined only for NSFW to check consistency.
46  * NOT TO BE USED IN ANY WAY.
47  */
48 #define _NSFW_MSG_LEN_ (40)
49 #define _NSFW_SYSINFO_FLAG_ (4)
50 #define _NSFW_SYSINFO_SIZE_ (64)
51
52 /*
53  * The following definitions are published definitions.
54  */
55 #define NSFW_GET_MESSAGE(msg) \
56   ((*((unsigned int *)msg) & _NSFW_SYSINFO_FLAG_) ? \
57     ((unsigned char *)msg) + _NSFW_MSG_LEN_ + _NSFW_SYSINFO_SIZE_ : \
58     ((unsigned char *)msg) + _NSFW_MSG_LEN_)
59
60 #endif  // _nsfw_message_h_  // NOLINT  (build/header_guard)
61 //@}
62 /**@}*/  // end of utility
63 /**@}*/  // end of framework_unified
64 /**@}*/  // end of native_service
65 /**@}*/  // end of BaseSystem