common_library: gettid is multiple declaration in cl_error
[staging/basesystem.git] / video_in_hal / otherservice / event_library / library / include / other_service / ev_lib.h
1 /*
2  * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
3  *
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
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 /**
18  * @file ev_lib.h
19  * @brief  \~english Event library -- API define head file
20  */
21
22 #ifndef OTHERSERVICE_EV_LIB_H_  // NOLINT(build/header_guard)
23 #define OTHERSERVICE_EV_LIB_H_  // NOLINT(build/header_guard)
24
25 #include <agl_types_obsoluted.h>
26 #include <agldd/ev_common.h>
27 /** @addtogroup BaseSystem
28  *  @{
29  */
30 /** @addtogroup other_service
31  *  @ingroup BaseSystem
32  *  @{
33  */
34 /** @addtogroup event_library
35  *  @ingroup other_service
36  *  @{
37  */
38
39 #ifndef __KERNEL__
40
41 #ifdef __cplusplus
42 extern "C" {
43 #endif /* __cplusplus */
44
45 /* Create/Delete flag and message queue */
46 /////////////////////////////////////////////////////////////////////////////////////
47 /// \ingroup EV_create_flag
48 /// \~english @par Brief
49 ///       Create flag for event flag by the flag_id.
50 /// \~english @param [in] flag_id
51 ///       EV_ID    - Flag ID of the flag event
52 /// \~english @par
53 ///         EV_ID type parameter
54 ///   @code
55 ///         typedef UINT32 EV_ID
56 ///         @endcode
57 /// \~english @retval EV_OK Successful completion
58 /// \~english @retval EV_ERR_Invalid_ID Invalid flag_id
59 /// \~english @retval EV_ERR_Thread_Over The MAX of event thread.
60 /// \~english @retval EV_ERR_Exist Duplication Error
61 /// \~english @retval EV_ERR_Fatal Abnormal error
62 /// \~english @par Prerequisite
63 ///       There is no prerequisite
64 /// \~english @par Change of internal state
65 ///       There is no change of the internal Status
66 /// \~english @par Conditions of processing failure
67 ///       - Input parameter error (specifying incorrect flag_id)
68 ///       --incorrect flag_id: The ID is not created by function of EV_moduleID_to_flagID().
69 ///          - EV_ERR_Invalid_ID
70 ///       - Startup thread upper limit (16) error
71 ///          - EV_ERR_Thread_Over
72 ///       - flag_id registered in launch thread
73 ///       - Flag corresponding to flag_id already exists
74 ///          - EV_ERR_Exist
75 ///       - Securing free space of thread information management table (malloc) Failure
76 ///       - Flag pool is NULL
77 ///       - Flag generation corresponding to flag_id failed
78 ///          - EV_ERR_Fatal
79 /// \~english @par Classification
80 ///       Public
81 /// \~english @par Type
82 ///       Sync Only
83 /// \~english @par Detail
84 ///       Creates flag with ID specified by the argument.
85 ///       An error occurs if flag of the specified ID already exists.
86 /// \~english @see  evk_open, evk_close, evk_ioctl, evk_create_flag, evk_set_poll
87 ////////////////////////////////////////////////////////////////////////////////////
88
89 EV_ERR EV_create_flag(EV_ID flag_id);  // NOLINT (readability/nolint)
90
91 /////////////////////////////////////////////////////////////////////////////////////
92 /// \ingroup EV_create_flag64
93 /// \~english @par Brief
94 ///       Create flag for event flag by the flag_id.
95 /// \~english @param [in] flag_id
96 ///       EV_ID    - Flag ID of the flag event
97 /// \~english @par
98 ///         EV_ID type parameter
99 ///   @code
100 ///         typedef UINT32 EV_ID
101 ///         @endcode
102 /// \~english @retval EV_OK Successful completion
103 /// \~english @retval EV_ERR_Invalid_ID Invalid flag_id
104 /// \~english @retval EV_ERR_Thread_Over The MAX of event thread.
105 /// \~english @retval EV_ERR_Exist Duplication Error
106 /// \~english @retval EV_ERR_Fatal Abnormal error
107 /// \~english @par Prerequisite
108 ///       There is no prerequisite
109 /// \~english @par Change of internal state
110 ///       There is no change of the internal Status
111 /// \~english @par Conditions of processing failure
112 ///       - Input parameter error (specifying incorrect flag_id)
113 ///       --incorrect flag_id: The ID is not created by function of EV_moduleID_to_flag64ID ().
114 ///          - EV_ERR_Invalid_ID
115 ///       - Startup thread upper limit (16) error
116 ///          - EV_ERR_Thread_Over
117 ///       - flag_id registered in launch thread
118 ///       - Flag corresponding to flag_id already exists
119 ///          - EV_ERR_Exist
120 ///       - Securing free space of thread information management table (malloc) Failure
121 ///       - Flag pool is NULL
122 ///       - Flag generation corresponding to flag_id failed
123 ///          - EV_ERR_Fatal
124 /// \~english @par Classification
125 ///       Public
126 /// \~english @par Type
127 ///       Sync Only
128 /// \~english @par Detail
129 ///       Creates flag with ID specified by the argument.
130 ///       An error occurs if flag of the specified ID already exists.
131 /// \~english @see  evk_open, evk_close, evk_ioctl, evk_create_flag, evk_set_poll
132 ////////////////////////////////////////////////////////////////////////////////////
133
134 EV_ERR EV_create_flag64(EV_ID flag_id);  // NOLINT (readability/nolint)
135
136 /////////////////////////////////////////////////////////////////////////////////////
137 /// \ingroup EV_create_queue
138 /// \~english @par Brief
139 ///       Create message queue with the queue_id.
140 /// \~english @param [in] queue_id
141 ///       EV_ID  - queue_id of message event
142 /// \~english @par
143 ///         EV_ID type parameter
144 ///   @code
145 ///         typedef UINT32 EV_ID
146 ///         @endcode
147 /// \~english @param [in] length
148 ///       UINT8  - length of message queue (Maximum accumulated number of the messages)
149 /// \~english @param [in] max_bytes
150 ///       UINT16  - the maximum number of bytes per 1 message(MAX 2048)
151 /// \~english @param [in] type
152 ///       EV_Message_Queue_Type  - classification of the processing when the queue received more event
153 ///                              - in the queue full state.
154 /// \~english @par
155 ///       EV_Message_Queue_Type
156 /// \~english @code
157 ///       typedef UINT8 EV_Message_Queue_Type;
158 ///          -  EV_MESSAGE_QUEUE_TYPE_BUSY = 0  // Return error(EV_ERR_Busy) to origin of message transmission
159 ///          -  EV_MESSAGE_QUEUE_TYPE_FIFO = 1  // Delete the top message of the queue, and shift message
160 ///                                             // (Delete the oldest message)
161 ///          -  EV_MESSAGE_QUEUE_TYPE_REPLACE = 2  // Overwrite the last message of the queue
162 ///                                                // (Overwrite the newest message)
163 ///        @endcode
164 /// \~english @retval EV_OK Successful completion
165 /// \~english @retval EV_ERR_Invalid_ID Invalid queue_id
166 /// \~english @retval EV_ERR_Thread_Over The MAX of event thread.
167 /// \~english @retval EV_ERR_Exist Duplication Error
168 /// \~english @retval EV_ERR_Fatal Abnormal error
169 /// \~english @par Prerequisite
170 ///       There is no prerequisite
171 /// \~english @par Change of internal state
172 ///       There is no change of the internal Status
173 /// \~english @par Conditions of processing failure
174 ///       - Input parameter error (specifying incorrect queue_id)
175 ///       --incorrect queue_id:The queue_id is not created by function of EV_moduleID_to_queueID ().
176 ///          - EV_ERR_Invalid_ID
177 ///       - Startup thread upper limit (16) error
178 ///          - EV_ERR_Thread_Over
179 ///       - queue_id registered in launch thread
180 ///       - Message queue corresponding to queue_id already exists
181 ///          - EV_ERR_Exist
182 ///       - Securing free space of thread information management table (malloc) Failure
183 ///       - Access failed from kernel space to user space reference area
184 ///       - Failed to copy data from user space to kernel space
185 ///       - Message queue pool is NULL
186 ///       - Message queue generation corresponding to queue_id failed
187 ///          - EV_ERR_Fatal
188 /// \~english @par Classification
189 ///       Public
190 /// \~english @par Type
191 ///       Sync Only
192 /// \~english @par Detail
193 ///       Creates message queue with ID specified by the argument.
194 ///       When queue is created, a memory area corresponding to "length" x "max_bytes" is dynamically secured.
195 ///       An error occurs if queue of the specified ID already exists.
196 /// \~english @see evk_open, evk_close, evk_ioctl, evk_create_message_queue, evk_set_poll
197 ////////////////////////////////////////////////////////////////////////////////////
198
199 EV_ERR EV_create_queue(EV_ID                queue_id,   // NOLINT (readability/nolint)
200                       UINT8                 length,     // NOLINT (readability/nolint)
201                       UINT16                max_bytes,  // NOLINT (readability/nolint)
202                       EV_Message_Queue_Type type);      // NOLINT (readability/nolint)
203
204 /////////////////////////////////////////////////////////////////////////////////////
205 /// \ingroup EV_create_flag_auto_id
206 /// \~english @par Brief
207 ///       Automatically assign flag ID, and creates flag with flag ID.
208 /// \~english @param [out] flag_id
209 ///       EV_ID*    - flag_id assigned automatically
210 /// \~english @par
211 ///         EV_ID type parameter
212 ///   @code
213 ///         typedef UINT32 EV_ID
214 ///         @endcode
215 /// \~english @retval EV_OK Successful completion
216 /// \~english @retval EV_ERR_Thread_Over The MAX of event thread
217 /// \~english @retval EV_ERR_Fatal Abnormal error
218 /// \~english @par Prerequisite
219 ///       There is no prerequisite
220 /// \~english @par Change of internal state
221 ///       There is no change of the internal Status
222 /// \~english @par Conditions of processing failure
223 ///       - Startup thread upper limit (16) error
224 ///          - EV_ERR_Thread_Over
225 ///       - Securing free space of thread information management table (malloc) Failure
226 ///       - Flag pool is NULL
227 ///       - Flag generation corresponding to flag_id failed
228 ///          - EV_ERR_Fatal
229 /// \~english @par Classification
230 ///       Public
231 /// \~english @par Type
232 ///       Sync Only
233 /// \~english @par Detail
234 ///       Automatically assign flag ID, and creates flag with flag ID.
235 ///       It is the same as "EV_create_flag" except that flag ID is automatically allocated.
236 /// \~english @see EV_create_flag, evk_open, evk_close, evk_ioctl, evk_create_flag, evk_alloc_flag_id, evk_set_poll
237 ////////////////////////////////////////////////////////////////////////////////////
238
239 EV_ERR EV_create_flag_auto_id(/* OUT */EV_ID *flag_id);  // NOLINT (readability/nolint)
240
241 /////////////////////////////////////////////////////////////////////////////////////
242 /// \ingroup EV_create_flag64_auto_id
243 /// \~english @par Brief
244 ///       Automatically assign flag ID, and creates flag with flag ID.
245 /// \~english @param [out] flag_id
246 ///       EV_ID*    - flag_id assigned automatically
247 /// \~english @par
248 ///         EV_ID type parameter
249 ///   @code
250 ///         typedef UINT32 EV_ID
251 ///         @endcode
252 /// \~english @retval EV_OK Successful completion
253 /// \~english @retval EV_ERR_Thread_Over The MAX of event thread
254 /// \~english @retval EV_ERR_Fatal Abnormal error
255 /// \~english @par Prerequisite
256 ///       There is no prerequisite
257 /// \~english @par Change of internal state
258 ///       There is no change of the internal Status
259 /// \~english @par Conditions of processing failure
260 ///       - Startup thread upper limit (16) error
261 ///          - EV_ERR_Thread_Over
262 ///       - Securing free space of thread information management table (malloc) Failure
263 ///       - Flag pool is NULL
264 ///       - Flag generation corresponding to flag_id failed
265 ///          - EV_ERR_Fatal
266 /// \~english @par Classification
267 ///       Public
268 /// \~english @par Type
269 ///       Sync Only
270 /// \~english @par Detail
271 ///       Automatically assign flag ID, and creates flag with flag ID.
272 ///       It is the same as "EV_create_flag" except that flag ID is automatically allocated.
273 /// \~english @see EV_create_flag, evk_open, evk_close, evk_ioctl, evk_create_flag, evk_alloc_flag_id, evk_set_poll
274 ////////////////////////////////////////////////////////////////////////////////////
275
276 EV_ERR EV_create_flag64_auto_id(/* OUT */EV_ID *flag_id);  // NOLINT (readability/nolint)
277
278 /////////////////////////////////////////////////////////////////////////////////////
279 /// \ingroup EV_create_queue_auto_id
280 /// \~english @par Brief
281 ///       Automatically assign queue ID, and creates message queue with queue ID.
282 ///                                         It stores queue_id assigned automatically in argument.
283 /// \~english @param [out] queue_id
284 ///       EV_ID*  - queue_id assigned automatically
285 /// \~english @par
286 ///         EV_ID type parameter
287 ///   @code
288 ///         typedef UINT32 EV_ID
289 ///         @endcode
290 /// \~english @param [in] length
291 ///       UINT8  - length of message queue (Maximum accumulated number of the messages)
292 /// \~english @param [in] max_bytes
293 ///       UINT16  - the maximum number of bytes per 1 message(MAX 2048)
294 /// \~english @param [in] type
295 ///       EV_Message_Queue_Type  - classification of the processing when the queue received more event
296 ///                                in the queue full state.
297 /// \~english @par
298 ///       EV_Message_Queue_Type
299 /// \~english @code
300 ///       typedef UINT8 EV_Message_Queue_Type;
301 ///          -  EV_MESSAGE_QUEUE_TYPE_BUSY = 0  // Return error(EV_ERR_Busy) to origin of message transmission
302 ///          -  EV_MESSAGE_QUEUE_TYPE_FIFO = 1  // Delete the top message of the queue, and shift message
303 ///                                             // (Delete the oldest message)
304 ///          -  EV_MESSAGE_QUEUE_TYPE_REPLACE = 2  // Overwrite the last message of the queue
305 ///                                                // (Overwrite the newest message)
306 ///        @endcode
307 /// \~english @retval EV_OK Successful completion
308 /// \~english @retval EV_ERR_Thread_Over The MAX of event thread
309 /// \~english @retval EV_ERR_Fatal Abnormal error
310 /// \~english @par Prerequisite
311 ///       There is no prerequisite
312 /// \~english @par Change of internal state
313 ///       There is no change of the internal Status
314 /// \~english @par Conditions of processing failure
315 ///       - Thread is unregistered and threads started up to the maximum of event thread(16 threads)
316 ///          - EV_ERR_Thread_Over
317 ///       - Message queue corresponding to queue_id already exists
318 ///       - Securing free space of thread information management table (malloc) Failure
319 ///       - Access failed from kernel space to user space reference area
320 ///       - Failed to copy data from user space to kernel space
321 ///       - Message queue pool is NULL
322 ///       - Message queue generation corresponding to queue_id failed
323 ///          - EV_ERR_Fatal
324 /// \~english @par Classification
325 ///       Public
326 /// \~english @par Type
327 ///       Sync Only
328 /// \~english @par Detail
329 ///       Automatically assign queue id, and creates message queue with queue id, It stores queue_id
330 ///       assigned automatically in argument.
331 ///       It is the same as "EV_queue_flag" except that queue ID is automatically allocated.
332 /// \~english @see EV_create_queue, evk_open, evk_close, evk_ioctl, evk_create_message_queue,
333 ///                evk_alloc_queueID, evk_set_poll
334 ////////////////////////////////////////////////////////////////////////////////////
335
336 EV_ERR EV_create_queue_auto_id(/* OUT */EV_ID       *queue_id,  // NOLINT (readability/nolint)
337                               UINT8                 length,     // NOLINT (readability/nolint)
338                               UINT16                max_bytes,  // NOLINT (readability/nolint)
339                               EV_Message_Queue_Type type);      // NOLINT (readability/nolint)
340
341 /////////////////////////////////////////////////////////////////////////////////////
342 /// \ingroup EV_destroy_flag
343 /// \~english @par Brief
344 ///       Deletes flag with ID specified by the argument.
345 /// \~english @param [in] flag_id
346 ///       EV_ID    - Flag ID of the flag event
347 /// \~english @par
348 ///         EV_ID type parameter
349 ///   @code
350 ///         typedef UINT32 EV_ID
351 ///         @endcode
352 /// \~english @retval EV_OK Successful completion
353 /// \~english @retval EV_ERR_Invalid_ID Invalid queue_id
354 /// \~english @retval EV_ERR_Fatal Abnormal error
355 /// \~english @par Prerequisite
356 ///       Execute EV_create_flag(),EV_create_flag_auto_id() and flag has already been created.
357 /// \~english @par Change of internal state
358 ///       There is no change of the internal Status
359 /// \~english @par Conditions of processing failure
360 ///       - Input parameter error (specifying incorrect queue_id)
361 ///       --incorrect queue_id:The queue_id of essage which has not been created.
362 ///       - Flag corresponding to queue_id doesn't exist
363 ///          - EV_ERR_Invalid_ID
364 /// \~english @par Classification
365 ///       Public
366 /// \~english @par Type
367 ///       Sync Only
368 /// \~english @par Detail
369 ///       Deletes flag with ID specified by the argument.
370 ///       The user can only delete flag created by user process.
371 ///       Due to deletion, program waiting for this flag (poll or wait) wakes up.
372 /// \~english @see evk_close, evk_ioctl, evk_destroy_queue
373 ////////////////////////////////////////////////////////////////////////////////////
374
375 EV_ERR EV_destroy_flag(EV_ID queue_id);  // NOLINT (readability/nolint)
376
377 /////////////////////////////////////////////////////////////////////////////////////
378 /// \ingroup EV_destroy_queue
379 /// \~english @par Brief
380 ///       Delete queue for message event by the queue_id.
381 /// \~english @param [in] queue_id
382 ///       EV_ID    - queue_id of the message event
383 /// \~english @par
384 ///         EV_ID type parameter
385 ///   @code
386 ///         typedef UINT32 EV_ID
387 ///         @endcode
388 /// \~english @retval EV_OK Successful completion
389 /// \~english @retval EV_ERR_Invalid_ID Invalid queue_id
390 /// \~english @retval EV_ERR_Fatal Abnormal error
391 /// \~english @par Prerequisite
392 ///       Execute EV_create_queue(),EV_create_queue_auto_id() and message queue has already been created.
393 /// \~english @par Change of internal state
394 ///       There is no change of the internal Status
395 /// \~english @par Conditions of processing failure
396 ///       - Input parameter error (specifying incorrect queue_id)
397 ///       --incorrect queue_id:The queue_id of essage which has not been created.
398 ///       - Message queue corresponding to flag_id doesn't exist
399 ///          - EV_ERR_Invalid_ID
400 /// \~english @par Classification
401 ///       Public
402 /// \~english @par Type
403 ///       Sync Only
404 /// \~english @par Detail
405 ///       Deletes message queue with ID specified by the argument.
406 ///       The user can only delete message queue created by user process.
407 ///       Due to deletion, program waiting for this message queue (poll or wait) wakes up.
408 /// \~english @see EV_destroy_flag, evk_close, evk_ioctl, evk_destroy_queue
409 ////////////////////////////////////////////////////////////////////////////////////
410
411 EV_ERR EV_destroy_queue(EV_ID queue_id);  // NOLINT (readability/nolint)
412
413 /* Send event */
414 /////////////////////////////////////////////////////////////////////////////////////
415 /// \ingroup EV_set_flag
416 /// \~english @par Brief
417 ///       Set Event flag
418 /// \~english @param [in] flag_id
419 ///       EV_ID    - Flag ID of the event flag
420 /// \~english @par
421 ///         EV_ID type parameter
422 ///   @code
423 ///         typedef UINT32 EV_ID
424 ///         @endcode
425 /// \~english @param [in] bits
426 ///       UINT32      - event flag bit pattern
427 /// \~english @retval EV_OK Successful completion
428 /// \~english @retval EV_ERR_Invalid_ID Invalid flag_id
429 /// \~english @retval EV_ERR_Fatal Abnormal error
430 /// \~english @par Prerequisite
431 ///       Execute EV_create_flag(),EV_create_flag_auto_id() and flag has already been created.
432 /// \~english @par Change of internal state
433 ///       There is no change of the internal Status
434 /// \~english @par Conditions of processing failure
435 ///       - Input parameter error (specifying incorrect flag_id)
436 ///       --incorrect flag_id:The flag_id of event which has not been created.
437 ///       - Flag corresponding to flag_id doesn't exist
438 ///          - EV_ERR_Invalid_ID
439 ///       - Access failed from kernel space to user space reference area
440 ///       - Failed to copy data from user space to kernel space
441 ///          - EV_ERR_Fatal
442 /// \~english @par Classification
443 ///       Public
444 /// \~english @par Type
445 ///       Sync Only
446 /// \~english @par Detail
447 ///       Sets bit pattern specified by argument to flag of ID specified by argument.
448 ///       When setting a plurality of bit patterns in the same flag, "only OR
449 ///       operation result of all bit patterns" is held in flag.
450 /// \~english @see evk_open, evk_close, evk_ioctl, evk_store_flag
451 ////////////////////////////////////////////////////////////////////////////////////
452
453 EV_ERR EV_set_flag(EV_ID flag_id, UINT32 bits);  // NOLINT (readability/nolint)
454
455 /* Send event */
456 /////////////////////////////////////////////////////////////////////////////////////
457 /// \ingroup EV_set_flag64
458 /// \~english @par Brief
459 ///       Set Event flag
460 /// \~english @param [in] flag_id
461 ///       EV_ID    - Flag ID of the event flag
462 /// \~english @par
463 ///         EV_ID type parameter
464 ///   @code
465
466 ///         typedef UINT32 EV_ID
467 ///         @endcode
468 /// \~english @param [in] bits
469 ///       UINT32      - event flag bit pattern
470 /// \~english @retval EV_OK Successful completion
471 /// \~english @retval EV_ERR_Invalid_ID Invalid flag_id
472 /// \~english @retval EV_ERR_Fatal Abnormal error
473 /// \~english @par Prerequisite
474 ///       Execute EV_create_flag(),EV_create_flag_auto_id() and flag has already been created.
475 /// \~english @par Change of internal state
476 ///       There is no change of the internal Status
477 /// \~english @par Conditions of processing failure
478 ///       - Input parameter error (specifying incorrect flag_id)
479 ///       --incorrect flag_id:The flag_id of event which has not been created.
480 ///       - Flag corresponding to flag_id doesn't exist
481 ///          - EV_ERR_Invalid_ID
482 ///       - Access failed from kernel space to user space reference area
483 ///       - Failed to copy data from user space to kernel space
484 ///          - EV_ERR_Fatal
485 /// \~english @par Classification
486 ///       Public
487 /// \~english @par Type
488 ///       Sync Only
489 /// \~english @par Detail
490 ///       Sets bit pattern specified by argument to flag of ID specified by argument.
491 ///       When setting a plurality of bit patterns in the same flag, "only OR operation
492 ///       result of all bit patterns" is held in flag.
493 /// \~english @see evk_open, evk_close, evk_ioctl, evk_store_flag
494 ////////////////////////////////////////////////////////////////////////////////////
495
496 EV_ERR EV_set_flag64(EV_ID flag_id, UINT64 bits);  // NOLINT (readability/nolint)
497
498 /////////////////////////////////////////////////////////////////////////////////////
499 /// \ingroup EV_send_message
500 /// \~english @par Brief
501 ///       Send Message event
502 /// \~english @param [in] queue_id
503 ///       EV_ID    - Queue ID of the message destination
504 /// \~english @par
505 ///         EV_ID type parameter
506 ///   @code
507 ///         typedef UINT32 EV_ID
508 ///         @endcode
509 /// \~english @param [in] bytes
510 ///       UINT16      - The bytes of the send message
511 /// \~english @param [in] message
512 ///       const void *  - Pointer to a transmitting byte line
513 /// \~english @param [in] senderInfo
514 ///       UINT32     - Message Source(It is specified when it is used for application identification.
515 ///                    When do not use it, appoint 0.)
516 /// \~english @retval EV_OK Successful completion
517 /// \~english @retval EV_ERR_Invalid_ID Invalid queue_id
518 /// \~english @retval EV_ERR_Busy Queue overflow
519 /// \~english @retval EV_ERR_Fatal Abnormal error
520 /// \~english @par Prerequisite
521 ///       Execute EV_create_queue(),EV_create_queue_auto_id() and message queue has already been created.
522 /// \~english @par Change of internal state
523 ///       There is no change of the internal Status
524 /// \~english @par Conditions of processing failure
525 ///       - Input parameter error (specifying incorrect queue_id)
526 ///       --incorrect queue_id:The queue_id of essage which has not been created.
527 ///       - Message queue corresponding to queue_id doesn't exist
528 ///          - EV_ERR_Invalid_ID
529 ///       - Queue overflow in kernel space
530 ///          - EV_ERR_Busy
531 ///       - Access failed from kernel space to user space reference area
532 ///       - Failed to copy data from user space to kernel space
533 ///       - Invalid queue types
534 ///          - EV_ERR_Fatal
535 /// \~english @par Classification
536 ///       Public
537 /// \~english @par Type
538 ///       Sync Only
539 /// \~english @par Detail
540 ///       Sends message specified by argument to message queue of ID specified by argument.
541 ///       An error occurs when message queue of the specified ID doesn't exist or
542 ///       message size exceeds the specified size.
543 ///       When message queue is FULL, the processing differs depending on the type of message queue specified
544 ///       at the time of creation message queue.
545 /// \~english @see evk_open, evk_close, evk_ioctl, evk_store_message
546 ////////////////////////////////////////////////////////////////////////////////////
547
548 EV_ERR EV_send_message(EV_ID      queue_id,     // NOLINT (readability/nolint)
549                       UINT16      bytes,        // NOLINT (readability/nolint)
550                       const void  *message,     // NOLINT (readability/nolint)
551                       UINT32      senderInfo);  // NOLINT (readability/nolint)
552
553 /* \~english Get events in the order of arrivals */
554 ////////////////////////////////////////////////////////////////////////////////
555 /// \ingroup EV_get_next_event
556 /* \~english get events by reaching time */
557 /// \~english @par Brief  get the first reached event(non-block)
558 /// \~english @param [out] ev
559 ///       event Structure
560 /// \~english @par
561 ///         EV_Event struct
562 ///   @code
563 ///             typedef unsigned int UINT32;
564 ///             typedef UINT32 EV_Type;
565 ///             typedef UINT32 EV_ID;
566 ///             #define EV_MAX_MESSAGE_LENGTH 2048
567 ///             enum ev_message_queue_type {
568 ///               EV_MESSAGE_QUEUE_TYPE_BUSY,
569 ///               EV_MESSAGE_QUEUE_TYPE_FIFO,
570 ///               EV_MESSAGE_QUEUE_TYPE_REPLACE,
571 ///             };
572 ///
573 ///             typedef struct {
574 ///               EV_ID flagID;
575 ///               UINT32 bits;
576 ///             } EV_Flag;
577 ///
578 ///             typedef struct {
579 ///               EV_ID flagID;
580 ///               UINT64 bits;
581 ///             } EV_Flag64;
582 ///
583 ///             typedef struct {
584 ///              EV_ID queueID;
585 ///               UINT32 senderInfo;
586 ///               UINT32 length;
587 ///               UINT32 dummy;
588 ///               UINT8  message[EV_MAX_MESSAGE_LENGTH];
589 ///             } EV_Message;
590 ///
591 ///             typedef struct {
592 ///               EV_Type type;  // please reference  ev_message_queue_type.
593 ///               union {
594 ///                 EV_Flag flag;
595 ///                 EV_Flag64 flag64;
596 ///                 EV_Message message;
597 ///               } u;
598 ///             } EV_Event;
599 ///
600 ///         @endcode
601
602 /// \~english @retval EV_OK: normal termination
603 /// \~english @retval EV_ERR_Invalid_Thread: unregistered thread
604 /// \~english @retval EV_ERR_Fatal: Fatal error
605 /// \~english @par Prerequisite
606 ///    - none
607 /// \~english @par Change of internal state
608 ///    - none
609 /// \~english @par Conditions of processing failure
610 ///       - unregistered thread
611 ///          - EV_ERR_Invalid_Thread
612 ///       - Access failed from kernel space to user space reference area
613 ///       - Failed to copy data from user space to kernel space
614 ///          - EV_ERR_Fatal
615 /// \~english @par Classification
616 ///       Public
617 /// \~english @par Type
618 ///       Sync Only
619 /// \~english @par Detail
620 ///   Get the first reached event which occurred for
621 ///   flags or message queues created in current process.
622 ///   If there is no event, set ev->type to EV_EVENT_None, then return immediately.
623 ///   The event is flag or message is decided by
624 ///   the ev->type is EV_EVENT_Flag or EV_EVENT_Message.
625 // \~english @see none
626 ////////////////////////////////////////////////////////////////////////////////
627
628 EV_ERR EV_get_next_event(/* OUT */EV_Event *ev);  // NOLINT (readability/nolint)
629
630 ////////////////////////////////////////////////////////////////////////////////
631 /// \ingroup EV_peek_next_event
632 /// \~english @par Brief  get the first reached event(non-destructive)
633 /// \~english @param [out] ev
634 ///       event Structure
635 ///   @code
636 ///             typedef unsigned int UINT32;
637 ///             typedef UINT32 EV_Type;
638 ///             typedef UINT32 EV_ID;
639 ///             #define EV_MAX_MESSAGE_LENGTH 2048
640 ///             enum ev_message_queue_type {
641 ///               EV_MESSAGE_QUEUE_TYPE_BUSY,
642 ///               EV_MESSAGE_QUEUE_TYPE_FIFO,
643 ///               EV_MESSAGE_QUEUE_TYPE_REPLACE,
644 ///             };
645 ///
646 ///             typedef struct {
647 ///               EV_ID flagID;
648 ///               UINT32 bits;
649 ///             } EV_Flag;
650 ///
651 ///             typedef struct {
652 ///               EV_ID flagID;
653 ///               UINT64 bits;
654 ///             } EV_Flag64;
655 ///
656 ///             typedef struct {
657 ///              EV_ID queueID;
658 ///               UINT32 senderInfo;
659 ///               UINT32 length;
660 ///               UINT32 dummy;
661 ///               UINT8  message[EV_MAX_MESSAGE_LENGTH];
662 ///             } EV_Message;
663 ///
664 ///             typedef struct {
665 ///               EV_Type type;  // please reference  ev_message_queue_type.
666 ///               union {
667 ///                 EV_Flag flag;
668 ///                 EV_Flag64 flag64;
669 ///                 EV_Message message;
670 ///               } u;
671 ///             } EV_Event;
672 ///
673 ///         @endcode
674 /// \~english @retval EV_OK: normal termination
675 /// \~english @retval EV_ERR_Invalid_Thread: unregistered thread
676 /// \~english @retval EV_ERR_Fatal: Fatal error
677 /// \~english @par Prerequisite
678 ///    - none
679 /// \~english @par Change of internal state
680 ///    - none
681 /// \~english @par Conditions of processing failure
682 ///       - unregistered thread
683 ///          - EV_ERR_Invalid_Thread
684 ///       - Access failed from kernel space to user space reference area
685 ///       - Failed to copy data from user space to kernel space
686 ///          - EV_ERR_Fatal
687 /// \~english @par Classification
688 ///       Public
689 /// \~english @par Type
690 ///       Sync Only
691 /// \~english @par Detail
692 ///   Get the first reached event which occurred for
693 ///   flags or message queues created in current process non-destructively.
694 ///   If the event is not getted from other processes, then call the function of
695 ///   EV_get_next_event() or EV_peek_next_event(), it will return a same event.
696 ///   If there is no event, set ev->type to EV_EVENT_None, then return immediately.
697 ///   The event is flag or message is decided by
698 ///   ev->type is EV_EVENT_Flag or EV_EVENT_Message.
699 // \~english @see none
700 ////////////////////////////////////////////////////////////////////////////////
701
702 EV_ERR EV_peek_next_event(/* OUT */EV_Event *ev);  // NOLINT (readability/nolint)
703
704 /* Get eventflag (ID specified) */
705 /////////////////////////////////////////////////////////////////////////////////////
706 /// \ingroup EV_get_flag
707 /// \~english @par Brief
708 ///       Get event flag(non-block)
709 /// \~english @param [in] flag_id
710 ///       EV_ID  - Flag ID
711 /// \~english @par
712 ///         EV_ID type parameter
713 ///   @code
714 ///         typedef UINT32 EV_ID
715 ///         @endcode
716 /// \~english @param [out] flag
717 ///       EV_Flag * - event flag structure
718 /// \~english @par
719 ///       EV_Flag structure
720 /// \~english @code
721 ///       typedef struct {
722 ///         EV_ID flagID;  // Flag ID
723 ///         UINT32 bits;   // event flag bit pattern
724 ///       } EV_Flag;
725 ///       @endcode
726 /// \~english @retval EV_OK Successful completion
727 /// \~english @retval EV_ERR_Invalid_ID Invalid flag_id
728 /// \~english @retval EV_ERR_Fatal Abnormal error
729 /// \~english @par Prerequisite
730 ///       Execute EV_create_flag(),EV_create_flag_auto_id() and flag has already been created.
731 /// \~english @par Change of internal state
732 ///       There is no change of the internal Status
733 /// \~english @par Conditions of processing failure
734 ///       - Input parameter error
735 ///       - Flag corresponding to flag_id doesn't exist
736 ///       --incorrect flag_id:The flag_id of event which has not been created.
737 ///          - EV_ERR_Invalid_ID
738 ///       - Access failed from kernel space to user space reference area
739 ///       - Failed to copy data from user space to kernel space
740 ///          - EV_ERR_Fatal
741 /// \~english @par Classification
742 ///       Public
743 /// \~english @par Type
744 ///       Sync Only
745 /// \~english @par Detail
746 ///       Gets bit pattern specified by argument to flag of ID specified by argument.
747 ///       The user can only get flag created by user process, and clear bit pattern of acquired flag.
748 ///       An error occurs if flag of the specified ID doesn't exist.
749 /// \~english @see
750 ///       evk_ioctl, evk_get_event
751 ////////////////////////////////////////////////////////////////////////////////////
752
753 EV_ERR EV_get_flag(EV_ID flag_id, /* OUT */EV_Flag *flag);  // NOLINT (readability/nolint)
754
755 /////////////////////////////////////////////////////////////////////////////////////
756 /// \ingroup EV_wait_flag
757 /// \~english @par Brief
758 ///       Get event flag(block)
759 /// \~english @param [in] flag_id
760 ///       EV_ID  - Flag ID
761 /// \~english @par
762 ///         EV_ID type parameter
763 ///   @code
764 ///         typedef UINT32 EV_ID
765 ///         @endcode
766 /// \~english @param [out] flag
767 ///       EV_Flag * - event flag structure
768 /// \~english @par
769 ///       EV_Flag structure
770 /// \~english @code
771 ///       typedef struct {
772 ///         EV_ID flagID;  // Flag ID
773 ///         UINT32 bits;   // event flag bit pattern
774 ///       } EV_Flag;
775 ///       @endcode
776 /// \~english @retval EV_OK Successful completion
777 /// \~english @retval EV_ERR_Invalid_ID Invalid flag_id
778 /// \~english @retval EV_ERR_Interrupted signal interrupt
779 /// \~english @retval EV_ERR_Fatal Abnormal error
780 /// \~english @par Prerequisite
781 ///       Execute EV_create_flag(),EV_create_flag_auto_id() and flag has already been created.
782 /// \~english @par Change of internal state
783 ///       There is no change of the internal Status
784 /// \~english @par Conditions of processing failure
785 ///       - Input parameter error
786 ///       - Flag corresponding to flag_id doesn't exist
787 ///       --incorrect flag_id:The flag_id of event which has not been created.
788 ///          - EV_ERR_Invalid_ID
789 ///       - Task blocking was canceled by signal interrupt
790 ///          - EV_ERR_Interrupted
791 ///       - Access failed from kernel space to user space reference area
792 ///       - Failed to copy data from user space to kernel space
793 ///          - EV_ERR_Fatal
794 /// \~english @par Classification
795 ///       Public
796 /// \~english @par Type
797 ///       Sync Only
798 /// \~english @par Detail
799 ///       Gets bit pattern specified by argument to flag of ID specified by argument.
800 ///       The user can only get flag created by user process, and clear bit pattern of acquired flag.
801 ///       An error occurs if flag of the specified ID doesn't exist.
802 ///       If bit pattern is not set in flag, block until bit pattern is set.
803 ///       However, if a signal interrupt or corresponding flag is deleted, it will abort and return an error.
804 /// \~english @see
805 ///       evk_ioctl, evk_get_event
806 ////////////////////////////////////////////////////////////////////////////////////
807
808 EV_ERR EV_wait_flag(EV_ID flag_id, /* OUT */EV_Flag *flag);  // NOLINT (readability/nolint)
809
810 ////////////////////////////////////////////////////////////////////////////////
811 /// \ingroup EV_peek_flag
812 /// \~english @par Brief get flag event(non-destructive)
813 /// \~english @param  [in] flag_id
814 ///       ID of message event queue
815 /// \~english @param  [out] flag
816 ///       flag struct
817 /// \~english @par
818 ///         EV_ID type parameter
819 ///   @code
820 ///         typedef UINT32 EV_ID
821 ///         @endcode
822 /// \~english @par
823 ///         EV_Flag Structure
824 ///   @code
825 ///         typedef struct {
826 ///         EV_ID flagID;
827 ///           UINT32 bits;
828 ///         } EV_Flag;
829 ///         @endcode
830 /// \~english @retval EV_OK: normal termination
831 /// \~english @retval EV_ERR_Invalid_ID: The specified flag ID is not existing,
832 ///   or it is not created in current process.
833 /// \~english @retval EV_ERR_Fatal: Fatal error
834 /// \~english @par Prerequisite
835 ///    - none
836 /// \~english @par Change of internal state
837 ///    - none
838 /// \~english @par Conditions of processing failure
839 ///       - Input parameter error
840 ///       - Flag corresponding to flag_id doesn't exist
841 ///       --incorrect flag_id:The flag_id of event which has not been created.
842 ///          - EV_ERR_Invalid_ID
843 ///       - Task blocking was canceled by signal interrupt
844 ///          - EV_ERR_Interrupted
845 ///       - Access failed from kernel space to user space reference area
846 ///       - Failed to copy data from user space to kernel space
847 ///          - EV_ERR_Fatal
848 /// \~english @par Classification
849 ///       Public
850 /// \~english @par Type
851 ///       Sync Only
852 /// \~english @par Detail
853 ///   Get a flag event whose ID is specified non-destructively.
854 ///   If there is no event, just return.
855 ///   If there is no event, set flag->flagID to EV_NO_ID.
856 ///   You can judge that there is no event, even though flag->bits is 0.
857 // \~english @see none
858 ////////////////////////////////////////////////////////////////////////////////
859
860 EV_ERR EV_peek_flag(EV_ID flag_id, /* OUT */EV_Flag *flag);  // NOLINT (readability/nolint)
861
862 /* Get eventflag (ID specified) */
863 /////////////////////////////////////////////////////////////////////////////////////
864 /// \ingroup EV_get_flag64
865 /// \~english @par Brief
866 ///       Get event flag(non-block)
867 /// \~english @param [in] flag_id
868 ///       EV_ID  - Flag ID
869 /// \~english @par
870 ///         EV_ID type parameter
871 ///   @code
872 ///         typedef UINT32 EV_ID
873 ///         @endcode
874 /// \~english @param [out] flag
875 ///       EV_Flag * - event flag structure
876 /// \~english @par
877 ///       EV_Flag structure
878 /// \~english @code
879 ///       typedef unsigned int UINT32;
880 ///       typedef UINT32 EV_ID
881 ///
882 ///       typedef struct {
883 ///         EV_ID flagID;  // Flag ID
884 ///         UINT32 bits;   // event flag bit pattern
885 ///       } EV_Flag;
886 ///       @endcode
887 /// \~english @retval EV_OK Successful completion
888 /// \~english @retval EV_ERR_Invalid_ID Invalid flag_id
889 /// \~english @retval EV_ERR_Fatal Abnormal error
890 /// \~english @par Prerequisite
891 ///       Execute EV_create_flag(),EV_create_flag_auto_id() and flag has already been created.
892 /// \~english @par Change of internal state
893 ///       There is no change of the internal Status
894 /// \~english @par Conditions of processing failure
895 ///       - Input parameter error
896 ///       - Flag corresponding to flag_id doesn't exist
897 ///       --incorrect flag_id:The flag_id of event which has not been created.
898 ///          - EV_ERR_Invalid_ID
899 ///       - Access failed from kernel space to user space reference area
900 ///       - Failed to copy data from user space to kernel space
901 ///          - EV_ERR_Fatal
902 /// \~english @par Classification
903 ///       Public
904 /// \~english @par Type
905 ///       Sync Only
906 /// \~english @par Detail
907 ///       Gets bit pattern specified by argument to flag of ID specified by argument.
908 ///       The user can only get flag created by user process, and clear bit pattern of acquired flag.
909 ///       An error occurs if flag of the specified ID doesn't exist.
910 /// \~english @see
911 ///       evk_ioctl, evk_get_event
912 ////////////////////////////////////////////////////////////////////////////////////
913
914 EV_ERR EV_get_flag64(EV_ID flag_id, /* OUT */EV_Flag64 *flag);  // NOLINT (readability/nolint)
915
916 /////////////////////////////////////////////////////////////////////////////////////
917 /// \ingroup EV_wait_flag64
918 /// \~english @par Brief
919 ///       Get event flag(block)
920 /// \~english @param [in] flag_id
921 ///       EV_ID  - Flag ID
922 /// \~english @par
923 ///         EV_ID type parameter
924 ///   @code
925 ///         typedef UINT32 EV_ID
926 ///         @endcode
927 /// \~english @param [out] flag
928 ///       EV_Flag * - event flag structure
929 /// \~english @par
930 ///       EV_Flag structure
931 /// \~english @code
932 ///       typedef unsigned int UINT32;
933 ///       typedef UINT32 EV_ID
934 ///
935 ///       typedef struct {
936 ///         EV_ID flagID;  // Flag ID
937 ///         UINT32 bits;   // event flag bit pattern
938 ///       } EV_Flag;
939 ///       @endcode
940 /// \~english @retval EV_OK Successful completion
941 /// \~english @retval EV_ERR_Invalid_ID Invalid flag_id
942 /// \~english @retval EV_ERR_Interrupted signal interrupt
943 /// \~english @retval EV_ERR_Fatal Abnormal error
944 /// \~english @par Prerequisite
945 ///       Execute EV_create_flag(),EV_create_flag_auto_id() and flag has already been created.
946 /// \~english @par Change of internal state
947 ///       There is no change of the internal Status
948 /// \~english @par Conditions of processing failure
949 ///       - Input parameter error
950 ///       - Flag corresponding to flag_id doesn't exist
951 ///       --incorrect flag_id:The flag_id of event which has not been created.
952 ///          - EV_ERR_Invalid_ID
953 ///       - Task blocking was canceled by signal interrupt
954 ///          - EV_ERR_Interrupted
955 ///       - Access failed from kernel space to user space reference area
956 ///       - Failed to copy data from user space to kernel space
957 ///          - EV_ERR_Fatal
958 /// \~english @par Classification
959 ///       Public
960 /// \~english @par Type
961 ///       Sync Only
962 /// \~english @par Detail
963 ///       Gets bit pattern specified by argument to flag of ID specified by argument.
964 ///       The user can only get flag created by user process, and clear bit pattern of acquired flag.
965 ///       An error occurs if flag of the specified ID doesn't exist.
966 ///       If bit pattern is not set in flag, block until bit pattern is set.
967 ///       However, if a signal interrupt or corresponding flag is deleted, it will abort and return an error.
968 /// \~english @see
969 ///       evk_ioctl, evk_get_event
970 ////////////////////////////////////////////////////////////////////////////////////
971
972 EV_ERR EV_wait_flag64(EV_ID flag_id, /* OUT */EV_Flag64 *flag);  // NOLINT (readability/nolint)
973
974 ////////////////////////////////////////////////////////////////////////////////
975 /// \ingroup EV_peek_flag64
976 /// \~english @par Brief get flag event(non-destructive)
977 /// \~english @param  [in] flag_id
978 ///       ID of message event queue
979 /// \~english @param  [out] flag
980 ///       flag struct
981 /// \~english @par
982 ///         EV_ID type parameter
983 ///   @code
984 ///         typedef UINT32 EV_ID
985 ///         @endcode
986 /// \~english @par
987 ///         EV_Flag Structure
988 ///   @code
989 ///         typedef struct {
990 ///         EV_ID flagID;
991 ///           UINT32 bits;
992 ///         } EV_Flag;
993 ///         @endcode
994 /// \~english @retval EV_OK: normal termination
995 /// \~english @retval EV_ERR_Invalid_ID: The specified flag ID is not existing,
996 ///   or it is not created in current process.
997 /// \~english @retval EV_ERR_Fatal: Fatal error
998 /// \~english @par Prerequisite
999 ///    - none
1000 /// \~english @par Change of internal state
1001 ///    - none
1002 /// \~english @par Conditions of processing failure
1003 ///       - Input parameter error
1004 ///       - Flag corresponding to flag_id doesn't exist
1005 ///       --incorrect flag_id:The flag_id of event which has not been created.
1006 ///          - EV_ERR_Invalid_ID
1007 ///       - Task blocking was canceled by signal interrupt
1008 ///          - EV_ERR_Interrupted
1009 ///       - Access failed from kernel space to user space reference area
1010 ///       - Failed to copy data from user space to kernel space
1011 ///          - EV_ERR_Fatal
1012 /// \~english @par Classification
1013 ///       Public
1014 /// \~english @par Type
1015 ///       Sync Only
1016 /// \~english @par Detail
1017 ///   Get a flag event whose ID is specified non-destructively.
1018 ///   If there is no event, just return.
1019 ///   If there is no event, set flag->flagID to EV_NO_ID.
1020 ///   You can judge that there is no event, even though flag->bits is 0.
1021 // \~english @see none
1022 ////////////////////////////////////////////////////////////////////////////////
1023
1024 EV_ERR EV_peek_flag64(EV_ID flag_id, /* OUT */EV_Flag64 *flag);  // NOLINT (readability/nolint)
1025
1026 /* Get Message Event (ID specified) */
1027 /////////////////////////////////////////////////////////////////////////////////////
1028 /// \ingroup EV_get_message
1029 /// \~english @par Brief
1030 ///       Get message event(non-block)
1031 /// \~english @param [in] queue_id
1032 ///       EV_ID  - Message queue ID
1033 /// \~english @par
1034 ///         EV_ID type parameter
1035 ///   @code
1036 ///         typedef UINT32 EV_ID
1037 ///         @endcode
1038 /// \~english @param [out] message
1039 ///       EV_Message * - Message event structure
1040 /// \~english @par
1041 ///       EV_Message structure
1042 /// \~english @code
1043 ///       typedef unsigned int UINT32;
1044 ///       typedef UINT32 EV_ID
1045 ///
1046 ///       #define EV_MAX_MESSAGE_LENGTH 2048
1047 ///       typedef struct {
1048 ///         EV_ID queueID;  // ID of message queue
1049 ///         UINT32 senderInfo;  // Message Source
1050 ///         UINT32 length;  // length of message
1051 ///         UINT32 dummy;  // dummy for padding
1052 ///         UINT8  message[EV_MAX_MESSAGE_LENGTH];  // message
1053 ///       } EV_Message;
1054 ///       @endcode
1055 /// \~english @retval EV_OK Successful completion
1056 /// \~english @retval EV_ERR_Invalid_ID Invalid queue_id
1057 /// \~english @retval EV_ERR_Fatal Abnormal error
1058 /// \~english @par Prerequisite
1059 ///       Execute EV_create_queue(),EV_create_queue_auto_id() and message queue has already been created.
1060 /// \~english @par Change of internal state
1061 ///       There is no change of the internal Status
1062 /// \~english @par Conditions of processing failure
1063 ///       - Input parameter error
1064 ///       - Message queue corresponding to queue_id doesn't exist
1065 ///       --incorrect queue_id:The queue_id of essage which has not been created.
1066 ///          - EV_ERR_Invalid_ID
1067 ///       - Access failed from kernel space to user space reference area
1068 ///       - Failed to copy data from user space to kernel space
1069 ///          - EV_ERR_Fatal
1070 /// \~english @par Classification
1071 ///       Public
1072 /// \~english @par Type
1073 ///       Sync Only
1074 /// \~english @par Detail
1075 ///       Gets 1 message specified by argument to message queue of ID specified by argument.
1076 ///       The user can only get message queue created by user process, and clear 1 message of acquired message queue.
1077 ///       An error occurs if message queue of the specified ID doesn't exist.
1078 /// \~english @see
1079 ///       evk_ioctl, evk_get_event
1080 ////////////////////////////////////////////////////////////////////////////////////
1081
1082 EV_ERR EV_get_message(EV_ID queue_id, /* OUT */EV_Message *message);  // NOLINT (readability/nolint)
1083
1084 /////////////////////////////////////////////////////////////////////////////////////
1085 /// \ingroup EV_wait_message
1086 /// \~english @par Brief
1087 ///       Get message event(block)
1088 /// \~english @param [in] queue_id
1089 ///       EV_ID  - Message queue ID
1090 /// \~english @par
1091 ///         EV_ID type parameter
1092 ///   @code
1093 ///         typedef UINT32 EV_ID
1094 ///         @endcode
1095 /// \~english @param [out] message
1096 ///       EV_Message * - Message event structure
1097 /// \~english @par
1098 ///       EV_Message structure
1099 /// \~english @code
1100 ///       typedef unsigned int UINT32;
1101 ///       typedef UINT32 EV_ID
1102 ///
1103 ///       #define EV_MAX_MESSAGE_LENGTH 2048
1104 ///       typedef struct {
1105 ///         EV_ID queueID;  // ID of message queue
1106 ///         UINT32 senderInfo;  // Message Source
1107 ///         UINT32 length;  // length of message
1108 ///         UINT32 dummy;  // dummy for padding
1109 ///         UINT8  message[EV_MAX_MESSAGE_LENGTH];  // message
1110 ///       } EV_Message;
1111 ///       @endcode
1112 /// \~english @retval EV_OK Successful completion
1113 /// \~english @retval EV_ERR_Invalid_ID Invalid queue_id
1114 /// \~english @retval EV_ERR_Interrupted signal interrupt
1115 /// \~english @retval EV_ERR_Fatal Abnormal error
1116 /// \~english @par Prerequisite
1117 ///       Execute EV_create_queue(),EV_create_queue_auto_id() and message queue has already been created.
1118 /// \~english @par Change of internal state
1119 ///       There is no change of the internal Status
1120 /// \~english @par Conditions of processing failure
1121 ///       - Input parameter error
1122 ///       - Message queue corresponding to queue_id doesn't exist
1123 ///       --incorrect queue_id:The queue_id of essage which has not been created.
1124 ///          - EV_ERR_Invalid_ID
1125 ///       - Task blocking was canceled by signal interrupt
1126 ///          - EV_ERR_Interrupted
1127 ///       - Access failed from kernel space to user space reference area
1128 ///       - Failed to copy data from user space to kernel space
1129 ///          - EV_ERR_Fatal
1130 /// \~english @par Classification
1131 ///       Public
1132 /// \~english @par Type
1133 ///       Sync Only
1134 /// \~english @par Detail
1135 ///       Gets 1 message specified by argument to message queue of ID specified by argument.
1136 ///       The user can only get message queue created by user process, and clear 1 message of acquired message queue.
1137 ///       An error occurs if message queue of the specified ID doesn't exist.
1138 ///       If message is not set in message queue, block until message is sent.
1139 ///       However, if a signal interrupt or corresponding message queue is deleted, it will abort and return an error.
1140 /// \~english @see
1141 ///       evk_ioctl, evk_get_event
1142 ////////////////////////////////////////////////////////////////////////////////////
1143
1144 EV_ERR EV_wait_message(EV_ID queue_id, /* OUT */EV_Message *message);  // NOLINT (readability/nolint)
1145
1146 ////////////////////////////////////////////////////////////////////////////////
1147 /// \ingroup EV_peek_message
1148 /// \~english @par Brief  get message event(non-destructive)
1149 /// \~english @param  [in] queue_id
1150 ///       ID of message event queue
1151 /// \~english @param  [out] message
1152 ///       message event queue struct
1153 /// \~english @par
1154 ///         EV_ID define
1155 ///   @code
1156 ///         typedef UINT32 EV_ID
1157 ///         @endcode
1158
1159 /// \~english @par
1160 ///         EV_Message struct
1161 ///   @code
1162 ///         #define EV_MAX_MESSAGE_LENGTH 2048
1163 ///         typedef struct {
1164 ///            EV_ID queueID;
1165 ///            UINT32 senderInfo;
1166 ///            UINT32 length;
1167 ///            UINT32 dummy;
1168 ///            UINT8  message[EV_MAX_MESSAGE_LENGTH];
1169 ///          } EV_Message;
1170 ///         @endcode
1171 /// \~english @retval EV_OK: normal termination
1172 /// \~english @retval EV_ERR_Invalid_ID: The specified queue ID is not existing,
1173 ///   or it is not created in current process.
1174 /// \~english @retval EV_ERR_Fatal: Fatal error
1175 /// \~english @par Prerequisite
1176 ///    - none
1177 /// \~english @par Change of internal state
1178 ///       There is no change of the internal Status
1179 /// \~english @par Conditions of processing failure
1180 ///       - Input parameter error
1181 ///       - Message queue corresponding to queue_id doesn't exist
1182 ///       --incorrect queue_id:The queue_id of essage which has not been created.
1183 ///          - EV_ERR_Invalid_ID
1184 ///       - Access failed from kernel space to user space reference area
1185 ///       - Failed to copy data from user space to kernel space
1186 ///          - EV_ERR_Fatal
1187 /// \~english @par Classification
1188 ///       Public
1189 /// \~english @par Type
1190 ///       Sync Only
1191 /// \~english @par Detail
1192 ///   Get a message event queue whose ID is specified non-destructively.
1193 ///   If there is no event, just return.
1194 ///   If there is no event, set message->queueID to EV_NO_ID.
1195 ///   It is the same with EV_get_message(), except the message is remained in the queue.
1196 // \~english @see none
1197 ////////////////////////////////////////////////////////////////////////////////
1198
1199 EV_ERR EV_peek_message(EV_ID queue_id, /* OUT */EV_Message *message);  // NOLINT (readability/nolint)
1200
1201 /* \~english Get events(with search criteria) */
1202
1203 ////////////////////////////////////////////////////////////////////////////////
1204 /// \ingroup EV_find_message_by_sender
1205 /* \~english get event(with search sender infomation condition) */
1206 /// \~english @param  [in] queue_id
1207 ///       ID of message event queue
1208 /// \~english @param  [in] senderInfo
1209 ///       sender information
1210 /// \~english @param  [out] message
1211 ///       message event struct
1212 /// \~english @par
1213 ///         EV_ID type parameter
1214 ///   @code
1215 ///         typedef UINT32 EV_ID
1216 ///         @endcode
1217 /// \~english @par
1218 ///         EV_Message struct
1219 ///   @code
1220 ///         #define EV_MAX_MESSAGE_LENGTH 2048
1221 ///         typedef struct {
1222 ///            EV_ID queueID;
1223 ///            UINT32 senderInfo;
1224 ///            UINT32 length;
1225 ///            UINT32 dummy;
1226 ///            UINT8  message[EV_MAX_MESSAGE_LENGTH];
1227 ///          } EV_Message;
1228 ///         @endcode
1229 /// \~english @retval EV_OK: normal termination
1230 /// \~english @retval EV_ERR_Invalid_ID: The specified queue ID is not existing,
1231 ///   or it is not created in current process.
1232 /// \~english @retval EV_ERR_Fatal: Fatal error
1233 /// \~english @par Prerequisite
1234 ///    - none
1235 /// \~english @par Change of internal state
1236 ///    - none
1237 /// \~english @par Conditions of processing failure
1238 ///       - Input parameter error (specifying incorrect queue_id)
1239 ///       --incorrect queue_id:The queue_id of essage which has not been created.
1240 ///       - Not find same sender information's message according to input sender information information
1241 ///          - EV_ERR_Invalid_ID
1242 ///       - Securing free space of thread information management table (malloc) Failure
1243 ///       - Access failed from kernel space to user space reference area
1244 ///       - Failed to copy data from user space to kernel space
1245 ///       - Message queue pool is NULL
1246 ///       - Message queue generation corresponding to queue_id failed
1247 ///          - EV_ERR_Fatal
1248 /// \~english @par Classification
1249 ///       Public
1250 /// \~english @par Type
1251 ///       Sync Only
1252 /// \~english @par Detail
1253 ///   If there is a event whose sender information is same with
1254 ///   any event in message event queue whose ID is specified, get the event and delete it from queue.
1255 ///   If such a message is not existing,
1256 ///   set message->queueID to EV_NO_ID, then return.
1257 // \~english @see none
1258 ////////////////////////////////////////////////////////////////////////////////
1259
1260 EV_ERR EV_find_message_by_sender(EV_ID queue_id, UINT32 senderInfo, EV_Message *message);  // NOLINT (readability/nolint)
1261
1262 ////////////////////////////////////////////////////////////////////////////////
1263 /// \ingroup EV_find_message_by_content
1264 /// \~english @par Brief  get message event(search with contents)
1265 /// \~english @param  [in] queue_id
1266 ///       ID of message event queue
1267 /// \~english @param  [in] bytes
1268 ///       size of compare bytes
1269 /// \~english @param  [in] compare_bytes
1270 ///       bytes that used to campare the contents
1271 /// \~english @param  [out] message
1272 ///       message event struct
1273 /// \~english @par
1274 ///         EV_ID type parameter
1275 ///   @code
1276 ///         typedef UINT32 EV_ID
1277 ///         @endcode
1278 /// \~english @par
1279 ///         EV_Message struct
1280 ///   @code
1281 ///         #define EV_MAX_MESSAGE_LENGTH 2048
1282 ///         typedef struct {
1283 ///            EV_ID queueID;
1284 ///            UINT32 senderInfo;
1285 ///            UINT32 length;
1286 ///            UINT32 dummy;
1287 ///            UINT8  message[EV_MAX_MESSAGE_LENGTH];
1288 ///          } EV_Message;
1289 ///         @endcode
1290 /// \~english @retval EV_OK: normal termination
1291 /// \~english @retval EV_ERR_Invalid_ID: The specified queue ID is not existing,
1292 ///   or it is not created in current process.
1293 /// \~english @retval EV_ERR_Fatal: Fatal error
1294 /// \~english @par Prerequisite
1295 ///    - none
1296 /// \~english @par Change of internal state
1297 ///    - none
1298 /// \~english @par Conditions of processing failure
1299 ///       - Input parameter error (specifying incorrect queue_id)
1300 ///       --incorrect queue_id:The queue_id of essage which has not been created.
1301 ///       - Not find contents's message according to input contents information
1302 ///          - EV_ERR_Invalid_ID
1303 ///       - Securing free space of thread information management table (malloc) Failure
1304 ///       - Access failed from kernel space to user space reference area
1305 ///       - Failed to copy data from user space to kernel space
1306 ///       - Message queue pool is NULL
1307 ///       - Message queue generation corresponding to queue_id failed
1308 ///          - EV_ERR_Fatal
1309 /// \~english @par Classification
1310 ///       Public
1311 /// \~english @par Type
1312 ///       Sync Only
1313 /// \~english @par Detail
1314 ///   If the event in compare bytes is same with
1315 ///   any event in message event queue whose ID is specified,
1316 ///   get the event and delete it from queue.
1317 ///   If such a message is not existing, set message->queueID to EV_NO_ID, then return.
1318 // \~english @see none
1319 ////////////////////////////////////////////////////////////////////////////////
1320
1321 EV_ERR EV_find_message_by_content(EV_ID queue_id,                 // NOLINT (readability/nolint)
1322                                   UINT16 length,                  // NOLINT (readability/nolint)
1323                                   const void *compare_bytes,      // NOLINT (readability/nolint)
1324                                   /* OUT */EV_Message *message);  // NOLINT (readability/nolint)
1325
1326 /////////////////////////////////////////////////////////////////////////////////////
1327 /// \ingroup EV_get_flag_fd
1328 /// \~english @par Brief
1329 ///       Obtain fd for polling flag event
1330 /// \~english @param [in] flag_id
1331 ///       EV_ID        - Flag ID
1332 /// \~english @par
1333 ///         EV_ID type parameter
1334 ///   @code
1335 ///         typedef UINT32 EV_ID
1336 ///         @endcode
1337 /// \~english @param [out] fd
1338 ///       int *        - event flag queue fd for Polling
1339 /// \~english @retval EV_OK Successful completion
1340 /// \~english @retval EV_ERR_Invalid_ID Invalid flag_id
1341 /// \~english @par Prerequisite
1342 ///       Execute EV_create_flag(),EV_create_flag_auto_id() and flag has already been created.
1343 /// \~english @par Change of internal state
1344 ///       There is no change of the internal Status
1345 /// \~english @par Conditions of processing failure
1346 ///       - Input parameter error
1347 ///       --incorrect flag_id:The flag_id of event which has not been created.
1348 ///       - Flag corresponding to flag_id doesn't exist
1349 ///          - EV_ERR_Invalid_ID
1350 /// \~english @par Classification
1351 ///       Public
1352 /// \~english @par Type
1353 ///       Sync Only
1354 /// \~english @par Detail
1355 ///       Gets fd(File Descriptor) corresponding to flag of ID specified by argument.
1356 ///       The user can only get flag created by user process .
1357 ///       This fd(File Descriptor) can be used only for designation to poll / select, and operation when other
1358 ///       operations are performed is not guaranteed.
1359 ///       At the time of poll, only POLLIN can be specified, and at the time of select,
1360 ///       it is possible to check only whether it can be read.
1361 ///       Also, if flag is deleted in poll / select, it exits poll / select. * In case of poll, POLLERR is set.
1362 ///       When calling the same ID more than once, it returns the same fd(File Descriptor)
1363 ///       each time (unless destroy / create is done).
1364 /// \~english @see
1365 ///       nothing
1366 ////////////////////////////////////////////////////////////////////////////////////
1367
1368 EV_ERR EV_get_flag_fd(EV_ID flag_id, /* OUT */int *fd);  // NOLINT (readability/nolint)
1369
1370 /////////////////////////////////////////////////////////////////////////////////////
1371 /// \ingroup EV_get_queue_fd
1372 /// \~english @par Brief
1373 ///       Obtain fd for polling message event
1374 /// \~english @param [in] flag_id
1375 ///       EV_ID        - Flag ID
1376 /// \~english @par
1377 ///         EV_ID type parameter
1378 ///   @code
1379 ///         typedef UINT32 EV_ID
1380 ///         @endcode
1381 /// \~english @param [out] fd
1382 ///       int * - Message queue fd for Polling
1383 /// \~english @retval EV_OK Successful completion
1384 /// \~english @retval EV_ERR_Invalid_ID Invalid queue_id
1385 /// \~english @par Prerequisite
1386 ///       Execute EV_create_queue(),EV_create_queue_auto_id() and message queue has already been created.
1387 /// \~english @par Change of internal state
1388 ///       There is no change of the internal Status
1389 /// \~english @par Conditions of processing failure
1390 ///       - Input parameter error
1391 ///       - Message queue corresponding to queue_id doesn't exist
1392 ///       --incorrect queue_id:The queue_id of essage which has not been created.
1393 ///          - EV_ERR_Invalid_ID
1394 /// \~english @par Classification
1395 ///       Public
1396 /// \~english @par Type
1397 ///       Sync Only
1398 /// \~english @par Detail
1399 ///       Gets fd(File Descriptor) corresponding to message queue of ID specified by argument.
1400 ///       The user can only get message queue created by user process .
1401 ///       This fd(File Descriptor) can be used only for designation to poll / select,
1402 ///       and operation when other operations are performed is not guaranteed.
1403 ///       At the time of poll, only POLLIN can be specified, and at the time of select,
1404 ///       it is possible to check only whether it can be read.
1405 ///       Also, if message queue is deleted in poll / select, it exits poll / select.
1406 ///       * In case of poll, POLLERR is set.
1407 ///       When calling the same ID more than once, it returns the same fd(File Descriptor)
1408 ///       each time (unless destroy / create is done).
1409 /// \~english @see
1410 ///       nothing
1411 ////////////////////////////////////////////////////////////////////////////////////
1412
1413 EV_ERR EV_get_queue_fd(EV_ID queue_id, /* OUT */int *fd);  // NOLINT (readability/nolint)
1414
1415 /* \~english Functions that specify the module ID (16 bits) instead of the flag ID and queue ID */
1416
1417 ////////////////////////////////////////////////////////////////////////////////
1418 /// \ingroup EV_moduleID_to_flag_id
1419 /* \~english function group used to specify moduleID(16bit) instead of flag_id, queue_id */
1420 /// \~english @par Brief change from moduleID to flag_id
1421 /// \~english @param  [in] m_id
1422 ///       moduleID
1423 /// \~english @retval flag_id
1424 ///   @code
1425 ///         typedef UINT32 EV_ID
1426 ///         @endcode
1427 /// \~english @par Prerequisite
1428 ///    - none
1429 /// \~english @par Change of internal state
1430 ///    - none
1431 /// \~english @par Conditions of processing failure
1432 ///    - none
1433 /// \~english @par Classification
1434 ///       Public
1435 /// \~english @par Type
1436 ///       Sync Only
1437 /// \~english @par Detail
1438 ///   You can not use this function to
1439 ///   create a multiple of flags with one moduleID. return error:EV_ERR_Exist.
1440 ///   This function is only used for generating one event by one module ID.
1441 // \~english @see none
1442 ////////////////////////////////////////////////////////////////////////////////
1443
1444 EV_ID EV_moduleID_to_flagID(UINT16 m_id);  // NOLINT (readability/nolint)
1445
1446 ////////////////////////////////////////////////////////////////////////////////
1447 /// \ingroup EV_moduleID_to_flag64ID
1448 /// \~english @par Brief change from moduleID to 64bit flag_id
1449 /// \~english @param  [in] m_id
1450 ///       moduleID
1451 /// \~english @par
1452 ///         EV_ID type parameter
1453 ///   @code
1454 ///         typedef UINT32 EV_ID
1455 ///         @endcode
1456 /// \~english @retval 64bit flag_id
1457 /// \~english @par Prerequisite
1458 ///    - none
1459 /// \~english @par Change of internal state
1460 ///    - none
1461 /// \~english @par Conditions of processing failure
1462 ///    - none
1463 /// \~english @par Classification
1464 ///       Public
1465 /// \~english @par Type
1466 ///       Sync Only
1467 /// \~english @par Detail
1468 ///   You can not use this function to
1469 ///   create a multiple of flags with one moduleID. return error:EV_ERR_Exist.
1470 ///   This function is only used for generating one event by one module ID.
1471 // \~english @see none
1472 ////////////////////////////////////////////////////////////////////////////////
1473
1474 EV_ID EV_moduleID_to_flag64ID(UINT16 m_id);  // NOLINT (readability/nolint)
1475
1476 ////////////////////////////////////////////////////////////////////////////////
1477 /// \ingroup EV_moduleID_to_queueID
1478 /// \~english @par Brief change from moduleID to queue_id
1479 /// \~english @param  [in] m_id
1480 ///       moduleID
1481 /// \~english @par
1482 ///         EV_ID type parameter
1483 ///   @code
1484 ///         typedef UINT32 EV_ID
1485 ///         @endcode
1486 /// \~english @retval queue_id
1487 /// \~english @par Prerequisite
1488 ///    - none
1489 /// \~english @par Change of internal state
1490 ///    - none
1491 /// \~english @par Conditions of processing failure
1492 ///    - none
1493 /// \~english @par Classification
1494 ///       Public
1495 /// \~english @par Type
1496 ///       Sync Only
1497 /// \~english @par Detail
1498 ///   You can not use this function to
1499 ///   create a multiple of queues with one moduleID.
1500 // \~english @see none
1501 ////////////////////////////////////////////////////////////////////////////////
1502
1503 EV_ID EV_moduleID_to_queueID(UINT16 m_id);  // NOLINT (readability/nolint)
1504
1505 ////////////////////////////////////////////////////////////////////////////////
1506 /// \ingroup EV_create_flag_by_mID
1507 /// \~english @par Brief create flag(moduleID specified)
1508 /// \~english @param  [in] m_id
1509 ///       moduleID
1510 /// \~english @retval EV_OK Successful completion
1511 /// \~english @retval EV_ERR_Invalid_ID Invalid flag_id
1512 /// \~english @retval EV_ERR_Thread_Over The MAX of event thread.
1513 /// \~english @retval EV_ERR_Exist Duplication Error
1514 /// \~english @retval EV_ERR_Fatal Abnormal error
1515 /// \~english @par Prerequisite
1516 ///       There is no prerequisite
1517 /// \~english @par Change of internal state
1518 ///       There is no change of the internal Status
1519 /// \~english @par Conditions of processing failure
1520 ///       - Input parameter error (specifying incorrect flag_id)
1521 ///       --incorrect flag_id:The ID is not created by function of EV_moduleID_to_flagID ().
1522 ///          - EV_ERR_Invalid_ID
1523 ///       - Startup thread upper limit (16) error
1524 ///          - EV_ERR_Thread_Over
1525 ///       - flag_id registered in launch thread
1526 ///       - Flag corresponding to flag_id already exists
1527 ///          - EV_ERR_Exist
1528 ///       - Securing free space of thread information management table (malloc) Failure
1529 ///       - Flag pool is NULL
1530 ///       - Flag generation corresponding to flag_id failed
1531 ///          - EV_ERR_Fatal
1532 /// \~english @par Classification
1533 ///       Public
1534 /// \~english @par Type
1535 ///       Sync Only
1536 /// \~english @par Detail
1537 ///   You can not use this function to
1538 ///   create a multiple of flags with one moduleID.return error:EV_ERR_Exist.
1539 ///   This function is only used for generating one event by one module ID.
1540 // \~english @see EV_create_flag
1541 ////////////////////////////////////////////////////////////////////////////////
1542
1543 EV_ERR EV_create_flag_by_mID(UINT16 m_id);  // NOLINT (readability/nolint)
1544
1545 ////////////////////////////////////////////////////////////////////////////////
1546 /// \ingroup EV_create_flag64_by_mID
1547 /// \~english @par Brief create 64bit flag(moduleID specified)
1548 /// \~english @param  [in] m_id
1549 ///       moduleID
1550 /// \~english @retval EV_OK Successful completion
1551 /// \~english @retval EV_ERR_Invalid_ID Invalid flag_id
1552 /// \~english @retval EV_ERR_Thread_Over The MAX of event thread.
1553 /// \~english @retval EV_ERR_Exist Duplication Error
1554 /// \~english @retval EV_ERR_Fatal Abnormal error
1555 /// \~english @par Prerequisite
1556 ///       There is no prerequisite
1557 /// \~english @par Change of internal state
1558 ///       There is no change of the internal Status
1559 /// \~english @par Conditions of processing failure
1560 ///       - Input parameter error (specifying incorrect flag_id)
1561 ///       --incorrect flag_id:The ID is not created by function of EV_moduleID_to_flag64ID ().
1562 ///          - EV_ERR_Invalid_ID
1563 ///       - Startup thread upper limit (16) error
1564 ///          - EV_ERR_Thread_Over
1565 ///       - flag_id registered in launch thread
1566 ///       - Flag corresponding to flag_id already exists
1567 ///          - EV_ERR_Exist
1568 ///       - Securing free space of thread information management table (malloc) Failure
1569 ///       - Flag pool is NULL
1570 ///       - Flag generation corresponding to flag_id failed
1571 ///          - EV_ERR_Fatal
1572 /// \~english @par Classification
1573 ///       Public
1574 /// \~english @par Type
1575 ///       Sync Only
1576 /// \~english @par Detail
1577 ///   You can not use this function to
1578 ///   create a multiple of flags with one moduleID. return error:EV_ERR_Exist.
1579 ///   This function is only used for generating one event by one module ID.
1580 // \~english @see EV_create_flag64
1581 ////////////////////////////////////////////////////////////////////////////////
1582
1583 EV_ERR EV_create_flag64_by_mID(UINT16 m_id);  // NOLINT (readability/nolint)
1584
1585 ////////////////////////////////////////////////////////////////////////////////
1586 /// \ingroup EV_create_queue_by_mID
1587 /// \~english @par Brief create queue(moduleID specified)
1588 /// \~english @param  [in] m_id
1589 ///       moduleID
1590 /// \~english @param  [in] length
1591 ///       length of message queue
1592 /// \~english @param  [in] max_bytes
1593 ///       one max bytes for message
1594 /// \~english @param  [in] type
1595 ///       treat type of receiving events even though the queue is full
1596 /// \~english @par
1597 ///         ev_message_queue_type struct
1598 ///   @code
1599 ///             enum ev_message_queue_type {
1600 ///               EV_MESSAGE_QUEUE_TYPE_BUSY,
1601 ///               EV_MESSAGE_QUEUE_TYPE_FIFO,
1602 ///               EV_MESSAGE_QUEUE_TYPE_REPLACE,
1603 ///             };
1604 ///         @endcode
1605 /// \~english @retval EV_OK: normal termination
1606 /// \~english @retval EV_ERR_Invalid_ID: set en invalid flag ID
1607 /// \~english @retval EV_ERR_Thread_Over The MAX of event thread.
1608 /// \~english @retval EV_ERR_Exist: a same flag ID is existing
1609 /// \~english @retval EV_ERR_Fatal: Fatal error
1610 /// \~english @par Prerequisite
1611 ///       There is no prerequisite
1612 /// \~english @par Change of internal state
1613 ///       There is no change of the internal Status
1614 /// \~english @par Conditions of processing failure
1615 ///       - Input parameter error (specifying incorrect queue_id)
1616 ///       --incorrect queue_id:The queue_id of essage which has not been created.
1617 ///          - EV_ERR_Invalid_ID
1618 ///       - Startup thread upper limit (16) error
1619 ///          - EV_ERR_Thread_Over
1620 ///       - queue_id registered in launch thread
1621 ///       - Message queue corresponding to queue_id already exists
1622 ///          - EV_ERR_Exist
1623 ///       - Securing free space of thread information management table (malloc) Failure
1624 ///       - Access failed from kernel space to user space reference area
1625 ///       - Failed to copy data from user space to kernel space
1626 ///       - Message queue pool is NULL
1627 ///       - Message queue generation corresponding to queue_id failed
1628 ///          - EV_ERR_Fatal
1629 /// \~english @par Classification
1630 ///       Public
1631 /// \~english @par Type
1632 ///       Sync Only
1633 /// \~english @par Detail
1634 ///   You can not use this function to
1635 ///   create a multiple of queues with one moduleID.
1636 // \~english @see EV_create_queue
1637 ////////////////////////////////////////////////////////////////////////////////
1638
1639 EV_ERR
1640 EV_create_queue_by_mID(UINT16 m_id,                  // NOLINT (readability/nolint)
1641                       UINT8 length,                  // NOLINT (readability/nolint)
1642                       UINT16 max_bytes,              // NOLINT (readability/nolint)
1643                       EV_Message_Queue_Type type);   // NOLINT (readability/nolint)
1644
1645 ////////////////////////////////////////////////////////////////////////////////
1646 /// \ingroup EV_destroy_flag_by_mID
1647 /// \~english @par Brief delete flag(moduleID specified)
1648 /// \~english @param  [in] m_id
1649 ///       moduleID
1650 /// \~english @par length [in]length of message queue
1651 /// \~english @par max_bytes [in]one max bytes for message
1652 /// \~english @par type [in]treat type of receiving events even though the queue is full
1653 /// \~english @retval EV_OK: normal termination
1654 /// \~english @retval EV_ERR_Invalid_ID: set en invalid flag ID
1655 /// \~english @retval EV_ERR_Fatal: Fatal error
1656 /// \~english @par Prerequisite
1657 ///    - none
1658 /// \~english @par Change of internal state
1659 ///    - none
1660 /// \~english @par Conditions of processing failure
1661 ///       - Input parameter error (specifying incorrect flag_id)
1662 ///       --incorrect flag_id:The flag_id of event/message which has not been created.
1663 ///       - Flag corresponding to queue_id doesn't exist
1664 ///          - EV_ERR_Invalid_ID
1665 /// \~english @par Classification
1666 ///       Public
1667 /// \~english @par Type
1668 ///       Sync Only
1669 /// \~english @par Detail
1670 /// \~english You can not use this function to
1671 /// \~english create a multiple of flags with one moduleID. return error:EV_ERR_Exist.
1672 /// This function is only used for generating one event by one module ID.
1673 // \~english @see EV_destroy_flag
1674 ////////////////////////////////////////////////////////////////////////////////
1675
1676 EV_ERR EV_destroy_flag_by_mID(UINT16 m_id);  // NOLINT (readability/nolint)
1677
1678 ////////////////////////////////////////////////////////////////////////////////
1679 /// \ingroup EV_destroy_queue_by_mID
1680 /// \~english @par Brief delete queue(moduleID specified)
1681 /// \~english @param  [in] m_id
1682 ///       moduleID
1683 /// \~english @retval EV_OK Successful completion
1684 /// \~english @retval EV_ERR_Invalid_ID Invalid queue_id
1685 /// \~english @retval EV_ERR_Fatal Abnormal error
1686 /// \~english @par Prerequisite
1687 ///    - none
1688 /// \~english @par Change of internal state
1689 ///    There is no change of the internal Status
1690 /// \~english @par Conditions of processing failure
1691 ///       - Input parameter error (specifying incorrect queue_id)
1692 ///       --incorrect queue_id:The queue_id of essage which has not been created.
1693 ///       - Message queue corresponding to flag_id doesn't exist
1694 ///          - EV_ERR_Invalid_ID
1695 /// \~english @par Classification
1696 ///       Public
1697 /// \~english @par Type
1698 ///       Sync Only
1699 /// \~english @par Detail
1700 ///   You can not use this function to
1701 ///   create a multiple of queues with one moduleID
1702 // \~english @see EV_destroy_queue
1703 ////////////////////////////////////////////////////////////////////////////////
1704
1705 EV_ERR EV_destroy_queue_by_mID(UINT16 m_id);  // NOLINT (readability/nolint)
1706
1707 ////////////////////////////////////////////////////////////////////////////////
1708 /// \ingroup EV_set_flag_by_mID
1709 /// \~english @par Brief send flag(moduleID specified)
1710 /// \~english @param  [in] m_id
1711 ///       moduleID
1712 /// \~english @param  [in] bits
1713 ///       value of flag
1714 /// \~english @retval EV_OK: normal termination
1715 /// \~english @retval EV_ERR_Invalid_ID: set en invalid flag ID
1716 /// \~english @retval EV_ERR_Fatal: Fatal error
1717 /// \~english @par Prerequisite
1718 ///    - none
1719 /// \~english @par Change of internal state
1720 ///    There is no change of the internal Status
1721 /// \~english @par Conditions of processing failure
1722 ///       - Input parameter error (specifying incorrect flag_id)
1723 ///       --incorrect flag_id:The flag_id of event which has not been created.
1724 ///       - Flag corresponding to flag_id doesn't exist
1725 ///          - EV_ERR_Invalid_ID
1726 ///       - Access failed from kernel space to user space reference area
1727 ///       - Failed to copy data from user space to kernel space
1728 ///          - EV_ERR_Fatal
1729 /// \~english @par Classification
1730 ///       Public
1731 /// \~english @par Type
1732 ///       Sync Only
1733 /// \~english @par Detail
1734 ///       Sets bit pattern specified by argument to flag of ID specified by argument.
1735 ///       When setting a plurality of bit patterns in the same flag,
1736 ///       "only OR operation result of all bit patterns" is held in flag.
1737 // \~english @see EV_set_flag
1738 ////////////////////////////////////////////////////////////////////////////////
1739
1740 EV_ERR EV_set_flag_by_mID(UINT16 m_id, UINT32 bits);  // NOLINT (readability/nolint)
1741
1742 ////////////////////////////////////////////////////////////////////////////////
1743 /// \ingroup EV_set_flag64_by_mID
1744 /// \~english @par Brief send 64bit flag(moduleID specified)
1745 /// \~english @param  [in] m_id
1746 ///       moduleID
1747 /// \~english @param  [in] bits
1748 ///       value of flag
1749 /// \~english @retval EV_OK Successful completion
1750 /// \~english @retval EV_ERR_Invalid_ID Invalid flag_id
1751 /// \~english @retval EV_ERR_Fatal Abnormal error
1752 /// \~english @par Prerequisite
1753 ///    - none
1754 /// \~english @par Change of internal state
1755 ///    There is no change of the internal Status
1756 /// \~english @par Conditions of processing failure
1757 ///       - Input parameter error (specifying incorrect flag_id)
1758 ///       --incorrect flag_id:The flag_id of event which has not been created.
1759 ///       - Flag corresponding to flag_id doesn't exist
1760 ///          - EV_ERR_Invalid_ID
1761 ///       - Access failed from kernel space to user space reference area
1762 ///       - Failed to copy data from user space to kernel space
1763 ///          - EV_ERR_Fatal
1764 /// \~english @par Classification
1765 ///       Public
1766 /// \~english @par Type
1767 ///       Sync Only
1768 /// \~english @par Detail
1769 ///       Sets bit pattern specified by argument to flag of ID specified by argument.
1770 ///       When setting a plurality of bit patterns in the same flag, "only
1771 ///       OR operation result of all bit patterns" is held in flag.
1772 // \~english @see EV_set_flag64
1773 ////////////////////////////////////////////////////////////////////////////////
1774
1775 EV_ERR EV_set_flag64_by_mID(UINT16 m_id, UINT64 bits);  // NOLINT (readability/nolint)
1776
1777 ////////////////////////////////////////////////////////////////////////////////
1778 /// \ingroup EV_send_message_by_mID
1779 /// \~english @par Brief send message(moduleID specified)
1780 /// \~english @param  [in] m_id
1781 ///       moduleID
1782 /// \~english @param  [in] bytes
1783 ///       number of send bytes
1784 /// \~english @param  [in] message
1785 ///       pointer to sender contents
1786 /// \~english @param  [in] senderInfo
1787 ///       sender information
1788 /// \~english @retval EV_OK Successful completion
1789 /// \~english @retval EV_ERR_Invalid_ID Invalid queue_id
1790 /// \~english @retval EV_ERR_Busy Queue overflow
1791 /// \~english @retval EV_ERR_Fatal Abnormal error
1792 /// \~english @par Prerequisite
1793 ///       Execute EV_create_queue(),EV_create_queue_auto_id() and message queue has already been created.
1794 /// \~english @par Change of internal state
1795 ///       There is no change of the internal Status
1796 /// \~english @par Conditions of processing failure
1797 ///       - Input parameter error (specifying incorrect queue_id)
1798 ///       --incorrect queue_id:The queue_id of essage which has not been created.
1799 ///       - Message queue corresponding to queue_id doesn't exist
1800 ///          - EV_ERR_Invalid_ID
1801 ///       - Queue overflow in kernel space
1802 ///          - EV_ERR_Busy
1803 ///       - Access failed from kernel space to user space reference area
1804 ///       - Failed to copy data from user space to kernel space
1805 ///       - Invalid queue types
1806 ///          - EV_ERR_Fatal
1807 /// \~english @par Classification
1808 ///       Public
1809 /// \~english @par Type
1810 ///       Sync Only
1811 /// \~english @par Detail
1812 ///       Sends message specified by argument to message moduleID specified by argument.
1813 ///       An error occurs when message queue of the specified ID doesn't exist
1814 ///       or message size exceeds the specified size.
1815 ///       When message queue is FULL, the processing differs depending on the type
1816 ///       of message queue specified at the time of creation message queue.
1817 /// \~english @see evk_open, evk_close, evk_ioctl, evk_store_message
1818 ////////////////////////////////////////////////////////////////////////////////
1819
1820 EV_ERR
1821 EV_send_message_by_mID(UINT16 m_id,         // NOLINT (readability/nolint)
1822                       UINT16 bytes,         // NOLINT (readability/nolint)
1823                       const void *message,  // NOLINT (readability/nolint)
1824                       UINT32 senderInfo);   // NOLINT (readability/nolint)
1825
1826 /** @}*/  // end of event_library
1827 /** @}*/  // end of other_service
1828 /** @}*/  // end of BaseSystem
1829 /**
1830  *
1831  * @brief Method to specify module IDs as flag IDs and queue IDs
1832  *
1833  * The function with module ID as an argument directly can be used in the case of that created only 
1834  * one flag and queue in the module, other than using macros EV_Flag_ID_Base() or EV_Queue_ID_Base().
1835  * @see EV_create_flag_by_mID
1836  * @see EV_create_queue_by_mID
1837  * @see EV_destroy_flag_by_mID
1838  * @see EV_destroy_queue_by_mID
1839  * @see EV_set_flag_by_mID
1840  * @see EV_send_message_by_mID
1841  *
1842  * So the following API can be used to convert IDs created using above method to flag IDs or queue ID
1843  * when pass them to other modules.
1844  * @see EV_moduleID_to_flagID(UINT16 m_id)
1845  * @see EV_moduleID_to_queueID(UINT16 m_id)
1846  *
1847  * @see EV_ID_spec
1848  */
1849
1850 #ifdef __cplusplus
1851 }
1852 #endif /* __cplusplus */
1853
1854 #endif /* !__KERNEL__ */
1855
1856 #endif  // OTHERSERVICE_EV_LIB_H_