Skip to main content


ec_message_rsrc_set — This function associates I/O object source with the resource name for message


#include "ec_message.h"

| int **ec_message_rsrc_set** ( | message, |   | |   | name, |   | |   | io); |   |

ec_message * <var class="pdparam">message</var>; const char * <var class="pdparam">name</var>; io_object * <var class="pdparam">io</var>;



This reference page was automatically generated from functions found in the header files in the development branch. The function described here may not exist in generally available versions of Momentum, and may change in behavior when it is generally available. Consult your vendor for definitive advice on the use of this function.

This function associates I/O object source with the resource name for message.

If a resource with the given name does not exist then a new resource is created. If a resource exists with the provided name then the resource's I/O object is replaced with source. The source I/O object will have a reference added to it. The previous I/O object will be placed in a backlog and be destroyed either with an explicit ec_message_rsrc_flush or during swap-out (ec_message_swap_out). Behavior is undefined if source is NULL. Any set operation will indicate that the message resource has been updated so it can be explicitly swapped out during message swap out.



the message to associated the resource with


the name of the resource to set or create


the state of the associated I/O object


the I/O object associated with the resource

Return Values

Returns 0 on success. Returns -1 on failure and sets errno to indicate the reason.

**Configuration Change. ** This feature is available starting from Momentum 3.1.

Was this page helpful?