L4Re - L4 Runtime Environment
vcon
Go to the documentation of this file.
1 // vi:set ft=cpp: -*- Mode: C++ -*-
6 /*
7  * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
8  * Alexander Warg <warg@os.inf.tu-dresden.de>,
9  * Torsten Frenzel <frenzel@os.inf.tu-dresden.de>
10  * economic rights: Technische Universität Dresden (Germany)
11  *
12  * This file is part of TUD:OS and distributed under the terms of the
13  * GNU General Public License 2.
14  * Please see the COPYING-GPL-2 file for details.
15  *
16  * As a special exception, you may use this file as part of a free software
17  * library without restriction. Specifically, if other files instantiate
18  * templates or use macros or inline functions from this file, or you compile
19  * this file and link it with other files to produce an executable, this
20  * file does not by itself cause the resulting executable to be covered by
21  * the GNU General Public License. This exception does not however
22  * invalidate any other reasons why the executable file might be covered by
23  * the GNU General Public License.
24  */
25 #pragma once
26 
27 #include <l4/sys/icu>
28 #include <l4/sys/vcon.h>
29 #include <l4/sys/capability>
30 
31 namespace L4 {
32 
43 class Vcon :
44  public Kobject_t<Vcon, Icu, L4_PROTO_LOG>
45 {
46 public:
63  send(char const *buf, unsigned size, l4_utcb_t *utcb = l4_utcb()) const throw()
64  { return l4_vcon_send_u(cap(), buf, size, utcb); }
65 
76  long
77  write(char const *buf, unsigned size, l4_utcb_t *utcb = l4_utcb()) const throw()
78  { return l4_vcon_write_u(cap(), buf, size, utcb); }
79 
93  int
94  read(char *buf, unsigned size, l4_utcb_t *utcb = l4_utcb()) const throw()
95  { return l4_vcon_read_u(cap(), buf, size, utcb); }
96 
118  int
119  read_with_flags(char *buf, unsigned size, l4_utcb_t *utcb = l4_utcb()) const throw()
120  { return l4_vcon_read_with_flags_u(cap(), buf, size, utcb); }
121 
132  set_attr(l4_vcon_attr_t const *attr, l4_utcb_t *utcb = l4_utcb()) const throw()
133  { return l4_vcon_set_attr_u(cap(), attr, utcb); }
134 
145  get_attr(l4_vcon_attr_t *attr, l4_utcb_t *utcb = l4_utcb()) const throw()
146  { return l4_vcon_get_attr_u(cap(), attr, utcb); }
147 
149 };
150 
151 }
int read(char *buf, unsigned size, l4_utcb_t *utcb=l4_utcb()) const
Read data from this virtual console.
Definition: vcon:94
long l4_vcon_write_u(l4_cap_idx_t vcon, char const *buf, unsigned size, l4_utcb_t *utcb) L4_NOTHROW
Write data to this virtual console.
Definition: vcon.h:295
l4_msgtag_t l4_vcon_set_attr_u(l4_cap_idx_t vcon, l4_vcon_attr_t const *attr, l4_utcb_t *utcb) L4_NOTHROW
Set the attributes of this virtual console.
Definition: vcon.h:371
l4_msgtag_t send(char const *buf, unsigned size, l4_utcb_t *utcb=l4_utcb()) const
Send data to this virtual console.
Definition: vcon:63
Vcon attribute structure.
Definition: vcon.h:178
L4 low-level kernel interface.
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
Definition: utcb.h:67
RPCs list for passing raw incoming IPC to the server object.
Definition: __typeinfo.h:422
Interrupt controller.
L4::Cap related definitions.
int read_with_flags(char *buf, unsigned size, l4_utcb_t *utcb=l4_utcb()) const
Read data from this virtual console which also returns flags.
Definition: vcon:119
List of RPCs typically used for kernel interfaces.
Definition: __typeinfo.h:475
l4_msgtag_t l4_vcon_send_u(l4_cap_idx_t vcon, char const *buf, unsigned size, l4_utcb_t *utcb) L4_NOTHROW
Send data to this virtual console.
Definition: vcon.h:275
l4_utcb_t * l4_utcb(void) L4_NOTHROW L4_PURE
Get the UTCB address.
Definition: utcb.h:340
l4_msgtag_t get_attr(l4_vcon_attr_t *attr, l4_utcb_t *utcb=l4_utcb()) const
Get attributes of this virtual console.
Definition: vcon:145
l4_cap_idx_t cap() const
Return capability selector.
Definition: kobject:79
long write(char const *buf, unsigned size, l4_utcb_t *utcb=l4_utcb()) const
Write data to this virtual console.
Definition: vcon:77
l4_msgtag_t l4_vcon_get_attr_u(l4_cap_idx_t vcon, l4_vcon_attr_t *attr, l4_utcb_t *utcb) L4_NOTHROW
Get attributes of this virtual console.
Definition: vcon.h:391
Helper class to create an L4Re interface class that is derived from a single base class...
Definition: __typeinfo.h:759
C++ L4 Vcon interface.
Definition: vcon:43
Virtual console interface.
Message tag data structure.
Definition: types.h:159
int l4_vcon_read_u(l4_cap_idx_t vcon, char *buf, unsigned size, l4_utcb_t *utcb) L4_NOTHROW
Read data from this virtual console.
Definition: vcon.h:355
l4_msgtag_t set_attr(l4_vcon_attr_t const *attr, l4_utcb_t *utcb=l4_utcb()) const
Set the attributes of this virtual console.
Definition: vcon:132