RTEMS
Files | Classes | Macros | Functions
Message Manager

The Message Manager provides communication and synchronization capabilities using RTEMS message queues. More...

Files

file  message.h
 This header file defines the Message Manager API.
 

Classes

struct  rtems_message_queue_config
 This structure defines the configuration of a message queue constructed by rtems_message_queue_construct(). More...
 

Macros

#define RTEMS_MESSAGE_QUEUE_BUFFER(_maximum_message_size)
 Defines a structure which can be used as a message queue buffer for messages of the specified maximum size. More...
 

Functions

rtems_status_code rtems_message_queue_broadcast (rtems_id id, const void *buffer, size_t size, uint32_t *count)
 % More...
 
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. More...
 
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)
 % More...
 
rtems_status_code rtems_message_queue_delete (rtems_id id)
 % More...
 
rtems_status_code rtems_message_queue_flush (rtems_id id, uint32_t *count)
 % More...
 
rtems_status_code rtems_message_queue_get_number_pending (rtems_id id, uint32_t *count)
 % More...
 
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. More...
 
rtems_status_code rtems_message_queue_receive (rtems_id id, void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout)
 % More...
 
rtems_status_code rtems_message_queue_send (rtems_id id, const void *buffer, size_t size)
 % More...
 
rtems_status_code rtems_message_queue_urgent (rtems_id id, const void *buffer, size_t size)
 % More...
 

Detailed Description

The Message Manager provides communication and synchronization capabilities using RTEMS message queues.

Macro Definition Documentation

◆ RTEMS_MESSAGE_QUEUE_BUFFER

#define RTEMS_MESSAGE_QUEUE_BUFFER (   _maximum_message_size)
Value:
struct { \
CORE_message_queue_Buffer _buffer; \
char _message[ _maximum_message_size ]; \
}

Defines a structure which can be used as a message queue buffer for messages of the specified maximum size.

Use this macro to define the message buffer storage area for rtems_message_queue_construct().

Parameters
_maximum_message_sizeis the maximum message size in bytes.

Definition at line 171 of file message.h.

Function Documentation

◆ rtems_message_queue_broadcast()

rtems_status_code rtems_message_queue_broadcast ( rtems_id  id,
const void *  buffer,
size_t  size,
uint32_t *  count 
)

%

Parameters
id%
buffer%
size%
count%

Definition at line 24 of file msgqbroadcast.c.

◆ rtems_message_queue_construct()

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.

In contrast to message queues created by rtems_message_queue_create(), the message queues constructed by this directive use a user-provided message buffer storage area.

This directive is intended for applications which do not want to use the RTEMS Workspace and instead statically allocate all operating system resources. An application based solely on static allocation can avoid any runtime memory allocators. This can simplify the application architecture as well as any analysis that may be required.

The value for CONFIGURE_MESSAGE_BUFFER_MEMORY should not include memory for message queues constructed by rtems_message_queue_construct().

Parameters
configis the message queue configuration.
[out]idis the pointer to an object identifier variable. The identifier of the constructed message queue object will be stored in this variable, in case of a successful operation.
Return values
RTEMS_SUCCESSFULThe requested operation was successful.
RTEMS_INVALID_ADDRESSThe id parameter was NULL.
RTEMS_INVALID_NAMEThe message queue name in the configuration was invalid.
RTEMS_INVALID_NUMBERThe maximum number of pending messages in the configuration was zero.
RTEMS_INVALID_SIZEThe maximum message size in the configuration was zero.
RTEMS_TOO_MANYThere was no inactive message queue object available to construct a message queue.
RTEMS_TOO_MANYIn multiprocessing configurations, there was no inactive global object available to construct a global message queue.
RTEMS_INVALID_SIZEThe maximum message size in the configuration was too big and resulted in integer overflows in calculations carried out to determine the size of the message buffer area.
RTEMS_INVALID_NUMBERThe maximum number of pending messages in the configuration was too big and resulted in integer overflows in calculations carried out to determine the size of the message buffer area.
RTEMS_UNSATISFIEDThe message queue storage area begin pointer in the configuration was NULL.
RTEMS_UNSATISFIEDThe message queue storage area size in the configuration was not equal to the size calculated from the maximum number of pending messages and the maximum message size.

Definition at line 45 of file msgqconstruct.c.

◆ rtems_message_queue_create()

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 
)

%

Parameters
name%
count%
max_message_size%
attribute_set%
id%

Definition at line 46 of file msgqcreate.c.

◆ rtems_message_queue_delete()

rtems_status_code rtems_message_queue_delete ( rtems_id  id)

%

Parameters
id%

Definition at line 24 of file msgqdelete.c.

◆ rtems_message_queue_flush()

rtems_status_code rtems_message_queue_flush ( rtems_id  id,
uint32_t *  count 
)

%

Parameters
id%
count%

Definition at line 24 of file msgqflush.c.

◆ rtems_message_queue_get_number_pending()

rtems_status_code rtems_message_queue_get_number_pending ( rtems_id  id,
uint32_t *  count 
)

%

Parameters
id%
count%

Definition at line 24 of file msgqgetnumberpending.c.

◆ rtems_message_queue_ident()

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.

This directive obtains the message queue identifier associated with the message queue name specified in name.

The node to search is specified in node. It shall be

If the message queue name is not unique, then the message queue identifier will match the first message queue with that name in the search order. However, this message queue identifier is not guaranteed to correspond to the desired message queue. The message queue identifier is used with other message related directives to access the message queue.

If node is RTEMS_SEARCH_ALL_NODES, all nodes are searched with the local node being searched first. All other nodes are searched with the lowest numbered node searched first.

If node is a valid node number which does not represent the local node, then only the message queues exported by the designated node are searched.

This directive does not generate activity on remote nodes. It accesses only the local copy of the global object table.

Parameters
nameis the object name to look up.
nodeis the node or node set to search for a matching object.
[out]idis the pointer to an object identifier variable. The object identifier of an object with the specified name will be stored in this variable, in case of a successful operation.
Return values
RTEMS_SUCCESSFULThe requested operation was successful.
RTEMS_INVALID_ADDRESSThe id parameter was NULL.
RTEMS_INVALID_NAMEThe name parameter was 0.
RTEMS_INVALID_NAMEThere was no object with the specified name on the specified nodes.
RTEMS_INVALID_NODEIn multiprocessing configurations, the specified node was invalid.

Definition at line 44 of file msgqident.c.

◆ rtems_message_queue_receive()

rtems_status_code rtems_message_queue_receive ( rtems_id  id,
void *  buffer,
size_t *  size,
rtems_option  option_set,
rtems_interval  timeout 
)

%

Parameters
id%
buffer%
size%
option_set%
timeout%

Definition at line 31 of file msgqreceive.c.

◆ rtems_message_queue_send()

rtems_status_code rtems_message_queue_send ( rtems_id  id,
const void *  buffer,
size_t  size 
)

%

Parameters
id%
buffer%
size%

Definition at line 25 of file msgqsend.c.

◆ rtems_message_queue_urgent()

rtems_status_code rtems_message_queue_urgent ( rtems_id  id,
const void *  buffer,
size_t  size 
)

%

Parameters
id%
buffer%
size%

Definition at line 24 of file msgqurgent.c.