2 * (c) 2012-2013 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
3 * Alexander Warg <warg@os.inf.tu-dresden.de>
4 * economic rights: Technische Universität Dresden (Germany)
6 * This file is part of TUD:OS and distributed under the terms of the
7 * GNU General Public License 2.
8 * Please see the COPYING-GPL-2 file for details.
15 #include <l4/re/util/icu_svr>
16 #include <l4/re/util/vcon_svr>
17 #include <l4/re/util/object_registry>
20 : public L4::Epiface_t<Vcon_client, L4::Vcon, Server_object>,
21 public L4Re::Util::Icu_cap_array_svr<Vcon_client>,
22 public L4Re::Util::Vcon_svr<Vcon_client>,
26 typedef L4Re::Util::Icu_cap_array_svr<Vcon_client> Icu_svr;
27 typedef L4Re::Util::Vcon_svr<Vcon_client> My_vcon_svr;
29 Vcon_client(std::string const &name, int color, size_t bufsz, Key key,
30 L4Re::Util::Object_registry *)
32 Client(name, color, 512, bufsz < 512 ? _dfl_obufsz : bufsz, key)
35 void vcon_write(const char *buffer, unsigned size) throw();
36 unsigned vcon_read(char *buffer, unsigned size) throw();
38 int vcon_set_attr(l4_vcon_attr_t const *a) throw();
39 int vcon_get_attr(l4_vcon_attr_t *attr) throw();
41 const l4_vcon_attr_t *attr() const { return &_attr; }
43 void trigger() const { _irq.trigger(); }
45 bool collected() { return Client::collected(); }
47 static void default_obuf_size(unsigned bufsz)
49 _dfl_obufsz = cxx::max(512U, cxx::min(16U << 20, bufsz));
53 enum { Default_obuf_size = 40960 };
54 static unsigned _dfl_obufsz;