Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

L4_msgdope Class Reference

L4 Message Dope. More...

#include <l4_types.h>

List of all members.

Public Types

enum  {
  Send_error = 0x10, Enot_existent = 0x10, Retimeout = 0x20, Setimeout = 0x30,
  Recanceled = 0x40, Secanceled = 0x50, Remapfailed = 0x60, Semapfailed = 0x70,
  Resndpfto = 0x80, Sesndpfto = 0x90, Rercvpfto = 0xA0, Sercvpfto = 0xB0,
  Reaborted = 0xC0, Seaborted = 0xD0, Remsgcut = 0xE0, Semsgcut = 0xF0
}
  Constants an bit masks for error codes. More...

Public Member Functions

 L4_msgdope (Mword raw=0)
 Create a message dope from the binary representation.
 L4_msgdope (Mword mwords, Mword strings)
 Create the specified message dope.
 L4_msgdope (Ipc_err e)
 Type conversion constructor Constructs an L4_msgdope from an error code.
Mword raw () const
 Get the binary representation of this message dope.
Mword raw_dope () const
 Get the binary representation with the error bits masked out.
Mword deceited () const
 Message was deceited?
Mword fpage_received () const
 Flexpage received?
void fpage_received (Mword f)
 Set/Clear the flex page received bit.
Mword redirected () const
 Message redirected?
Mword src_inside () const
 Source inside?
Mword snd_error () const
 Was there a send error?
Mword error () const
 Get the error code.
void error (Mword error)
 Set the error code.
Mword has_error () const
 Was there an error?
const char * str_error () const
 Return short word explaining the error.
Mword strings () const
 Get the number of indirect strings.
void strings (Mword s)
 Set the number of indirect strings.
Mword mwords () const
 Get the number of transfered message words.
void mwords (Mword w)
 Set the number of transfered message words.
Mword rcv_map_failed () const
 Error == Receive map failed?
Mword snd_map_failed () const
 Error == Send map failed?
void combine (L4_msgdope other)
 Combine two message dopes.
void combine (Ipc_err e)
 Combine a message dope with an IPC error code.

Private Types

enum  {
  Deceite_bit = 0, Fpage_bit = 1, Redirected_bit = 2, Src_inside_bit = 3,
  Snd_error_bit = 4, Error_code_shift = 5, Error_code_mask = 0x7L << Error_code_shift, Error_code_size = 3,
  Error_shift = 4, Error_mask = 0xfL << Error_shift, Error_size = 4, Strings_shift = Error_code_shift + Error_code_size,
  Strings_mask = 0x1fL << Strings_shift, Strings_size = 5, Mwords_shift = Strings_shift + Strings_size, Mwords_mask = 0x7ffffL << Mwords_shift,
  Mwords_size = 19, Dope_mask = Strings_mask | Mwords_mask
}

Private Attributes

Mword _raw


Detailed Description

L4 Message Dope.

A value of this type is returned as result code for any IPC operation.


Member Enumeration Documentation

anonymous enum
 

Constants an bit masks for error codes.

Enumeration values:
Send_error  If this bit is set a error occurred in the send phase.
Enot_existent  Receiver does not exist.
Retimeout  Receive timeout.
Setimeout  Send timeout.
Recanceled  Receive canceled.
Secanceled  Send canceled.
Remapfailed  Receive mapping failed.
Semapfailed  Send mapping failed.
Resndpfto  Receive snd-page-fault timeout.
Sesndpfto  Send snd-page-fault timeout.
Rercvpfto  Receive receive-page-fault timeout.
Sercvpfto  Send receive-page-fault timeout.
Reaborted  Receive aborted.
Seaborted  Send aborted.
Remsgcut  Receive message cut.
Semsgcut  Send message cut.

anonymous enum [private]
 

Enumeration values:
Deceite_bit 
Fpage_bit 
Redirected_bit 
Src_inside_bit 
Snd_error_bit 
Error_code_shift 
Error_code_mask 
Error_code_size 
Error_shift 
Error_mask 
Error_size 
Strings_shift 
Strings_mask 
Strings_size 
Mwords_shift 
Mwords_mask 
Mwords_size 
Dope_mask 


Constructor & Destructor Documentation

L4_msgdope::L4_msgdope Mword  raw = 0  )  [inline]
 

Create a message dope from the binary representation.

Parameters:
raw the binary representation of a message dope.

L4_msgdope::L4_msgdope Mword  mwords,
Mword  strings
[inline]
 

Create the specified message dope.

Parameters:
mwords the number of transfered message words.
strings the number of transferd indirect strings.

L4_msgdope::L4_msgdope Ipc_err  e  )  [inline]
 

Type conversion constructor Constructs an L4_msgdope from an error code.

Parameters:
e the error code


Member Function Documentation

void L4_msgdope::combine Ipc_err  e  )  [inline]
 

Combine a message dope with an IPC error code.

Parameters:
e the error code.

void L4_msgdope::combine L4_msgdope  other  )  [inline]
 

Combine two message dopes.

This method is for combining two message dopes, this means the binary representations of the dopes are or'd together.

Parameters:
other the other message dope to combine.

Mword L4_msgdope::deceited  )  const [inline]
 

Message was deceited?

Returns:
true if the message was deceited (the deceite bit is set).

void L4_msgdope::error Mword  error  )  [inline]
 

Set the error code.

Parameters:
error the error code to be set (see Error Codes).
See also:
error_code()

Mword L4_msgdope::error  )  const [inline]
 

Get the error code.

Returns:
The error code (see Error Codes).

void L4_msgdope::fpage_received Mword  f  )  [inline]
 

Set/Clear the flex page received bit.

Parameters:
f if true the bit is set or cleared else.

Mword L4_msgdope::fpage_received  )  const [inline]
 

Flexpage received?

Returns:
true if a flex page was received.

Mword L4_msgdope::has_error  )  const [inline]
 

Was there an error?

Returns:
true if there was any error.

void L4_msgdope::mwords Mword  w  )  [inline]
 

Set the number of transfered message words.

Parameters:
w the number of message words transfered.

Mword L4_msgdope::mwords  )  const [inline]
 

Get the number of transfered message words.

Returns:
the number of message words tranfered.

Mword L4_msgdope::raw  )  const [inline]
 

Get the binary representation of this message dope.

Returns:
The binary form of this message dope.

Mword L4_msgdope::raw_dope  )  const [inline]
 

Get the binary representation with the error bits masked out.

Mword L4_msgdope::rcv_map_failed  )  const [inline]
 

Error == Receive map failed?

Returns:
true if error is receive map failed.
See also:
Error Codes

Mword L4_msgdope::redirected  )  const [inline]
 

Message redirected?

Returns:
The state of the redirect bit.

Mword L4_msgdope::snd_error  )  const [inline]
 

Was there a send error?

Returns:
true if there was a send error.

Mword L4_msgdope::snd_map_failed  )  const [inline]
 

Error == Send map failed?

Returns:
true if error is send map failed.
See also:
Error Codes

Mword L4_msgdope::src_inside  )  const [inline]
 

Source inside?

Returns:
The state of the source-inside bit.

char const * L4_msgdope::str_error  )  const
 

Return short word explaining the error.

Returns:
pointer to static string

void L4_msgdope::strings Mword  s  )  [inline]
 

Set the number of indirect strings.

Parameters:
s the number of indirect strings.

Mword L4_msgdope::strings  )  const [inline]
 

Get the number of indirect strings.

Returns:
The number of indirect strings.


Member Data Documentation

Mword L4_msgdope::_raw [private]
 


The documentation for this class was generated from the following files:
Generated on Mon Sep 26 14:20:16 2005 for Fiasco by  doxygen 1.4.2