RTEMS
message.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-2-Clause */
2 
11 /*
12  * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
13  * Copyright (C) 1988, 2008 On-Line Applications Research Corporation (OAR)
14  *
15  * Redistribution and use in source and binary forms, with or without
16  * modification, are permitted provided that the following conditions
17  * are met:
18  * 1. Redistributions of source code must retain the above copyright
19  * notice, this list of conditions and the following disclaimer.
20  * 2. Redistributions in binary form must reproduce the above copyright
21  * notice, this list of conditions and the following disclaimer in the
22  * documentation and/or other materials provided with the distribution.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
28  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  * POSSIBILITY OF SUCH DAMAGE.
35  */
36 
37 /*
38  * Do not manually edit this file. It is part of the RTEMS quality process
39  * and was automatically generated.
40  *
41  * If you find something that needs to be fixed or worded better please
42  * post a report to an RTEMS mailing list or raise a bug report:
43  *
44  * https://docs.rtems.org/branches/master/user/support/bugs.html
45  *
46  * For information on updating and regenerating please refer to:
47  *
48  * https://docs.rtems.org/branches/master/eng/req/howto.html
49  */
50 
51 /* Generated from spec:/rtems/message/if/header */
52 
53 #ifndef _RTEMS_RTEMS_MESSAGE_H
54 #define _RTEMS_RTEMS_MESSAGE_H
55 
56 #include <stddef.h>
57 #include <stdint.h>
58 #include <rtems/rtems/attr.h>
59 #include <rtems/rtems/options.h>
60 #include <rtems/rtems/status.h>
61 #include <rtems/rtems/types.h>
63 
64 #ifdef __cplusplus
65 extern "C" {
66 #endif
67 
68 /* Generated from spec:/rtems/message/if/group */
69 
79 /* Generated from spec:/rtems/message/if/config */
80 
87 typedef struct {
92 
98 
104 
113 
117  size_t storage_size;
118 
128  void ( *storage_free )( void * );
129 
135 
136 /* Generated from spec:/rtems/message/if/broadcast */
137 
152  rtems_id id,
153  const void *buffer,
154  size_t size,
155  uint32_t *count
156 );
157 
158 /* Generated from spec:/rtems/message/if/buffer */
159 
171 #define RTEMS_MESSAGE_QUEUE_BUFFER( _maximum_message_size ) \
172  struct { \
173  CORE_message_queue_Buffer _buffer; \
174  char _message[ _maximum_message_size ]; \
175  }
176 
177 /* Generated from spec:/rtems/message/if/construct */
178 
239  const rtems_message_queue_config *config,
240  rtems_id *id
241 );
242 
243 /* Generated from spec:/rtems/message/if/create */
244 
261  rtems_name name,
262  uint32_t count,
263  size_t max_message_size,
264  rtems_attribute attribute_set,
265  rtems_id *id
266 );
267 
268 /* Generated from spec:/rtems/message/if/delete */
269 
278 
279 /* Generated from spec:/rtems/message/if/flush */
280 
291 
292 /* Generated from spec:/rtems/message/if/get-number-pending */
293 
304  rtems_id id,
305  uint32_t *count
306 );
307 
308 /* Generated from spec:/rtems/message/if/ident */
309 
366  rtems_name name,
367  uint32_t node,
368  rtems_id *id
369 );
370 
371 /* Generated from spec:/rtems/message/if/receive */
372 
389  rtems_id id,
390  void *buffer,
391  size_t *size,
392  rtems_option option_set,
393  rtems_interval timeout
394 );
395 
396 /* Generated from spec:/rtems/message/if/send */
397 
410  rtems_id id,
411  const void *buffer,
412  size_t size
413 );
414 
415 /* Generated from spec:/rtems/message/if/urgent */
416 
429  rtems_id id,
430  const void *buffer,
431  size_t size
432 );
433 
434 #ifdef __cplusplus
435 }
436 #endif
437 
438 #endif /* _RTEMS_RTEMS_MESSAGE_H */
This header file defines types provided by the Classic API.
rtems_status_code rtems_message_queue_delete(rtems_id id)
%
Definition: msgqdelete.c:24
uint32_t rtems_name
This type is used to represent a Classic API object name.
Definition: types.h:227
uint32_t rtems_option
This type is used to represent an option set.
Definition: options.h:121
rtems_status_code rtems_message_queue_flush(rtems_id id, uint32_t *count)
%
Definition: msgqflush.c:24
This header file defines the status codes and support functions of the Classic API.
rtems_name name
This member defines the name of the message queue.
Definition: message.h:91
rtems_status_code rtems_message_queue_receive(rtems_id id, void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout)
%
Definition: msgqreceive.c:31
rtems_status_code rtems_message_queue_broadcast(rtems_id id, const void *buffer, size_t size, uint32_t *count)
%
Definition: msgqbroadcast.c:24
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:82
This header file defines the buffer data structure used by the Message Queue Handler.
This structure defines the configuration of a message queue constructed by rtems_message_queue_constr...
Definition: message.h:87
This header file defines attributes provided by the Classic API.
void * storage_area
This member shall point to the message buffer storage area begin.
Definition: message.h:112
rtems_status_code rtems_message_queue_get_number_pending(rtems_id id, uint32_t *count)
%
rtems_status_code rtems_message_queue_create(rtems_name name, uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id)
%
Definition: msgqcreate.c:46
uint32_t rtems_attribute
This type is used to represent Classic API attributes.
Definition: attr.h:91
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
rtems_status_code rtems_message_queue_ident(rtems_name name, uint32_t node, rtems_id *id)
Identifies a message queue object by the specified object name.
Definition: msgqident.c:44
This header file defines options provided by the Classic API.
rtems_status_code rtems_message_queue_construct(const rtems_message_queue_config *config, rtems_id *id)
Constructs a message queue from the specified the message queue configuration.
Definition: msgqconstruct.c:45
rtems_status_code rtems_message_queue_urgent(rtems_id id, const void *buffer, size_t size)
%
Definition: msgqurgent.c:24
rtems_attribute attributes
This member defines the attributes of the message queue.
Definition: message.h:133
size_t storage_size
This member defines size of the message buffer storage area in bytes.
Definition: message.h:117
rtems_status_code rtems_message_queue_send(rtems_id id, const void *buffer, size_t size)
%
Definition: msgqsend.c:25
size_t maximum_message_size
This member defines the maximum message size supported by the message queue.
Definition: message.h:103
uint32_t maximum_pending_messages
This member defines the maximum number of pending messages supported by the message queue...
Definition: message.h:97