L4Re - L4 Runtime Environment
L4::Ipc::Ostream Class Reference

Output stream for IPC marshalling. More...

+ 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. More...
 
template<typename T >
bool put (T const &v)
 Insert an element of type T into the stream. More...
 
int put (Varg const &va)
 
template<typename T >
int put (Varg_t< T > const &va)
 
l4_msgtag_t tag () const
 Extract the L4 message tag from the stream. More...
 
l4_msgtag_ttag ()
 Extract a reference to the L4 message tag from the stream. More...
 
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. More...
 

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 623 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 660 of file ipc_stream.

◆ 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 678 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
Syscall return tag.

Definition at line 955 of file ipc_stream.

◆ tag() [1/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 706 of file ipc_stream.

◆ tag() [2/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 713 of file ipc_stream.


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