VirtualBox Main API

Public Attributes | List of all members
ISerialPort Interface Reference

The ISerialPort interface represents the virtual serial port device. More...

Inheritance diagram for ISerialPort:

## Public Attributes
readonly attribute unsigned long | slot
| Slot number this serial port is plugged into.
attribute boolean | enabled
| Flag whether the serial port is enabled.
attribute unsigned long | IOBase
| Base I/O address of the serial port.
attribute unsigned long | IRQ
| IRQ number of the serial port.
attribute PortMode | hostMode
| How is this port connected to the host.
attribute boolean | server
| Flag whether this serial port acts as a server (creates a new pipe on the host) or as a client (uses the existing pipe).
attribute wstring | path
| Path to the serial port's pipe on the host when ISerialPort::hostMode is PortMode_HostPipe, the host serial device name when ISerialPort::hostMode is PortMode_HostDevice or the TCP port (server) or hostname:port (client) when ISerialPort::hostMode is PortMode_TCP.
attribute UartType | uartType
| Selects the emulated UART implementation.

## Detailed Description

The ISerialPort interface represents the virtual serial port device.

The virtual serial port device acts like an ordinary serial port inside the virtual machine. This device communicates to the real serial port hardware in one of two modes: host pipe or host device.

In host pipe mode, the path attribute specifies the path to the pipe on the host computer that represents a serial port. The server attribute determines if this pipe is created by the virtual machine process at machine startup or it must already exist before starting machine execution.

In host device mode, the path attribute specifies the name of the serial port device on the host computer.

There is also a third communication mode: the disconnected mode. In this mode, the guest OS running inside the virtual machine will be able to detect the serial port, but all port write operations will be discarded and all port read operations will return no data.

See also
  IMachine::getSerialPort

Interface ID:
  `{5587D0F6-A227-4F23-8278-2F675EEA1BB2}`

## Member Data Documentation

## ◆ slot

readonly attribute unsigned long ISerialPort::slot

Slot number this serial port is plugged into.

Corresponds to the value you pass to IMachine::getSerialPort to obtain this instance.

## ◆ enabled

attribute boolean ISerialPort::enabled

Flag whether the serial port is enabled.

If disabled, the serial port will not be reported to the guest OS.

## ◆ IOBase

attribute unsigned long ISerialPort::IOBase

Base I/O address of the serial port.

## ◆ IRQ

attribute unsigned long ISerialPort::IRQ

IRQ number of the serial port.

## ◆ hostMode

attribute PortMode ISerialPort::hostMode

How is this port connected to the host.

Note
  Changing this attribute may fail if the conditions for path are not met.

## ◆ server

attribute boolean ISerialPort::server

Flag whether this serial port acts as a server (creates a new pipe on the host) or as a client (uses the existing pipe).

This attribute is used only when hostMode is PortMode_HostPipe or PortMode_TCP.

## ◆ path

attribute wstring ISerialPort::path

Path to the serial port's pipe on the host when ISerialPort::hostMode is PortMode_HostPipe, the host serial device name when ISerialPort::hostMode is PortMode_HostDevice or the TCP port (server) or hostname:port (client) when ISerialPort::hostMode is PortMode_TCP.

For those cases, setting a `null` or empty string as the attribute's value is an error. Otherwise, the value of this property is ignored.

## ◆ uartType

attribute UartType ISerialPort::uartType

Selects the emulated UART implementation.