RTEMS
tr-event-send.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 #ifndef _TR_EVENT_SEND_H
35 #define _TR_EVENT_SEND_H
36 
37 #include <rtems.h>
38 #include <rtems/score/thread.h>
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
50 typedef enum {
51  ReqRtemsEventSendReceive_Pre_Id_InvId,
52  ReqRtemsEventSendReceive_Pre_Id_Task,
53  ReqRtemsEventSendReceive_Pre_Id_NA
54 } ReqRtemsEventSendReceive_Pre_Id;
55 
56 typedef enum {
57  ReqRtemsEventSendReceive_Pre_Send_Zero,
58  ReqRtemsEventSendReceive_Pre_Send_Unrelated,
59  ReqRtemsEventSendReceive_Pre_Send_Any,
60  ReqRtemsEventSendReceive_Pre_Send_All,
61  ReqRtemsEventSendReceive_Pre_Send_MixedAny,
62  ReqRtemsEventSendReceive_Pre_Send_MixedAll,
63  ReqRtemsEventSendReceive_Pre_Send_NA
64 } ReqRtemsEventSendReceive_Pre_Send;
65 
66 typedef enum {
67  ReqRtemsEventSendReceive_Pre_ReceiverState_NotWaiting,
68  ReqRtemsEventSendReceive_Pre_ReceiverState_Poll,
69  ReqRtemsEventSendReceive_Pre_ReceiverState_Timeout,
70  ReqRtemsEventSendReceive_Pre_ReceiverState_Lower,
71  ReqRtemsEventSendReceive_Pre_ReceiverState_Equal,
72  ReqRtemsEventSendReceive_Pre_ReceiverState_Higher,
73  ReqRtemsEventSendReceive_Pre_ReceiverState_Other,
74  ReqRtemsEventSendReceive_Pre_ReceiverState_Intend,
75  ReqRtemsEventSendReceive_Pre_ReceiverState_NA
76 } ReqRtemsEventSendReceive_Pre_ReceiverState;
77 
78 typedef enum {
79  ReqRtemsEventSendReceive_Pre_Satisfy_All,
80  ReqRtemsEventSendReceive_Pre_Satisfy_Any,
81  ReqRtemsEventSendReceive_Pre_Satisfy_NA
82 } ReqRtemsEventSendReceive_Pre_Satisfy;
83 
84 typedef enum {
85  ReqRtemsEventSendReceive_Post_SendStatus_Ok,
86  ReqRtemsEventSendReceive_Post_SendStatus_InvId,
87  ReqRtemsEventSendReceive_Post_SendStatus_NA
88 } ReqRtemsEventSendReceive_Post_SendStatus;
89 
90 typedef enum {
91  ReqRtemsEventSendReceive_Post_ReceiveStatus_None,
92  ReqRtemsEventSendReceive_Post_ReceiveStatus_Pending,
93  ReqRtemsEventSendReceive_Post_ReceiveStatus_Timeout,
94  ReqRtemsEventSendReceive_Post_ReceiveStatus_Satisfied,
95  ReqRtemsEventSendReceive_Post_ReceiveStatus_Unsatisfied,
96  ReqRtemsEventSendReceive_Post_ReceiveStatus_Blocked,
97  ReqRtemsEventSendReceive_Post_ReceiveStatus_NA
98 } ReqRtemsEventSendReceive_Post_ReceiveStatus;
99 
100 typedef enum {
101  ReqRtemsEventSendReceive_Post_SenderPreemption_No,
102  ReqRtemsEventSendReceive_Post_SenderPreemption_Yes,
103  ReqRtemsEventSendReceive_Post_SenderPreemption_NA
104 } ReqRtemsEventSendReceive_Post_SenderPreemption;
105 
118  rtems_event_set ( *get_pending_events )( Thread_Control * )
119 );
120 
123 #ifdef __cplusplus
124 }
125 #endif
126 
127 #endif /* _TR_EVENT_SEND_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
void ReqRtemsEventSendReceive_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 *))
Runs the parameterized test case.
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.