![]() |
L4Re Operating System Framework
Interface and Usage Documentation
|
Input stream for IPC unmarshalling. More...
#include <ipc_stream>
Public Member Functions | |
| Istream (l4_utcb_t *utcb) | |
| Create an input stream for the given message buffer. | |
| void | reset () |
| Reset the stream to empty, and ready for receive()/wait(). | |
| template<typename T> | |
| bool | has_more (unsigned long count=1) |
| Check whether a value of type T can be obtained from the stream. | |
| l4_utcb_t * | utcb () const |
| Return utcb pointer. | |
Get/Put Functions. | |
| template<typename T> | |
| unsigned long | get (T *buf, unsigned long elems) |
| Copy out an array of type T with size elements. | |
| template<typename T> | |
| void | skip (unsigned long elems) |
| Skip size elements of type T in the stream. | |
| template<typename T> | |
| unsigned long | get (Msg_ptr< T > const &buf, unsigned long elems=1) |
| Read one size elements of type T from the stream and return a pointer. | |
| template<typename T> | |
| bool | get (T &v) |
| Extract a single element of type T from the stream. | |
| l4_msgtag_t | tag () const |
| Get the message tag of a received IPC. | |
| l4_msgtag_t & | tag () |
| Get the message tag of a received IPC. | |
IPC operations. | |
| l4_msgtag_t | wait (l4_umword_t *src) |
| Wait for an incoming message from any sender. | |
| l4_msgtag_t | wait (l4_umword_t *src, l4_timeout_t timeout) |
| Wait for an incoming message from any sender. | |
| l4_msgtag_t | receive (l4_cap_idx_t src) |
| Wait for a message from the specified sender. | |
Input stream for IPC unmarshalling.
Ipc::Istream is part of the dynamic IPC marshalling infrastructure, as well as Ipc::Ostream and Ipc::Iostream.
Ipc::Istream is an input stream supporting extraction of values from an IPC message buffer. A received IPC message can be unmarshalled using the usual extraction operator (>>).
There exist some special wrapper classes to extract arrays (see Ipc_buf_cp_in and Ipc_buf_in) and indirect strings (see Msg_in_buffer and Msg_io_buffer).
Definition at line 334 of file ipc_stream.
|
inline |
Create an input stream for the given message buffer.
The given message buffer is used for IPC operations wait()/receive() and received data can be extracted using the >> operator afterwards. In the case of indirect message parts a buffer of type Msg_in_buffer must be inserted into the stream before the IPC operation and contains received data afterwards.
| utcb | The message buffer to receive IPC messages. |
Definition at line 348 of file ipc_stream.
References utcb().
Referenced by L4::Ipc::Iostream::Iostream().
|
inline |
Read one size elements of type T from the stream and return a pointer.
| buf | A Msg_ptr that is actually set to point to the element in the stream. |
| elems | Number of elements to extract (default is 1). |
In contrast to a normal get, this version does actually not copy the data but returns a pointer to the data.
See operator>>()
Definition at line 439 of file ipc_stream.
References has_more(), and L4_UNLIKELY.
|
inline |
Extract a single element of type T from the stream.
| [out] | v | The element. |
| true | An element was successfully extracted. |
| false | An element could not be extracted. |
See operator>>()
Definition at line 464 of file ipc_stream.
References has_more(), and L4_UNLIKELY.
|
inline |
Copy out an array of type T with size elements.
| buf | Pointer to a buffer for size elements of type T. |
| elems | Number of elements of type T to copy out. |
See operator>>()
Definition at line 394 of file ipc_stream.
References has_more(), and L4_UNLIKELY.
Referenced by operator>>(), operator>>(), operator>>(), operator>>(), and operator>>().
|
inline |
Wait for a message from the specified sender.
| src | The sender id to receive from. |
This is commonly known as 'closed wait'.
Definition at line 572 of file ipc_stream.
References L4_IPC_NEVER, and receive().
Referenced by receive().
|
inline |
Reset the stream to empty, and ready for receive()/wait().
The stream is reset to the same state as on its creation.
Definition at line 358 of file ipc_stream.
Referenced by L4::Ipc::Iostream::reset().
|
inline |
Skip size elements of type T in the stream.
| elems | Number of elements to skip. |
Definition at line 414 of file ipc_stream.
References has_more(), and L4_UNLIKELY.
|
inline |
Get the message tag of a received IPC.
This is in particular useful for handling page faults or exceptions.
See operator>>()
Definition at line 517 of file ipc_stream.
|
inline |
Get the message tag of a received IPC.
This is in particular useful for handling page faults or exceptions.
See operator>>()
Definition at line 505 of file ipc_stream.
Referenced by L4::Ipc::Iostream::call(), operator>>(), L4::Ipc::Iostream::reply_and_wait(), and wait().
|
inline |
Wait for an incoming message from any sender.
| [out] | src | Contains the sender after a successful IPC operation. |
This wait is actually known as 'open wait'.
Definition at line 548 of file ipc_stream.
References L4_IPC_NEVER, and wait().
Referenced by wait().
|
inline |
Wait for an incoming message from any sender.
| [out] | src | Contains the sender after a successful IPC operation. |
| timeout | Timeout used for IPC. |
This wait is actually known as 'open wait'.
Definition at line 1013 of file ipc_stream.
References l4_ipc_wait(), and tag().