L4Re - L4 Runtime Environment
L4::Vcon Class Reference

C++ L4 Vcon interface. More...

+ Inheritance diagram for L4::Vcon:
+ Collaboration diagram for L4::Vcon:

Public Member Functions

l4_msgtag_t send (char const *buf, unsigned size, l4_utcb_t *utcb=l4_utcb()) const throw ()
 Send data to this virtual console. More...
 
long write (char const *buf, unsigned size, l4_utcb_t *utcb=l4_utcb()) const throw ()
 Write data to this virtual console. More...
 
int read (char *buf, unsigned size, l4_utcb_t *utcb=l4_utcb()) const throw ()
 Read data from this virtual console. More...
 
int read_with_flags (char *buf, unsigned size, l4_utcb_t *utcb=l4_utcb()) const throw ()
 Read data from this virtual console which also returns flags. More...
 
l4_msgtag_t set_attr (l4_vcon_attr_t const *attr, l4_utcb_t *utcb=l4_utcb()) const throw ()
 Set the attributes of this virtual console. More...
 
l4_msgtag_t get_attr (l4_vcon_attr_t *attr, l4_utcb_t *utcb=l4_utcb()) const throw ()
 Get attributes of this virtual console. More...
 
- Public Member Functions inherited from L4::Icu
l4_msgtag_t bind (unsigned irqnum, L4::Cap< Triggerable > irq, l4_utcb_t *utcb=l4_utcb()) throw ()
 Bind an interrupt line of an interrupt controller to an interrupt object. More...
 
l4_msgtag_t unbind (unsigned irqnum, L4::Cap< Triggerable > irq, l4_utcb_t *utcb=l4_utcb()) throw ()
 Remove binding of an interrupt line from the interrupt controller object. More...
 
l4_msgtag_t info (l4_icu_info_t *info, l4_utcb_t *utcb=l4_utcb()) throw ()
 Get information about the capabilities of the ICU. More...
 
l4_msgtag_t msi_info (l4_umword_t irqnum, l4_uint64_t source, l4_icu_msi_info_t *msi_info)
 Get MSI info about IRQ. More...
 
l4_msgtag_t mask (unsigned irqnum, l4_umword_t *label=0, l4_timeout_t to=L4_IPC_NEVER, l4_utcb_t *utcb=l4_utcb()) throw ()
 Mask an IRQ line. More...
 
l4_msgtag_t set_mode (unsigned irqnum, l4_umword_t mode, l4_utcb_t *utcb=l4_utcb()) throw ()
 Set interrupt mode. More...
 
- Public Member Functions inherited from L4::Irq_eoi
l4_msgtag_t unmask (unsigned irqnum, l4_umword_t *label=0, l4_timeout_t to=L4_IPC_NEVER, l4_utcb_t *utcb=l4_utcb()) throw ()
 Acknowledge the given interrupt line. More...
 

Additional Inherited Members

- Protected Types inherited from L4::Kobject_t< Vcon, Icu, L4_PROTO_LOG >
typedef Vcon Class
 The target interface type (inheriting from Kobject_t)
 
typedef Typeid::Iface< PROTO, Vcon__Iface
 The interface description for the derived class.
 
typedef Typeid::Merge_list< Typeid::Iface_list< __Iface >, typename Icu ::__Iface_list > __Iface_list
 The list of all RPC interfaces provided directly or through inheritance.
 
- Protected Types inherited from L4::Kobject_t< Icu, Irq_eoi, L4_PROTO_IRQ, Type_info::Demand_t< 1 > >
typedef Icu Class
 The target interface type (inheriting from Kobject_t)
 
typedef Typeid::Iface< PROTO, Icu__Iface
 The interface description for the derived class.
 
typedef Typeid::Merge_list< Typeid::Iface_list< __Iface >, typename Irq_eoi ::__Iface_list > __Iface_list
 The list of all RPC interfaces provided directly or through inheritance.
 
- Protected Member Functions inherited from L4::Kobject_t< Vcon, Icu, L4_PROTO_LOG >
L4::Cap< Classc () const
 Get the capability to ourselves.
 
- Protected Member Functions inherited from L4::Kobject_t< Icu, Irq_eoi, L4_PROTO_IRQ, Type_info::Demand_t< 1 > >
L4::Cap< Classc () const
 Get the capability to ourselves.
 
- Static Protected Member Functions inherited from L4::Kobject_t< Vcon, Icu, L4_PROTO_LOG >
static void __check_protocols__ ()
 Helper to check for protocol conflicts.
 
- Static Protected Member Functions inherited from L4::Kobject_t< Icu, Irq_eoi, L4_PROTO_IRQ, Type_info::Demand_t< 1 > >
static void __check_protocols__ ()
 Helper to check for protocol conflicts.
 

Detailed Description

C++ L4 Vcon interface.

L4::Vcon is a virtual console for simple character-based input and output. The interrupt for read events is provided by the virtual key interrupt.

Include File
#include <l4/sys/vcon>

See the Virtual Console for the C interface.

Definition at line 43 of file vcon.

Member Function Documentation

◆ get_attr()

l4_msgtag_t L4::Vcon::get_attr ( l4_vcon_attr_t attr,
l4_utcb_t utcb = l4_utcb() 
) const
throw (
)
inline

Get attributes of this virtual console.

Parameters
[out]attrAttribute structure. Contains the attributes after a successfull call of this function.
utcbUTCB pointer of the calling thread.
Returns
Syscall return tag.

Definition at line 145 of file vcon.

◆ read()

int L4::Vcon::read ( char *  buf,
unsigned  size,
l4_utcb_t utcb = l4_utcb() 
) const
throw (
)
inline

Read data from this virtual console.

Parameters
[out]bufPointer to data buffer.
sizeSize of the data buffer in bytes.
utcbUTCB pointer of the calling thread.
Return values
<0Error code.
>sizeMore bytes to read, size bytes are in the buffer buf.
<=sizeNumber of bytes read.
Note
Size must not exceed L4_VCON_READ_SIZE.

Definition at line 94 of file vcon.

◆ read_with_flags()

int L4::Vcon::read_with_flags ( char *  buf,
unsigned  size,
l4_utcb_t utcb = l4_utcb() 
) const
throw (
)
inline

Read data from this virtual console which also returns flags.

Parameters
[out]bufPointer to data buffer.
sizeSize of the data buffer in bytes.
utcbUTCB pointer of the calling thread.
Return values
<0Error code.
>sizeMore bytes to read, size bytes are in the buffer buf.
<=sizeNumber of bytes read.

If this function returns a positive value the caller can check the L4_VCON_READ_STAT_BREAK flag bit for a break condition. The bytes read can be obtained by masking the return value with L4_VCON_READ_SIZE_MASK.

If a break condition is signaled, it is always the first event in the transmitted content, i.e. all characters supplied by this read call follow the break condition.

Note
Size must not exceed L4_VCON_READ_SIZE.

Definition at line 119 of file vcon.

◆ send()

l4_msgtag_t L4::Vcon::send ( char const *  buf,
unsigned  size,
l4_utcb_t utcb = l4_utcb() 
) const
throw (
)
inline

Send data to this virtual console.

Parameters
bufPointer to the data buffer.
sizeSize of the data buffer in bytes.
utcbUTBC pointer of the calling thread.
Returns
Syscall return tag
Note
Size must not exceed L4_VCON_WRITE_SIZE, a proper value of the size parameter is NOT checked. Also, this function is a send only operation, this means there is no return value except for a failed send operation. Use l4_ipc_error() to check for send errors, do not use l4_error(), as l4_error() will always return an error.

Definition at line 63 of file vcon.

◆ set_attr()

l4_msgtag_t L4::Vcon::set_attr ( l4_vcon_attr_t const *  attr,
l4_utcb_t utcb = l4_utcb() 
) const
throw (
)
inline

Set the attributes of this virtual console.

Parameters
attrAttribute structure with the attributes for the virtual console.
utcbUTCB pointer of the calling thread.
Returns
Syscall return tag.

Definition at line 132 of file vcon.

◆ write()

long L4::Vcon::write ( char const *  buf,
unsigned  size,
l4_utcb_t utcb = l4_utcb() 
) const
throw (
)
inline

Write data to this virtual console.

Parameters
bufPointer to the data buffer.
sizeSize of the data buffer in bytes.
utcbUTCB pointer of the calling thread.
Return values
<0Error.
>=0Number of bytes written to the virtual console.

Definition at line 77 of file vcon.


The documentation for this class was generated from the following file: