2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 * @file ns_endianess.h
19 * @brief \~english Provide api for convert value
22 #ifndef NS_NATIVESERVICES_INC_UTILITY_NS_ENDIANESS_H_ // NOLINT (build/header_guard)
23 #define NS_NATIVESERVICES_INC_UTILITY_NS_ENDIANESS_H_
25 #include <native_service/frameworkunified_types.h>
27 /** @addtogroup BaseSystem
30 /** @addtogroup native_service
34 /** @addtogroup framework_unified
35 * @ingroup native_service
38 /** @addtogroup utility
39 * @ingroup framework_unified
43 ////////////////////////////////////////////////////////////////////////////////////////////////
44 /// \ingroup NS_UtilityCenter
45 /// \~english @par Brief
46 /// Convert the UI_16(unsigned 16bit) value to big-endian.
47 /// \~english @param [in] f_value
48 /// UI_16 - The value to be converted
49 /// \~english @retval the big-endian value of the input param f_value
51 /// \~english @par Prerequisite
53 /// \~english @par Change of internal state
55 /// \~english @par Conditions of processing failure
57 /// \~english @par Classification
59 /// \~english @par Type
61 /// \~english @par Detail
62 /// The function converts the UI_16(unsigned 16bit) value to big-endian.
64 ////////////////////////////////////////////////////////////////////////////////////////////////
65 UI_16 ConvertEndian_UI16(UI_16 f_value); // NOLINT (readability/nolint)
67 ////////////////////////////////////////////////////////////////////////////////////////////////
68 /// \ingroup NS_UtilityCenter
69 /// \~english @par Brief
70 /// Convert the SI_16(signed 16bit) value to big-endian.
71 /// \~english @param [in] f_value
72 /// SI_16 - The value to be converted
73 /// \~english @retval the big-endian value of the input param f_value
75 /// \~english @par Prerequisite
77 /// \~english @par Change of internal state
79 /// \~english @par Conditions of processing failure
81 /// \~english @par Classification
83 /// \~english @par Type
85 /// \~english @par Detail
86 /// The function converts the SI_16(signed 16bit) value to big-endian.
88 ////////////////////////////////////////////////////////////////////////////////////////////////
89 SI_16 ConvertEndian_SI16(SI_16 f_value); // NOLINT (readability/nolint)
91 ////////////////////////////////////////////////////////////////////////////////////////////////
92 /// \ingroup NS_UtilityCenter
93 /// \~english @par Brief
94 /// Convert the UI_32(unsigned 32bit) value to big-endian.
95 /// \~english @param [in] f_value
96 /// UI_32 - The value to be converted
97 /// \~english @retval the big-endian value of the input param f_value
99 /// \~english @par Prerequisite
101 /// \~english @par Change of internal state
103 /// \~english @par Conditions of processing failure
105 /// \~english @par Classification
107 /// \~english @par Type
109 /// \~english @par Detail
110 /// The function convers the UI_32(unsigned 32bit) value to big-endian.
112 ////////////////////////////////////////////////////////////////////////////////////////////////
113 UI_32 ConvertEndian_UI32(UI_32 f_value); // NOLINT (readability/nolint)
115 ////////////////////////////////////////////////////////////////////////////////////////////////
116 /// \ingroup NS_UtilityCenter
117 /// \~english @par Brief
118 /// Convert the SI_32(signed 32bit) value to big-endian.
119 /// \~english @param [in] f_value
120 /// SI_32 - The value to be converted
121 /// \~english @retval the big-endian value of the input param f_value
123 /// \~english @par Prerequisite
125 /// \~english @par Change of internal state
127 /// \~english @par Conditions of processing failure
129 /// \~english @par Classification
131 /// \~english @par Type
133 /// \~english @par Detail
134 /// The function convers the SI_32(signed 32bit) value to big-endian.
136 ////////////////////////////////////////////////////////////////////////////////////////////////
137 SI_32 ConvertEndian_SI32(SI_32 f_value); // NOLINT (readability/nolint)
139 ////////////////////////////////////////////////////////////////////////////////////////////////
140 /// \ingroup NS_UtilityCenter
141 /// \~english @par Brief
142 /// Convert the UI_64(unsigned 64bit) value to big-endian.
143 /// \~english @param [in] f_value
144 /// UI_64 - The value to be converted
145 /// \~english @retval the big-endian value of the input param f_value
147 /// \~english @par Prerequisite
149 /// \~english @par Change of internal state
151 /// \~english @par Conditions of processing failure
153 /// \~english @par Classification
155 /// \~english @par Type
157 /// \~english @par Detail
158 /// The function convers the UI_64(unsigned 64bit) value to big-endian.
160 ////////////////////////////////////////////////////////////////////////////////////////////////
161 UI_64 ConvertEndian_UI64(UI_64 f_value); // NOLINT (readability/nolint)
163 ////////////////////////////////////////////////////////////////////////////////////////////////
164 /// \ingroup NS_UtilityCenter
165 /// \~english @par Brief
166 /// Convert the SI_64(signed 64bit) value to big-endian.
167 /// \~english @param [in] f_value
168 /// SI_64 - The value to be converted
169 /// \~english @retval the big-endian value of the input param f_value
171 /// \~english @par Prerequisite
173 /// \~english @par Change of internal state
175 /// \~english @par Conditions of processing failure
177 /// \~english @par Classification
179 /// \~english @par Type
181 /// \~english @par Detail
182 /// The function convers the SI_64(signed 64bit) value to big-endian.
184 ////////////////////////////////////////////////////////////////////////////////////////////////
185 SI_64 ConvertEndian_SI64(SI_64 f_value); // NOLINT (readability/nolint)
187 #endif // NS_NATIVESERVICES_INC_UTILITY_NS_ENDIANESS_H_ // NOLINT (build/header_guard)
189 /** @}*/ // end of utility
190 /** @}*/ // end of framework_unified
191 /** @}*/ // end of native_service
192 /** @}*/ // end of BaseSystem