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.
17 ///////////////////////////////////////////////////////////////////////////////
18 /// \ingroup tag_SystemManager
19 /// \brief This file provides support for the application heartbeat system.
21 ///////////////////////////////////////////////////////////////////////////////
23 #ifndef HEARTBEAT_INTERFACE_H_ // NOLINT
24 #define HEARTBEAT_INTERFACE_H_
26 #include <system_service/ss_system_manager_if.h>
27 #include <system_service/ss_system_manager_if_local.h>
30 * Enumeration: message category
32 typedef enum HB_STATUS {
34 , HB_STATUS_REGISTERED
41 * Structure: report message data
43 typedef struct MODULE_INFO {
44 #define SS_SM_HB_MAX_PROC_NAME_SIZE 16
45 EHBStatus ProcHBState;
46 UI_32 HeartBeatRetryCount;
47 // "ProcQueueName" is limited 16 bytes (included terminal-character NULL), so that the size of "THbReportData" will be lower than 4K Bytes.
48 CHAR ProcQueueName[SS_SM_HB_MAX_PROC_NAME_SIZE];
51 typedef struct HB_REPORT_DATA {
52 EHBStatus eEntireState; ///< entire state for a request.
53 ///< if all modules are success, it's success, otherwise failed.
54 UI_32 nNumOfModules; ///< number of modules
55 TSmModuleInfo tModuleList[SS_MAX_NUM_MODULES]; ///< module information list, which include module IDs and states
58 typedef struct HB_AVAIL_CHECK {
60 CHAR serviceName[SS_SM_HB_MAX_PROC_NAME_SIZE];
64 EFrameworkunifiedStatus HBThreadStart(HANDLE hThread);
65 EFrameworkunifiedStatus HBThreadStop(HANDLE hThread);
67 #endif // HEARTBEAT_INTERFACE_H_ // NOLINT