diff options
Diffstat (limited to 'service/system/task_manager/client/ss_data_init/include')
4 files changed, 263 insertions, 0 deletions
diff --git a/service/system/task_manager/client/ss_data_init/include/libss_data_init_taskmanagerlog.h b/service/system/task_manager/client/ss_data_init/include/libss_data_init_taskmanagerlog.h new file mode 100755 index 0000000..39422e9 --- /dev/null +++ b/service/system/task_manager/client/ss_data_init/include/libss_data_init_taskmanagerlog.h @@ -0,0 +1,78 @@ +/* + * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef TASK_MANAGER_CLIENT_SS_DATA_INIT_INCLUDE_LIBSS_DATA_INIT_TASKMANAGERLOG_H_ +#define TASK_MANAGER_CLIENT_SS_DATA_INIT_INCLUDE_LIBSS_DATA_INIT_TASKMANAGERLOG_H_ + +#include <native_service/ns_logger_if.h> + +#define ZONE_INIT ZONEMASK(10) // library common def +#define ZONE_FUNC ZONEMASK(11) // library common def +#define ZONE_MEM ZONEMASK(12) // library common def +#define ZONE_13 ZONEMASK(13) +#define ZONE_14 ZONEMASK(14) +#define ZONE_15 ZONEMASK(15) +#define ZONE_16 ZONEMASK(16) +#define ZONE_17 ZONEMASK(17) +#define ZONE_18 ZONEMASK(18) +#define ZONE_19 ZONEMASK(19) +#define ZONE_20 ZONEMASK(20) +#define ZONE_21 ZONEMASK(21) +#define ZONE_22 ZONEMASK(22) +#define ZONE_23 ZONEMASK(23) +#define ZONE_24 ZONEMASK(24) +#define ZONE_25 ZONEMASK(25) +#define ZONE_26 ZONEMASK(26) +#define ZONE_27 ZONEMASK(27) +#define ZONE_28 ZONEMASK(28) +#define ZONE_INFO ZONEMASK(29) // library common def +#define ZONE_WARN ZONEMASK(30) // library common def +#define ZONE_ERR ZONEMASK(31) // library common def + +#define ZONE_TEXT_10 "Init" +#define ZONE_TEXT_11 "Function" +#define ZONE_TEXT_12 "Memory" +#define ZONE_TEXT_13 "" +#define ZONE_TEXT_14 "" +#define ZONE_TEXT_15 "" +#define ZONE_TEXT_16 "" +#define ZONE_TEXT_17 "" +#define ZONE_TEXT_18 "" +#define ZONE_TEXT_19 "" +#define ZONE_TEXT_20 "" +#define ZONE_TEXT_21 "" +#define ZONE_TEXT_22 "" +#define ZONE_TEXT_23 "" +#define ZONE_TEXT_24 "" +#define ZONE_TEXT_25 "" +#define ZONE_TEXT_26 "" +#define ZONE_TEXT_27 "" +#define ZONE_TEXT_28 "" +#define ZONE_TEXT_29 "Info" +#define ZONE_TEXT_30 "Warning" +#define ZONE_TEXT_31 "Error" + +#ifndef FRAMEWORKUNIFIEDLOGOPTIONS +#define FRAMEWORKUNIFIEDLOGOPTIONS (LPRINT) // LPRINT +#endif + +#ifndef FRAMEWORKUNIFIEDLOGAPPZONES +#define FRAMEWORKUNIFIEDLOGAPPZONES ZONE_INFO +#endif /* FRAMEWORKUNIFIEDLOGAPPZONES */ + +extern FRAMEWORKUNIFIEDLOGPARAM g_FrameworkunifiedLogParams; + +#endif // TASK_MANAGER_CLIENT_SS_DATA_INIT_INCLUDE_LIBSS_DATA_INIT_TASKMANAGERLOG_H_ diff --git a/service/system/task_manager/client/ss_data_init/include/system_service/task_manager_libss_data_init.h b/service/system/task_manager/client/ss_data_init/include/system_service/task_manager_libss_data_init.h new file mode 100755 index 0000000..e3bdfc5 --- /dev/null +++ b/service/system/task_manager/client/ss_data_init/include/system_service/task_manager_libss_data_init.h @@ -0,0 +1,39 @@ +/* + * @copyright Copyright (c) 2017-2020 TOYOTA MOTOR CORPORATION. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @file + * @brief \~english This file include tskm_data_init.h + */ +/** @addtogroup BaseSystem + * @{ + */ +/** @addtogroup system_service + * @ingroup BaseSystem + * @{ + */ +/** @addtogroup task_manager + * @ingroup system_service + * @{ + */ +#ifndef SYSTEMSERVICE_TASKMNAGERLIBSSDATAINIT_H_ // NOLINT(build/header_guard) +#define SYSTEMSERVICE_TASKMNAGERLIBSSDATAINIT_H_ + +#include "system_service/tskm_data_init.h" + +#endif // SYSTEMSERVICE_TASKMNAGERLIBSSDATAINIT_H_ +/** @}*/ +/** @}*/ +/** @}*/ diff --git a/service/system/task_manager/client/ss_data_init/include/system_service/tskm_data_init.h b/service/system/task_manager/client/ss_data_init/include/system_service/tskm_data_init.h new file mode 100755 index 0000000..8cb49d6 --- /dev/null +++ b/service/system/task_manager/client/ss_data_init/include/system_service/tskm_data_init.h @@ -0,0 +1,121 @@ +/* + * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/** + * @file tskm_data_init.h + * @brief \~english This file contains API of initial task manager data + */ +/** @addtogroup BaseSystem + * @{ + */ +/** @addtogroup system_service + * @ingroup BaseSystem + * @{ + */ +/** @addtogroup task_manager + * @ingroup system_service + * @{ + */ + +#ifndef TASK_MANAGER_CLIENT_SS_DATA_INIT_INCLUDE_SYSTEM_SERVICE_TSKM_DATA_INIT_H_ +#define TASK_MANAGER_CLIENT_SS_DATA_INIT_INCLUDE_SYSTEM_SERVICE_TSKM_DATA_INIT_H_ + +#include <native_service/frameworkunified_types.h> +#include <system_service/ss_system_manager_if.h> +#include "system_service/tskm_type.h" + +///////////////////////////////////////////////////////////////////////////////////// +/// \ingroup TSKM_GetExtBootInfo +/// \~english @par Summary +/// Gets boot extended information. +/// \~english @param [in] p_info +/// T_SS_SM_START_ExtDataStructType * - Boot extended information +/// \~english @code +/// typedef struct { +/// BOOL isProgUpdated; +/// EMRelaunchStatus relaunchStatus; +/// BOOL isMapUpdated; +/// BOOL isMapDiffUpdated; +/// uint8_t reserved[]; +/// }T_SS_SM_START_ExtDataStructType; +/// @endcode +/// \~english @retval TSKM_E_OK Normal end +/// \~english @retval TSKM_E_PAR %Parameter error +/// \~english @par Preconditions +/// - None +/// \~english @par Change of the internal state +/// - The internal state is not changed. +/// \~english @par Causes of failures +/// - p_info is NULL. [TSKM_E_PAR] +/// \~english @par Classification +/// Public +/// \~english @par Type +/// Sync only +/// \~english @par Detail +/// Is available only at the functions defined by using TSKM_DATA_INIT_FUNC. +/// \~english @see TSKM_DATA_INIT_FUNC +//////////////////////////////////////////////////////////////////////////////////// +TSKM_ERR_t TSKM_GetExtBootInfo(T_SS_SM_START_ExtDataStructType *p_info); + +///////////////////////////////////////////////////////////////////////////////////// +/// \ingroup TSKM_DATA_INIT_FUNC +/// \~english @par Summary +/// Defines callback functions to initialize data. +/// \~english @param [in] serviceName +/// const char* - Service name +/// \~english @param [in] argName +/// const T_SS_SM_START_DataStructType* - Argument name +/// \~english @code +/// typedef struct T_SS_SM_START_DataStruct{ +/// EPWR_WAKEUP_FACTOR_TYPE startupReason; +/// BOOL isUserModeOn; +/// ESMDataResetModeInfo dataResetMode; +/// EPWR_SC_SECURITY_STATUS securityStatus; +/// EPWR_SC_WAKEUP_TYPE wakeupType; +/// ESMDramBackupStatus dramBackupStatus; +/// ESMResetStatus resetStatus; +/// UI_32 resetCount; +/// } T_SS_SM_START_DataStructType; +/// @endcode +/// \~english @retval eFrameworkunifiedStatusOK Normal +/// \~english @retval eFrameworkunifiedStatusFail Check error +/// \~english @par Preconditions +/// - None +/// \~english @par Change of the internal state +/// - The internal state is not changed. +/// \~english @par Causes of failures +/// - Return values depend on the mount of callback functions. [eFrameworkunifiedStatusFail] +/// \~english @par Classification +/// Public +/// \~english @par Detail +/// Defines the callback functions to initialize data. \n +/// The callback functions defined by this macro are executed at a timing +/// when boot factor is fixed after booting the system. \n +/// (Task_Manager executes Callback prior to the boot of ActivityManager.)\n +/// If each service mounts and installs initialization functions, Task_Manager boots it +/// at a timing when data initialization is necessary. \n +/// Each service can install the object file of initialization functions by setting them +/// to MAKE variables INST_DATAINITOBJ of Makefile. +/// \~english @see None +//////////////////////////////////////////////////////////////////////////////////// +#define TSKM_DATA_INIT_FUNC(ServiceName, ArgName) \ + EFrameworkunifiedStatus tskm_ ## ServiceName ## _data_init(T_SS_SM_START_DataStructType* ArgName) + +#endif // TASK_MANAGER_CLIENT_SS_DATA_INIT_INCLUDE_SYSTEM_SERVICE_TSKM_DATA_INIT_H_ +/** @}*/ // end of Task_Manager +/** @}*/ // end of SystemService +/** @}*/ // end of BaseSystem diff --git a/service/system/task_manager/client/ss_data_init/include/tskm_data_init_local.h b/service/system/task_manager/client/ss_data_init/include/tskm_data_init_local.h new file mode 100755 index 0000000..9d77d19 --- /dev/null +++ b/service/system/task_manager/client/ss_data_init/include/tskm_data_init_local.h @@ -0,0 +1,25 @@ +/* + * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef TASK_MANAGER_CLIENT_SS_DATA_INIT_INCLUDE_TSKM_DATA_INIT_LOCAL_H_ +#define TASK_MANAGER_CLIENT_SS_DATA_INIT_INCLUDE_TSKM_DATA_INIT_LOCAL_H_ + +#include "system_service/tskm_data_init.h" + +extern void tskm_dataInitAll(T_SS_SM_START_DataStructType *arg, + T_SS_SM_START_ExtDataStructType *extArg); + +#endif // TASK_MANAGER_CLIENT_SS_DATA_INIT_INCLUDE_TSKM_DATA_INIT_LOCAL_H_ |