2 * @copyright Copyright (c) 2017-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 soc_temperature_hal.h
21 #ifndef HAL_API_SOC_TEMPERATURE_HAL_H_
22 #define HAL_API_SOC_TEMPERATURE_HAL_H_
24 #include <native_service/frameworkunified_types.h>
26 /** @addtogroup soc_temperature_hal
35 * \ingroup GetSoCTemperature
36 * \~english @par Brief
37 * Get SoC temperature value(unit:celsius).
38 * \~english @param [out] temperature
39 * float* - degree celsius
40 * \~english @retval eFrameworkunifiedStatusOK Success
41 * \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
42 * \~english @retval eFrameworkunifiedStatusFail Abnormal Error (system error)
43 * \~english @par Prerequisite
44 * - The SoC has temperature sensor, and the thermal driver is available.
45 * \~english @par Change of internal state
46 * - Change of internal state according to the API does not occur.
47 * \~english @par Conditions of processing failure
48 * - Parameter temperature is NULL[eFrameworkunifiedStatusNullPointer]
49 * - System error(open/read/close failed)[eFrameworkunifiedStatusFail]
50 * \~english @par Classification
54 * \~english @par Detail
55 * - Get SoC temperature value.
56 * - On success eFrameworkunifiedStatusOK is returned and the parameter temperature is set.
57 * - Not eFrameworkunifiedStatusOK is returned if an error occurred.
58 * - Return value shall be checked before temperature is refered.
63 * #include <soc_temperature_hal.h>
64 * #include <native_service/frameworkunified_types.h>
66 * int main(int argc, char *argv[]) {
67 * float temperature = 0.0f;
68 * EFrameworkunifiedStatus status = GetSoCTemperature(&temperature);
69 * if (status != eFrameworkunifiedStatusOK) {
70 * printf("Get SoC temperature failed\n");
73 * printf("SoC temperature: %f\n", temperature);
80 EFrameworkunifiedStatus GetSoCTemperature(float* temperature);
86 /** @}*/ // end of soc_temperature_hal
88 #endif // HAL_API_SOC_TEMPERATURE_HAL_H_