L4Re Operating System Framework – Interface and Usage Documentation
Loading...
Searching...
No Matches
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

namespace  L4
 L4 low-level kernel interface.
 
namespace  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.
 
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.
 
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.
 
template<typename T >
Msg_ptr< T > L4::Ipc::msg_ptr (T *&p)
 Create an Msg_ptr to adjust the given pointer.
 
template<typename T >
Internal::Buf_in< T > L4::Ipc::buf_in (T *&v, unsigned long &size)
 Return a pointer to stream array data.
 
L4::Ipc::Istreamoperator>> (L4::Ipc::Istream &s, bool &v)
 Extract one element of type T from the stream s.
 
L4::Ipc::Istreamoperator>> (L4::Ipc::Istream &s, l4_msgtag_t &v)
 Extract the L4 message tag from the stream s.
 
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.
 
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.
 
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.
 
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.
 
L4::Ipc::Ostreamoperator<< (L4::Ipc::Ostream &s, bool v)
 Insert an element to type T into the stream s.
 
L4::Ipc::Ostreamoperator<< (L4::Ipc::Ostream &s, l4_msgtag_t const &v)
 Insert the L4 message tag into the stream s.
 
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.
 
L4::Ipc::Ostreamoperator<< (L4::Ipc::Ostream &s, char const *v)
 Insert a zero terminated character string into the stream s.
 
template<typename T >
L4::Ipc::read (Istream &s)
 Read a value out of a stream.
 

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

References L4::Ipc::Ostream::put().

+ Here is the call graph for this function:

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

References L4::Ipc::Ostream::put().

+ Here is the call graph for this function:

◆ 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 1253 of file ipc_stream.

References L4::Ipc::Ostream::put().

+ Here is the call graph for this function:

◆ operator<<() [4/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 1237 of file ipc_stream.

References L4::Ipc::Ostream::tag().

+ Here is the call graph for this function:

◆ 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 1049 of file ipc_stream.

References L4::Ipc::Istream::get().

+ Here is the call graph for this function:

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

References L4::Ipc::Istream::get(), and cxx::min().

+ Here is the call graph for this function:

◆ 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 1108 of file ipc_stream.

References L4::Ipc::Istream::get(), and L4::Ipc::Istream::has_more().

+ Here is the call graph for this function:

◆ 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 1135 of file ipc_stream.

References L4::Ipc::Istream::get().

+ Here is the call graph for this function:

◆ operator>>() [5/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 1177 of file ipc_stream.

References L4::Ipc::Istream::get(), and cxx::min().

+ Here is the call graph for this function:

◆ operator>>() [6/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 1083 of file ipc_stream.

References L4::Ipc::Istream::tag().

+ Here is the call graph for this function: