RTEMS
tr-event-send-receive.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-2-Clause */
2 
9 /*
10  * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
11  *
12  * Redistribution and use in source and binary forms, with or without
13  * modification, are permitted provided that the following conditions
14  * are met:
15  * 1. Redistributions of source code must retain the above copyright
16  * notice, this list of conditions and the following disclaimer.
17  * 2. Redistributions in binary form must reproduce the above copyright
18  * notice, this list of conditions and the following disclaimer in the
19  * documentation and/or other materials provided with the distribution.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
25  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31  * POSSIBILITY OF SUCH DAMAGE.
32  */
33 
34 /*
35  * Do not manually edit this file. It is part of the RTEMS quality process
36  * and was automatically generated.
37  *
38  * If you find something that needs to be fixed or worded better please
39  * post a report to an RTEMS mailing list or raise a bug report:
40  *
41  * https://docs.rtems.org/branches/master/user/support/bugs.html
42  *
43  * For information on updating and regenerating please refer to:
44  *
45  * https://docs.rtems.org/branches/master/eng/req/howto.html
46  */
47 
48 #ifndef _TR_EVENT_SEND_RECEIVE_H
49 #define _TR_EVENT_SEND_RECEIVE_H
50 
51 #include <rtems.h>
52 #include <rtems/score/thread.h>
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
64 typedef enum {
65  RtemsEventReqSendReceive_Pre_Id_InvId,
66  RtemsEventReqSendReceive_Pre_Id_Task,
67  RtemsEventReqSendReceive_Pre_Id_NA
68 } RtemsEventReqSendReceive_Pre_Id;
69 
70 typedef enum {
71  RtemsEventReqSendReceive_Pre_Send_Zero,
72  RtemsEventReqSendReceive_Pre_Send_Unrelated,
73  RtemsEventReqSendReceive_Pre_Send_Any,
74  RtemsEventReqSendReceive_Pre_Send_All,
75  RtemsEventReqSendReceive_Pre_Send_MixedAny,
76  RtemsEventReqSendReceive_Pre_Send_MixedAll,
77  RtemsEventReqSendReceive_Pre_Send_NA
78 } RtemsEventReqSendReceive_Pre_Send;
79 
80 typedef enum {
81  RtemsEventReqSendReceive_Pre_ReceiverState_NotWaiting,
82  RtemsEventReqSendReceive_Pre_ReceiverState_Poll,
83  RtemsEventReqSendReceive_Pre_ReceiverState_Timeout,
84  RtemsEventReqSendReceive_Pre_ReceiverState_Lower,
85  RtemsEventReqSendReceive_Pre_ReceiverState_Equal,
86  RtemsEventReqSendReceive_Pre_ReceiverState_Higher,
87  RtemsEventReqSendReceive_Pre_ReceiverState_Other,
88  RtemsEventReqSendReceive_Pre_ReceiverState_Intend,
89  RtemsEventReqSendReceive_Pre_ReceiverState_NA
90 } RtemsEventReqSendReceive_Pre_ReceiverState;
91 
92 typedef enum {
93  RtemsEventReqSendReceive_Pre_Satisfy_All,
94  RtemsEventReqSendReceive_Pre_Satisfy_Any,
95  RtemsEventReqSendReceive_Pre_Satisfy_NA
96 } RtemsEventReqSendReceive_Pre_Satisfy;
97 
98 typedef enum {
99  RtemsEventReqSendReceive_Post_SendStatus_Ok,
100  RtemsEventReqSendReceive_Post_SendStatus_InvId,
101  RtemsEventReqSendReceive_Post_SendStatus_NA
102 } RtemsEventReqSendReceive_Post_SendStatus;
103 
104 typedef enum {
105  RtemsEventReqSendReceive_Post_ReceiveStatus_None,
106  RtemsEventReqSendReceive_Post_ReceiveStatus_Pending,
107  RtemsEventReqSendReceive_Post_ReceiveStatus_Timeout,
108  RtemsEventReqSendReceive_Post_ReceiveStatus_Satisfied,
109  RtemsEventReqSendReceive_Post_ReceiveStatus_Unsatisfied,
110  RtemsEventReqSendReceive_Post_ReceiveStatus_Blocked,
111  RtemsEventReqSendReceive_Post_ReceiveStatus_NA
112 } RtemsEventReqSendReceive_Post_ReceiveStatus;
113 
114 typedef enum {
115  RtemsEventReqSendReceive_Post_SenderPreemption_No,
116  RtemsEventReqSendReceive_Post_SenderPreemption_Yes,
117  RtemsEventReqSendReceive_Post_SenderPreemption_NA
118 } RtemsEventReqSendReceive_Post_SenderPreemption;
119 
136  rtems_event_set ( *get_pending_events )( Thread_Control * ),
137  unsigned int wait_class,
138  int waiting_for_event
139 );
140 
143 #ifdef __cplusplus
144 }
145 #endif
146 
147 #endif /* _TR_EVENT_SEND_RECEIVE_H */
uint32_t rtems_option
This type is used to represent an option set.
Definition: options.h:121
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:82
This header file defines the RTEMS Classic API.
Watchdog_Interval rtems_interval
This type is used to represent clock tick intervals.
Definition: types.h:90
Objects_Id rtems_id
Values of this type identify an RTEMS object.
Definition: types.h:99
uint32_t rtems_event_set
This integer type can hold an event set of up to 32 events represented as a bit field.
Definition: event.h:94
Constants and Structures Related with the Thread Control Block.
void RtemsEventReqSendReceive_Run(rtems_status_code(*send)(rtems_id, rtems_event_set), rtems_status_code(*receive)(rtems_event_set, rtems_option, rtems_interval, rtems_event_set *), rtems_event_set(*get_pending_events)(Thread_Control *), unsigned int wait_class, int waiting_for_event)
Runs the parameterized test case.