L4Re Operating System Framework
Interface and Usage Documentation
|
C++ L4 Vcon interface, see Virtual Console for the C interface. More...
#include <vcon>
Public Member Functions | |
l4_msgtag_t | send (char const *buf, unsigned size, l4_utcb_t *utcb=l4_utcb()) const noexcept |
Send data to this virtual console. | |
long | write (char const *buf, unsigned size, l4_utcb_t *utcb=l4_utcb()) const noexcept |
Write data to this virtual console. | |
int | read (char *buf, unsigned size, l4_utcb_t *utcb=l4_utcb()) const noexcept |
Read data from this virtual console. | |
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. | |
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. | |
l4_msgtag_t | get_attr (l4_vcon_attr_t *attr, l4_utcb_t *utcb=l4_utcb()) const noexcept |
Get attributes of this virtual console. | |
Public Member Functions inherited from L4::Icu | |
l4_msgtag_t | bind (unsigned irqnum, L4::Cap< Triggerable > irq, l4_utcb_t *utcb=l4_utcb()) noexcept |
Bind an interrupt line of an interrupt controller to an interrupt object. | |
l4_msgtag_t | unbind (unsigned irqnum, L4::Cap< Triggerable > irq, l4_utcb_t *utcb=l4_utcb()) noexcept |
Remove binding of an interrupt line from the interrupt controller object. | |
l4_msgtag_t | info (l4_icu_info_t *info, l4_utcb_t *utcb=l4_utcb()) noexcept |
Get information about the ICU features. | |
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. | |
l4_msgtag_t | mask (unsigned irqnum, l4_umword_t *label=0, l4_timeout_t to=L4_IPC_NEVER, l4_utcb_t *utcb=l4_utcb()) noexcept |
Mask an IRQ line. | |
l4_msgtag_t | set_mode (unsigned irqnum, l4_umword_t mode, l4_utcb_t *utcb=l4_utcb()) noexcept |
Set interrupt mode. | |
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()) noexcept |
Unmask the given interrupt line. | |
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 Base::__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 Base::__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< Class > | c () const noexcept |
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< Class > | c () const noexcept |
Get the capability to ourselves. | |
Static Protected Member Functions inherited from L4::Kobject_t< Vcon, Icu, L4_PROTO_LOG > | |
static void | __check_protocols__ () noexcept |
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__ () noexcept |
Helper to check for protocol conflicts. | |
C++ L4 Vcon interface, see Virtual Console for the C 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.
The Vcon interface inherits from L4::Icu and L4::Irq_eoi for managing the virtual key interrupt which, in contrast to hardware IRQs, implements a limited functionality:
A server implementing the virtual console protocol has a queue for input events. When the first input event is added to the empty queue, the virtual key interrupt is triggered. Further events are added to the queue without generating further interrupts. The queue is emptied when a client reads all queued input events.
See the Virtual Console for the C interface.
|
inlinenoexcept |
Get attributes of this
virtual console.
[out] | attr | Attribute structure. Contains the attributes after a successful call of this function. |
utcb | UTCB to be used for this operation, shall be the UTCB of the calling thread. Defaults to l4_utcb. |
Definition at line 162 of file vcon.
References l4_vcon_get_attr_u().
Read data from this
virtual console.
[out] | buf | Pointer to data buffer. |
size | Size of the data buffer in bytes. | |
utcb | UTCB to be used for this operation, shall be the UTCB of the calling thread. Defaults to l4_utcb. |
-L4_EPERM | The Vcon instance requires the L4_CAP_FPAGE_W right on the capability used to invoke this operation and this right is not present. |
>size | More bytes to read, size bytes are in the buffer buf . |
<=size | Number of bytes read. |
Definition at line 109 of file vcon.
References l4_vcon_read_u().
|
inlinenoexcept |
Read data from this
virtual console which also returns flags.
[out] | buf | Pointer to data buffer. |
size | Size of the data buffer in bytes. | |
utcb | UTCB to be used for this operation, shall be the UTCB of the calling thread. Defaults to l4_utcb. |
-L4_EPERM | The Vcon instance requires the L4_CAP_FPAGE_W right on the capability used to invoke this operation and this right is not present. |
>size | More bytes to read, size bytes are in the buffer buf . |
<=size | Number 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.
|
inlinenoexcept |
Send data to this
virtual console.
buf | Pointer to the data buffer. |
size | Size of the data buffer in bytes. |
utcb | UTCB to be used for this operation, shall be the UTCB of the calling thread. Defaults to l4_utcb. |
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 76 of file vcon.
References l4_vcon_send_u().
|
inlinenoexcept |
Set the attributes of this
virtual console.
attr | Attribute structure with the attributes for the virtual console. |
utcb | UTCB to be used for this operation, shall be the UTCB of the calling thread. Defaults to l4_utcb. |
Definition at line 149 of file vcon.
References l4_vcon_set_attr_u().
|
inlinenoexcept |
Write data to this
virtual console.
buf | Pointer to the data buffer. |
size | Size of the data buffer in bytes. |
utcb | UTCB to be used for this operation, shall be the UTCB of the calling thread. Defaults to l4_utcb. |
<0 | Error. |
>=0 | Number of bytes written to the virtual console. |
Definition at line 90 of file vcon.
References l4_vcon_write_u().