L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
L4::Ipc::Ostream Class Reference

Output stream for IPC marshalling. More...

#include <ipc_stream>

+ Inheritance diagram for L4::Ipc::Ostream:
+ Collaboration diagram for L4::Ipc::Ostream:

Public Member Functions

 Ostream (l4_utcb_t *utcb)
 Create an IPC output stream using the given message buffer utcb.
 
void reset ()
 Reset the stream to empty, same state as a newly created stream.
 
l4_utcb_tutcb () const
 Return utcb pointer.
 
Get/Put functions.

These functions are basically used to implement the insertion operators (<<) and should not be called directly.

template<typename T >
bool put (T *buf, unsigned long size)
 Put an array with size elements of type T into the stream.
 
template<typename T >
bool put (T const &v)
 Insert an element of type T into the stream.
 
l4_msgtag_t tag () const
 Extract the L4 message tag from the stream.
 
l4_msgtag_ttag ()
 Extract a reference to the L4 message tag from the stream.
 
IPC operations.
l4_msgtag_t send (l4_cap_idx_t dst, long proto=0, unsigned flags=0)
 Send the message via IPC to the given receiver.
 

Detailed Description

Output stream for IPC marshalling.

Ipc::Ostream is part of the dynamic IPC marshalling infrastructure, as well as Ipc::Istream and Ipc::Iostream.

Ipc::Ostream is an output stream supporting insertion of values into an IPC message buffer. A IPC message can be marshalled using the usual insertion operator <<, see IPC stream operators .

There exist some special wrapper classes to insert arrays (see Ipc::Buf_cp_out) and indirect strings (see Msg_out_buffer and Msg_io_buffer).

Definition at line 634 of file ipc_stream.

Member Function Documentation

◆ put() [1/2]

template<typename T >
bool L4::Ipc::Ostream::put ( T *  buf,
unsigned long  size 
)
inline

Put an array with size elements of type T into the stream.

Parameters
bufA pointer to the array to insert into the buffer.
sizeThe number of elements in the array.

Definition at line 671 of file ipc_stream.

Referenced by operator<<(), operator<<(), and operator<<().

+ Here is the caller graph for this function:

◆ put() [2/2]

template<typename T >
bool L4::Ipc::Ostream::put ( T const &  v)
inline

Insert an element of type T into the stream.

Parameters
vThe element to insert.

Definition at line 689 of file ipc_stream.

◆ send()

l4_msgtag_t L4::Ipc::Ostream::send ( l4_cap_idx_t  dst,
long  proto = 0,
unsigned  flags = 0 
)
inline

Send the message via IPC to the given receiver.

Parameters
dstThe destination for the message.
protoProtocol to use.
flagsFlags to use.
Returns
The syscall return tag.

Definition at line 970 of file ipc_stream.

References L4_IPC_NEVER, l4_ipc_send(), L4_MSGTAG_FLAGS, and tag().

+ Here is the call graph for this function:

◆ tag() [1/2]

l4_msgtag_t & L4::Ipc::Ostream::tag ( )
inline

Extract a reference to the L4 message tag from the stream.

Returns
A reference to the L4 message tag.

Definition at line 724 of file ipc_stream.

◆ tag() [2/2]

l4_msgtag_t L4::Ipc::Ostream::tag ( ) const
inline

Extract the L4 message tag from the stream.

Returns
The extracted L4 message tag.

Definition at line 717 of file ipc_stream.

Referenced by operator<<(), and send().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: