L4Re - L4 Runtime Environment
ipc_stream File Reference

IPC stream. More...

#include <l4/sys/ipc.h>
#include <l4/sys/capability>
#include <l4/sys/cxx/ipc_types>
#include <l4/sys/cxx/ipc_varg>
#include <l4/cxx/type_traits>
#include <l4/cxx/minmax>
+ Include dependency graph for ipc_stream:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  L4::Ipc::Str_cp_in< T >
 Abstraction for extracting a zero-terminated string from an Ipc::Istream. More...
 
class  L4::Ipc::Msg_ptr< T >
 Pointer to an element of type T in an Ipc::Istream. More...
 
class  L4::Ipc::Istream
 Input stream for IPC unmarshalling. More...
 
class  L4::Ipc::Ostream
 Output stream for IPC marshalling. More...
 
class  L4::Ipc::Iostream
 Input/Output stream for IPC [un]marshalling. More...
 

Namespaces

 L4
 L4 low-level kernel interface.
 
 L4::Ipc
 IPC related functionality.
 

Functions

template<typename T >
Internal::Buf_cp_out< T > L4::Ipc::buf_cp_out (T const *v, unsigned long size)
 Insert an array into an Ipc::Ostream. More...
 
template<typename T >
Internal::Buf_cp_in< T > L4::Ipc::buf_cp_in (T *v, unsigned long &size)
 Extract an array from an Ipc::Istream. More...
 
template<typename T >
Str_cp_in< T > L4::Ipc::str_cp_in (T *v, unsigned long &size)
 Create a Str_cp_in for the given values. More...
 
template<typename T >
Msg_ptr< T > L4::Ipc::msg_ptr (T *&p)
 Create an Msg_ptr to adjust the given pointer. More...
 
template<typename T >
Internal::Buf_in< T > L4::Ipc::buf_in (T *&v, unsigned long &size)
 Return a pointer to stream array data. More...
 
L4::Ipc::Istreamoperator>> (L4::Ipc::Istream &s, bool &v)
 Extract one element of type T from the stream s. More...
 
L4::Ipc::Istreamoperator>> (L4::Ipc::Istream &s, l4_msgtag_t &v)
 Extract the L4 message tag from the stream s. More...
 
template<typename T >
L4::Ipc::Istreamoperator>> (L4::Ipc::Istream &s, L4::Ipc::Internal::Buf_in< T > const &v)
 Extract an array of T elements from the stream s. More...
 
template<typename T >
L4::Ipc::Istreamoperator>> (L4::Ipc::Istream &s, L4::Ipc::Msg_ptr< T > const &v)
 Extract an element of type T from the stream s. More...
 
template<typename T >
L4::Ipc::Istreamoperator>> (L4::Ipc::Istream &s, L4::Ipc::Internal::Buf_cp_in< T > const &v)
 Extract an array of T elements from the stream s. More...
 
template<typename T >
L4::Ipc::Istreamoperator>> (L4::Ipc::Istream &s, L4::Ipc::Str_cp_in< T > const &v)
 Extract a zero-terminated string from the stream. More...
 
L4::Ipc::Ostreamoperator<< (L4::Ipc::Ostream &s, bool v)
 Insert an element to type T into the stream s. More...
 
L4::Ipc::Ostreamoperator<< (L4::Ipc::Ostream &s, l4_msgtag_t const &v)
 Insert the L4 message tag into the stream s. More...
 
template<typename T >
L4::Ipc::Ostreamoperator<< (L4::Ipc::Ostream &s, L4::Ipc::Internal::Buf_cp_out< T > const &v)
 Insert an array with elements of type T into the stream s. More...
 
L4::Ipc::Ostreamoperator<< (L4::Ipc::Ostream &s, char const *v)
 Insert a zero terminated character string into the stream s. More...
 
template<typename T >
L4::Ipc::read (Istream &s)
 Read a value out of a stream. More...
 

Detailed Description

IPC stream.

Definition in file ipc_stream.

Function Documentation

◆ operator<<() [1/4]

L4::Ipc::Ostream& operator<< ( L4::Ipc::Ostream s,
bool  v 
)
inline

Insert an element to type T into the stream s.

Parameters
sThe stream to insert the element v.
vThe element to insert.
Returns
The stream s.

Definition at line 1193 of file ipc_stream.

◆ operator<<() [2/4]

L4::Ipc::Ostream& operator<< ( L4::Ipc::Ostream s,
l4_msgtag_t const &  v 
)
inline

Insert the L4 message tag into the stream s.

Parameters
sThe stream to insert the tag v.
vThe L4 message tag to insert.
Returns
The stream s.
Note
Only one message tag can be inserted into a stream. Multiple insertions simply overwrite previous insertions.

Definition at line 1228 of file ipc_stream.

◆ operator<<() [3/4]

template<typename T >
L4::Ipc::Ostream& operator<< ( L4::Ipc::Ostream s,
L4::Ipc::Internal::Buf_cp_out< T > const &  v 
)
inline

Insert an array with elements of type T into the stream s.

Parameters
sThe stream to insert the array v.
vThe array to insert (see Ipc::Buf_cp_out()).
Returns
the stream s.

Definition at line 1244 of file ipc_stream.

◆ operator<<() [4/4]

L4::Ipc::Ostream& operator<< ( L4::Ipc::Ostream s,
char const *  v 
)
inline

Insert a zero terminated character string into the stream s.

Parameters
sThe stream to insert the string v.
vThe string to insert.
Returns
The stream s.

This operator produces basically the same content as the array insertion, however the length of the array is calculated using strlen(v) + 1 The string is copied into the message including the trailing zero.

Definition at line 1265 of file ipc_stream.

◆ operator>>() [1/6]

L4::Ipc::Istream& operator>> ( L4::Ipc::Istream s,
bool &  v 
)
inline

Extract one element of type T from the stream s.

Parameters
sThe stream to extract from.
[out]vExtracted value.
Returns
The stream s.

Definition at line 1040 of file ipc_stream.

◆ operator>>() [2/6]

L4::Ipc::Istream& operator>> ( L4::Ipc::Istream s,
l4_msgtag_t v 
)
inline

Extract the L4 message tag from the stream s.

Parameters
sThe stream to extract from.
[out]vThe extracted tag.
Returns
The stream s.

Definition at line 1074 of file ipc_stream.

◆ operator>>() [3/6]

template<typename T >
L4::Ipc::Istream& operator>> ( L4::Ipc::Istream s,
L4::Ipc::Internal::Buf_in< T > const &  v 
)
inline

Extract an array of T elements from the stream s.

Parameters
sThe stream to extract from.
[out]vPointer to the extracted array (ipc_buf_in()).
Returns
The stream s.

This operator actually does not copy out the data in the array, but returns a pointer into the message buffer itself. This means that the data is only valid as long as there is no new data inserted into the stream.

Note
If array does not fit into transmitted words size will be set to zero. Client has to implement check against zero.

See Ipc::Buf_in, Ipc::Buf_cp_in, and Ipc::Buf_cp_out.

Definition at line 1099 of file ipc_stream.

◆ operator>>() [4/6]

template<typename T >
L4::Ipc::Istream& operator>> ( L4::Ipc::Istream s,
L4::Ipc::Msg_ptr< T > const &  v 
)
inline

Extract an element of type T from the stream s.

Parameters
sThe stream to extract from.
[out]vPointer to the extracted element.
Returns
the stream s.

This operator actually does not copy out the data, but returns a pointer into the message buffer itself. This means that the data is only valid as long as there is no new data inserted into the stream.

See Msg_ptr.

Definition at line 1126 of file ipc_stream.

◆ operator>>() [5/6]

template<typename T >
L4::Ipc::Istream& operator>> ( L4::Ipc::Istream s,
L4::Ipc::Internal::Buf_cp_in< T > const &  v 
)
inline

Extract an array of T elements from the stream s.

Parameters
sThe stream to extract from.
[out]vBuffer description to copy the array to (Ipc::Buf_cp_out()).
Returns
The stream s.

This operator does a copy out of the data into the given buffer.

See Ipc::Buf_in, Ipc::Buf_cp_in, and Ipc::Buf_cp_out.

Definition at line 1147 of file ipc_stream.

◆ operator>>() [6/6]

template<typename T >
L4::Ipc::Istream& operator>> ( L4::Ipc::Istream s,
L4::Ipc::Str_cp_in< T > const &  v 
)
inline

Extract a zero-terminated string from the stream.

Parameters
sThe stream to extract from.
[out]vBuffer description to copy the array to (Ipc::Str_cp_out()).
Returns
the stream s.

This operator does a copy out of the data into the given buffer.

Definition at line 1168 of file ipc_stream.