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 #ifndef TASK_MANAGER_SERVER_INCLUDE_TSKM_MAIN_H_
18 #define TASK_MANAGER_SERVER_INCLUDE_TSKM_MAIN_H_
20 #include <system_service/ss_boot_map.h>
22 #include "system_service/tskm_svc.h"
23 #include "system_service/tskm_local_type.h"
24 #include "tskm_comm.h"
25 #include "tskm_type_local.h"
29 TSKM_BOOL_t isExec; // Executing flag
30 TSKM_STATE_t state; // TSKM state
33 TSKM_BOOL_t inApi; // API running
34 TSKM_ERR_t apiRet; // API return
35 TSKM_BOOL_t isReboot; // REBOOT request
37 TSKM_BOOL_t isOnStartDone; // System start process completion flag
38 TSKM_BOOL_t isOnStopDone; // System stop process completion flag
41 TSKM_SRV_SOCK_CTX_t sock; // priLib socket
42 int sigFd; // signalFd(process-termination-detection)
43 HANDLE hApp; // DispatcherHandle
44 int nsFd; // For receiving from the NSFW
45 int iFd; // inotify FDs
46 int resmFd; // EV FDs of RESM
49 TSKM_NV_INFO_t nvInfo; // Non-volatile information
52 T_SS_SM_START_DataStructType bootInfo; // for Pri notification
53 T_SS_SM_START_ExtDataStructType extBootInfo; // for Pri notification
56 STATEMGR__CWORD69_LOG* p__CWORD69_Log; // BUGBUG: Required or not
58 // Services management
61 // Gradual starting state management
62 TSKM_GSTEP_CTX_t wakeup;
64 // Gradual terminating state management
65 TSKM_GSTEP_CTX_t down;
68 EFrameworkunifiedStatus OnStart(const HANDLE hApp); // System start process
69 TSKM_MAIN_CTX_t* tskm_getMainCtx(void);
71 #endif // TASK_MANAGER_SERVER_INCLUDE_TSKM_MAIN_H_