L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
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
31namespace L4 {
32
56class Vcon :
57 public Kobject_t<Vcon, Icu, L4_PROTO_LOG>
58{
59public:
76 send(char const *buf, unsigned size, l4_utcb_t *utcb = l4_utcb()) const noexcept
77 { return l4_vcon_send_u(cap(), buf, size, utcb); }
78
89 long
90 write(char const *buf, unsigned size, l4_utcb_t *utcb = l4_utcb()) const noexcept
91 { return l4_vcon_write_u(cap(), buf, size, utcb); }
92
108 int
109 read(char *buf, unsigned size, l4_utcb_t *utcb = l4_utcb()) const noexcept
110 { return l4_vcon_read_u(cap(), buf, size, utcb); }
111
135 int
136 read_with_flags(char *buf, unsigned size, l4_utcb_t *utcb = l4_utcb()) const noexcept
137 { return l4_vcon_read_with_flags_u(cap(), buf, size, utcb); }
138
149 set_attr(l4_vcon_attr_t const *attr, l4_utcb_t *utcb = l4_utcb()) const noexcept
150 { return l4_vcon_set_attr_u(cap(), attr, utcb); }
151
162 get_attr(l4_vcon_attr_t *attr, l4_utcb_t *utcb = l4_utcb()) const noexcept
163 { return l4_vcon_get_attr_u(cap(), attr, utcb); }
164
165 typedef L4::Typeid::Raw_ipc<Vcon> Rpcs;
166};
167
168}
L4::Cap related definitions.
Helper class to create an L4Re interface class that is derived from a single base class.
Definition __typeinfo.h:761
C++ L4 Vcon interface, see Virtual Console for the C interface.
Definition vcon:58
l4_msgtag_t get_attr(l4_vcon_attr_t *attr, l4_utcb_t *utcb=l4_utcb()) const noexcept
Get attributes of this virtual console.
Definition vcon:162
int read_with_flags(char *buf, unsigned size, l4_utcb_t *utcb=l4_utcb()) const noexcept
Read data from this virtual console which also returns flags.
Definition vcon:136
long write(char const *buf, unsigned size, l4_utcb_t *utcb=l4_utcb()) const noexcept
Write data to this virtual console.
Definition vcon:90
l4_msgtag_t set_attr(l4_vcon_attr_t const *attr, l4_utcb_t *utcb=l4_utcb()) const noexcept
Set the attributes of this virtual console.
Definition vcon:149
int read(char *buf, unsigned size, l4_utcb_t *utcb=l4_utcb()) const noexcept
Read data from this virtual console.
Definition vcon:109
l4_msgtag_t send(char const *buf, unsigned size, l4_utcb_t *utcb=l4_utcb()) const noexcept
Send data to this virtual console.
Definition vcon:76
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
Definition utcb.h:67
l4_utcb_t * l4_utcb(void) L4_NOTHROW L4_PURE
Get the UTCB address.
Definition utcb.h:340
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:311
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:406
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:330
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:390
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:426
Interrupt controller.
L4 low-level kernel interface.
Definition io_regblock.h:19
RPCs list for passing raw incoming IPC to the server object.
Definition __typeinfo.h:424
Message tag data structure.
Definition types.h:164
Vcon attribute structure.
Definition vcon.h:197
Virtual console interface.