This is the nmad Pack interface, an nmad interface with incremental packing/unpacking of messages, and fully blocking interface.
More...
typedef struct nm_pack_cnx_s | nm_pack_cnx_t |
| A request for the pack interface. More...
|
|
int | nm_begin_packing (nm_session_t p_session, nm_gate_t p_gate, nm_tag_t tag, nm_pack_cnx_t *p_cnx) |
| Start building a new message for sending. More...
|
|
int | nm_pack (nm_pack_cnx_t *p_cnx, const void *ptr, nm_len_t len) |
| Append a data fragment to the current message. More...
|
|
int | nm_pack_express (nm_pack_cnx_t *p_cnx, const void *ptr, nm_len_t len) |
| Append a data fragment to the current message, in express mode: data will be aavailable immediately after unpack in receiver side. More...
|
|
int | nm_end_packing (nm_pack_cnx_t *p_cnx) |
| End building and send the current message. More...
|
|
int | nm_begin_unpacking (nm_session_t p_session, nm_gate_t p_gate, nm_tag_t tag, nm_pack_cnx_t *p_cnx) |
| Start receiving and extracting a new message. More...
|
|
int | nm_unpack (nm_pack_cnx_t *p_cnx, void *ptr, nm_len_t len) |
| Extract a data fragment from the current message; data will actually be available after end_unpacking. More...
|
|
int | nm_unpack_express (nm_pack_cnx_t *p_cnx, void *ptr, nm_len_t len) |
| Extract a data fragment from the current message in express mode: data will be available upon function return. More...
|
|
int | nm_end_unpacking (nm_pack_cnx_t *p_cnx) |
| End receiving and flush extraction of the current message. More...
|
|
This is the nmad Pack interface, an nmad interface with incremental packing/unpacking of messages, and fully blocking interface.
It is similar, although not indentical, to the old interface from mad3.
◆ nm_pack_cnx_t
◆ nm_begin_packing()
Start building a new message for sending.
- Parameters
-
p_session | a pointer to a nmad session object. |
p_gate | the gate to the destination. |
tag | the message tag. |
p_cnx | pointer to a pack request allocated by user |
- Returns
- The NM status.
- Examples
- nm_pack_headers.c.
◆ nm_begin_unpacking()
Start receiving and extracting a new message.
- Parameters
-
p_session | a pointer to a nmad session object. |
p_gate | the gate of the source or -1 for receiving from any source. |
tag | the message tag. |
p_cnx | pointer to a pack request allocated by user |
- Returns
- The NM status.
- Examples
- nm_pack_headers.c.
◆ nm_end_packing()
End building and send the current message.
- Parameters
-
p_cnx | a NM/SO connection pointer. |
- Returns
- The NM status.
- Examples
- nm_pack_headers.c.
◆ nm_end_unpacking()
End receiving and flush extraction of the current message.
- Parameters
-
p_cnx | a NM/SO connection pointer. |
- Returns
- The NM status.
- Examples
- nm_pack_headers.c.
◆ nm_pack()
Append a data fragment to the current message.
- Parameters
-
p_cnx | a NM/SO connection pointer. |
ptr | a pointer to the data fragment. |
len | the length of the data fragment. |
- Returns
- The NM status.
- Examples
- nm_pack_headers.c.
◆ nm_pack_express()
Append a data fragment to the current message, in express mode: data will be aavailable immediately after unpack in receiver side.
- Examples
- nm_pack_headers.c.
◆ nm_unpack()
Extract a data fragment from the current message; data will actually be available after end_unpacking.
- Parameters
-
p_cnx | a NM/SO connection pointer. |
ptr | a pointer to the data fragment. |
len | the length of the data fragment. |
- Returns
- The NM status.
- Examples
- nm_pack_headers.c.
◆ nm_unpack_express()
Extract a data fragment from the current message in express mode: data will be available upon function return.
Note: data must have been sent with pack_express primitive.
- Examples
- nm_pack_headers.c.