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 * @file tskm_xml_data.h
18 * @brief \~english This file provide api to operating task manager with XML data
20 /** @addtogroup BaseSystem
23 /** @addtogroup system_service
27 /** @addtogroup task_manager
28 * @ingroup system_service
31 #ifndef TASK_MANAGER_CLIENT_LIBTSKMCFG_INCLUDE_SYSTEM_SERVICE_TSKM_XML_DATA_H_
32 #define TASK_MANAGER_CLIENT_LIBTSKMCFG_INCLUDE_SYSTEM_SERVICE_TSKM_XML_DATA_H_
34 #include "system_service/tskm_type.h"
35 #include "system_service/tskm_svc.h"
42 /////////////////////////////////////////////////////////////////////////////////////
43 /// \ingroup tskm_initServiceList
44 /// \~english @par Summary
45 /// init started services list
46 /// \~english @param [out] p_svcs
47 /// p_svcs - pointer of service list
49 /// p_svcs TSKM_SVCS_CTX_t*
52 /// uint32_t svcNum; // service num
53 /// TSKM_SVC_CTX_t *svcList; // services list pointer
54 /// } TSKM_SVCS_CTX_t;
56 /// \~english @param [in] iFd
57 /// iFd - the file descriptor return by inotify_init1().
60 /// \~english @retval 0 Success
61 /// \~english @retval -1 Failed
62 /// \~english @par Preconditions
63 /// - called in the ctxCreate()
64 /// \~english @par Change of the internal state
65 /// - The internal state is not changed.
66 /// \~english @par Causes of failures
67 /// - if srvId in serviceList greater than TSKM_SVC_ID_MAX_SIZE. [-1]
68 /// \~english @par Classification
70 /// \~english @par Type
72 /// \~english @par Detail
73 /// Init started services list\n
74 /// Get the started services list from static variable serviceList and init by input parameter iFd\n
75 /// If envirment is NFS, change the path after /tmp to CAP path.\n
77 /// \~english @see None
78 ////////////////////////////////////////////////////////////////////////////////////
79 int tskm_initServiceList(TSKM_SVCS_CTX_t* p_svcs, int iFd);
81 /////////////////////////////////////////////////////////////////////////////////////
82 /// \ingroup tskm_initWakeupCtx
83 /// \~english @par Summary
84 /// Get state of started step.
85 /// \~english @param [out] p_wakeup
86 /// p_wakeup - pointer of TSKM_GSTEP_CTX_t
88 /// p_wakeup TSKM_GSTEP_CTX_t*
91 /// uint32_t gstepIdx; // step Index
92 /// uint32_t gstepNum; // number of step
93 /// TSKM_GSTEP_t* gstep; // step start/stop info
94 /// uint64_t compState;
95 /// } TSKM_GSTEP_CTX_t;
97 /// \~english @param [in] isVupMode
98 /// isVupMode - version up flag
101 /// TRUE version up mode
102 /// FALSE not versoin up mode
103 /// \~english @retval void
105 /// \~english @par Preconditions
106 /// - called in ctxCreate()
107 /// \~english @par Change of the internal state
108 /// - The internal state is not changed.
109 /// \~english @par Causes of failures
111 /// \~english @par Classification
113 /// \~english @par Type
115 /// \~english @par Detail
116 /// Get state of started step.\n
117 /// if version up mode is TRUE, retrun the wakeupGstepVup.\n
118 /// if version up mode is FALSE, return the wakeupGstep.\n
120 /// \~english @see None
121 ////////////////////////////////////////////////////////////////////////////////////
122 void tskm_initWakeupCtx(TSKM_GSTEP_CTX_t* p_wakeup, BOOL isVupMode);
125 /////////////////////////////////////////////////////////////////////////////////////
126 /// \ingroup tskm_initDownCtx
127 /// \~english @par Summary
128 /// Get state of down step.
129 /// \~english @param [out] p_down
130 /// p_down - pointer of TSKM_GSTEP_CTX_t
132 /// p_wakeup TSKM_GSTEP_CTX_t*
135 /// uint32_t gstepIdx; // step Index
136 /// uint32_t gstepNum; // number of step
137 /// TSKM_GSTEP_t* gstep; // step start/stop info
138 /// uint64_t compState;
139 /// } TSKM_GSTEP_CTX_t;
141 /// \~english @param [in] isVupMode
142 /// isVupMode - version up mode flag
145 /// TRUE version up mode
146 /// FALSE not versoin up mode
147 /// \~english @retval
148 /// \~english @par Preconditions
149 /// - called in ctxCreate().
150 /// \~english @par Change of the internal state
151 /// - The internal state is not changed.
152 /// \~english @par Causes of failures
154 /// \~english @par Classification
156 /// \~english @par Type
158 /// \~english @par Detail
159 /// Get state of down step.\n
160 /// if version up mode is TRUE, retrun the downGstepVup.\n
161 /// if version up mode is FALSE, return the downGstep.\n
162 /// \~english @see None
163 ////////////////////////////////////////////////////////////////////////////////////
164 void tskm_initDownCtx(TSKM_GSTEP_CTX_t* p_down, BOOL isVupMode);
170 #endif // TASK_MANAGER_CLIENT_LIBTSKMCFG_INCLUDE_SYSTEM_SERVICE_TSKM_XML_DATA_H_