RTEMS 6.3
Loading...
Searching...
No Matches
message.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
10
11/*
12 * Copyright (C) 2020, 2021 embedded brains GmbH & Co. KG
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 * This file is part of the RTEMS quality process and was automatically
39 * generated. If you find something that needs to be fixed or
40 * worded better please post a report or patch to an RTEMS mailing list
41 * or raise a bug report:
42 *
43 * https://www.rtems.org/bugs.html
44 *
45 * For information on updating and regenerating please refer to the How-To
46 * section in the Software Requirements Engineering chapter of the
47 * RTEMS Software Engineering manual. The manual is provided as a part of
48 * a release. For development sources please refer to the online
49 * documentation at:
50 *
51 * https://docs.rtems.org
52 */
53
54/* Generated from spec:/rtems/message/if/header */
55
56#ifndef _RTEMS_RTEMS_MESSAGE_H
57#define _RTEMS_RTEMS_MESSAGE_H
58
59#include <stddef.h>
60#include <stdint.h>
61#include <rtems/rtems/attr.h>
62#include <rtems/rtems/options.h>
63#include <rtems/rtems/status.h>
64#include <rtems/rtems/types.h>
66
67#ifdef __cplusplus
68extern "C" {
69#endif
70
71/* Generated from spec:/rtems/message/if/group */
72
81
82/* Generated from spec:/rtems/message/if/config */
83
138
139/* Generated from spec:/rtems/message/if/create */
140
276 rtems_name name,
277 uint32_t count,
278 size_t max_message_size,
279 rtems_attribute attribute_set,
280 rtems_id *id
281);
282
283/* Generated from spec:/rtems/message/if/construct */
284
379 const rtems_message_queue_config *config,
380 rtems_id *id
381);
382
383/* Generated from spec:/rtems/message/if/ident */
384
456 rtems_name name,
457 uint32_t node,
458 rtems_id *id
459);
460
461/* Generated from spec:/rtems/message/if/delete */
462
525
526/* Generated from spec:/rtems/message/if/send */
527
578 rtems_id id,
579 const void *buffer,
580 size_t size
581);
582
583/* Generated from spec:/rtems/message/if/urgent */
584
635 rtems_id id,
636 const void *buffer,
637 size_t size
638);
639
640/* Generated from spec:/rtems/message/if/broadcast */
641
698 rtems_id id,
699 const void *buffer,
700 size_t size,
701 uint32_t *count
702);
703
704/* Generated from spec:/rtems/message/if/receive */
705
806 rtems_id id,
807 void *buffer,
808 size_t *size,
809 rtems_option option_set,
810 rtems_interval timeout
811);
812
813/* Generated from spec:/rtems/message/if/get-number-pending */
814
851 rtems_id id,
852 uint32_t *count
853);
854
855/* Generated from spec:/rtems/message/if/flush */
856
898
899/* Generated from spec:/rtems/message/if/buffer */
900
913#define RTEMS_MESSAGE_QUEUE_BUFFER( _maximum_message_size ) \
914 struct { \
915 CORE_message_queue_Buffer _buffer; \
916 char _message[ _maximum_message_size ]; \
917 }
918
919#ifdef __cplusplus
920}
921#endif
922
923#endif /* _RTEMS_RTEMS_MESSAGE_H */
This header file provides Classic API directive attributes.
This header file provides interfaces of the Message Queue Handler which are used by the implementatio...
This header file provides types used by the Classic API.
uint32_t rtems_attribute
This type represents Classic API attributes.
Definition attr.h:96
rtems_status_code rtems_message_queue_send(rtems_id id, const void *buffer, size_t size)
Puts the message at the rear of the queue.
Definition msgqsend.c:45
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:72
rtems_status_code rtems_message_queue_delete(rtems_id id)
Deletes the message queue.
Definition msgqdelete.c:45
rtems_status_code rtems_message_queue_broadcast(rtems_id id, const void *buffer, size_t size, uint32_t *count)
Broadcasts the messages to the tasks waiting at the queue.
Definition msgqbroadcast.c:45
rtems_status_code rtems_message_queue_flush(rtems_id id, uint32_t *count)
Flushes all messages on the queue.
Definition msgqflush.c:44
rtems_status_code rtems_message_queue_ident(rtems_name name, uint32_t node, rtems_id *id)
Identifies a message queue by the object name.
Definition msgqident.c:45
rtems_status_code rtems_message_queue_receive(rtems_id id, void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout)
Receives a message from the queue.
Definition msgqreceive.c:52
rtems_status_code rtems_message_queue_get_number_pending(rtems_id id, uint32_t *count)
Gets the number of messages pending on the queue.
Definition msgqgetnumberpending.c:44
rtems_status_code rtems_message_queue_urgent(rtems_id id, const void *buffer, size_t size)
Puts the message at the front of the queue.
Definition msgqurgent.c:45
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)
Creates a message queue.
Definition msgqcreate.c:46
uint32_t rtems_option
This type represents a Classic API directive option set.
Definition options.h:126
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition status.h:85
uint32_t rtems_name
This type represents Classic API object names.
Definition types.h:226
Objects_Id rtems_id
This type represents RTEMS object identifiers.
Definition types.h:94
Watchdog_Interval rtems_interval
This type represents clock tick intervals.
Definition types.h:114
This header file provides the Classic API directive options.
This header file provides the status codes of Classic API directives and support functions.
This structure defines the configuration of a message queue constructed by rtems_message_queue_constr...
Definition message.h:90
void * storage_area
This member shall point to the message buffer storage area begin.
Definition message.h:115
size_t maximum_message_size
This member defines the maximum message size supported by the message queue.
Definition message.h:106
rtems_attribute attributes
This member defines the attributes of the message queue.
Definition message.h:136
size_t storage_size
This member defines size of the message buffer storage area in bytes.
Definition message.h:120
rtems_name name
This member defines the name of the message queue.
Definition message.h:94
void(*) storage_free(void *)
This member defines the optional handler to free the message buffer storage area.
Definition message.h:131
uint32_t maximum_pending_messages
This member defines the maximum number of pending messages supported by the message queue.
Definition message.h:100