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.
18 * @brief \~english This file contains the enum,struct and api of cl_monitor.
20 #ifndef _cl_monitor_h_ // NOLINT(build/header_guard)
21 #define _cl_monitor_h_ // NOLINT(build/header_guard)
25 /////////////////////////////////////////////////////////////////////////////////////
27 /// \~english @par Brief
29 /////////////////////////////////////////////////////////////////////////////////////
31 CL_MONITOR_INIT_SYSTEM = 0,
35 /////////////////////////////////////////////////////////////////////////////////////
37 /// \~english @par Brief
38 /// the struct of Monitor Entry
39 /////////////////////////////////////////////////////////////////////////////////////
51 /////////////////////////////////////////////////////////////////////////////////////
53 /// \~english @par Brief
55 /////////////////////////////////////////////////////////////////////////////////////
57 CL_MONITOR_TYPE_GENERIC = 0,
61 /////////////////////////////////////////////////////////////////////////////////////
63 /// \~english @par Brief
64 /// Monitor state enum
65 /////////////////////////////////////////////////////////////////////////////////////
67 CL_MONITOR_STATE_SLEEP = 0,
72 /////////////////////////////////////////////////////////////////////////////////////
74 /// \~english @par Brief
75 /// the struct of Monitor Search
76 /////////////////////////////////////////////////////////////////////////////////////
78 CL_MonitorEntry_t *entry_list;
89 /** @addtogroup BaseSystem
92 /** @addtogroup native_service
96 /** @addtogroup common_library
97 * @ingroup native_service
101 /////////////////////////////////////////////////////////////////////////////////////
103 /// \~english @par Brief
104 /// Monitor initialize
105 /// \~english @param [in] init_type
106 /// CL_MonitorInit_t - the type of initialzation
107 /// \~english @retval 0 Success
108 /// \~english @retval -1 Error
109 /// \~english @par Prerequisite
111 /// \~english @par Change of internal state
113 /// \~english @par Conditions of processing failure
115 /// \~english @par Classification
117 /// \~english @par Type
119 /// \~english @par Detail
121 /// \~english @see None
122 ////////////////////////////////////////////////////////////////////////////////////
123 int CL_MonitorInit(CL_MonitorInit_t init_type); // NOLINT(readability/nolint)
126 /////////////////////////////////////////////////////////////////////////////////////
128 /// \~english @par Brief
129 /// Set Monitor Entry
130 /// \~english @param [in] type
131 /// CL_MonitorType_t - the type of monitor
132 /// \~english @param [in] state
133 /// CL_MonitorState_t - the state of monitor
134 /// \~english @param [in] timeout
135 /// uint32_t - the vlaue of timeout
136 /// \~english @param [in] user_data
137 /// uint32_t - the user data
138 /// \~english @retval 0 Success
139 /// \~english @retval -1 Error
140 /// \~english @par Prerequisite
142 /// \~english @par Change of internal state
144 /// \~english @par Conditions of processing failure
146 /// \~english @par Classification
148 /// \~english @par Type
150 /// \~english @par Detail
152 /// \~english @see None
153 ////////////////////////////////////////////////////////////////////////////////////
154 int CL_MonitorSetEntry(CL_MonitorType_t type, uint32_t id, // NOLINT(readability/nolint)
155 CL_MonitorState_t state, uint32_t timeout,
159 /////////////////////////////////////////////////////////////////////////////////////
161 /// \~english @par Brief
162 /// Get Monitor Entry
163 /// \~english @param [in] type
164 /// CL_MonitorType_t - the type of monitor
165 /// \~english @param [in] id
166 /// uint32_t - the monitor id
167 /// \~english @param [out] entry
168 /// CL_MonitorEntry_t* - the pointer to monitor entry
169 /// \~english @retval 0 Success
170 /// \~english @retval -1 Error
171 /// \~english @par Prerequisite
173 /// \~english @par Change of internal state
175 /// \~english @par Conditions of processing failure
177 /// \~english @par Classification
179 /// \~english @par Type
181 /// \~english @par Detail
183 /// \~english @see None
184 ////////////////////////////////////////////////////////////////////////////////////
185 int CL_MonitorGetEntry(CL_MonitorType_t type, uint32_t id, CL_MonitorEntry_t *entry); // NOLINT(readability/nolint)
188 /////////////////////////////////////////////////////////////////////////////////////
190 /// \~english @par Brief
191 /// Monitor searth intialize
192 /// \~english @param [in] serch
193 /// CL_MonitorSearch_t* - the pointor to monitory search
194 /// \~english @retval 0 Success
195 /// \~english @retval -1 Error
196 /// \~english @par Prerequisite
198 /// \~english @par Change of internal state
200 /// \~english @par Conditions of processing failure
202 /// \~english @par Classification
204 /// \~english @par Type
206 /// \~english @par Detail
208 /// \~english @see None
209 ////////////////////////////////////////////////////////////////////////////////////
210 int CL_MonitorSearchInit(CL_MonitorSearch_t *serch); // NOLINT(readability/nolint)
213 /////////////////////////////////////////////////////////////////////////////////////
215 /// \~english @par Brief
216 /// Monitor searth destroy
217 /// \~english @param [in] serch
218 /// CL_MonitorSearch_t* - the pointor to monitory search
219 /// \~english @retval 0 Success
220 /// \~english @retval -1 Error
221 /// \~english @par Prerequisite
223 /// \~english @par Change of internal state
225 /// \~english @par Conditions of processing failure
227 /// \~english @par Classification
229 /// \~english @par Type
231 /// \~english @par Detail
233 /// \~english @see None
234 ////////////////////////////////////////////////////////////////////////////////////
235 int CL_MonitorSearchDestroy(CL_MonitorSearch_t *serch); // NOLINT(readability/nolint)
238 /////////////////////////////////////////////////////////////////////////////////////
240 /// \~english @par Brief
241 /// Monitor searth timeout
242 /// \~english @param [in] serch
243 /// CL_MonitorSearch_t* - the pointor to monitory search
244 /// \~english @retval 0 Success
245 /// \~english @retval -1 Error
246 /// \~english @par Prerequisite
248 /// \~english @par Change of internal state
250 /// \~english @par Conditions of processing failure
252 /// \~english @par Classification
254 /// \~english @par Type
256 /// \~english @par Detail
258 /// \~english @see None
259 ////////////////////////////////////////////////////////////////////////////////////
260 int CL_MonitorSearchTimeout(CL_MonitorSearch_t *search); // NOLINT(readability/nolint)
262 /** @}*/ // end of common_library
263 /** @}*/ // end of NativeService
264 /** @}*/ // end of BaseSystem
269 #endif /* ifndef _cl_monitor_h_ */ // NOLINT(build/header_guard)