This is a preview version of the DisplayLink DL-7450 Software Development Kit Documentation. The functionality that is described and made available in this version is subject to addition, removal or change without warning.

class DockInfo - current information about the dock

The DockInfo class gives current information about the DL-7450.

class dock.DockInfo

Construct a DockInfo object.

dock_id() str

Obtain the unique identifier of this dock. This identifier could be used for registering the dock as an IoT device with a service provider. For example:

from dock import DockInfo
info = DockInfo()
dock_id = info.dock_id()
monitors() list[Monitor]

Obtain the current monitors connected to the DL-7450. The return value is a list of monitor.Monitor. There is an entry per output, the entry containing an invalid monitor if there is no monitor connected to that output. For example:

from dock import DockInfo
from splashscreen import Splashscreen

screen = Splashscreen()
info = DockInfo()
monitors = info.monitors()

for output, monitor in enumerate(monitors):
    if monitor.valid():
        screen.add_text_box(f"Output {output}: {monitor.name()}")
    else:
        screen.add_text_box(f"Output {output}: no monitor")
host_status() int

Determine whether a host laptop or PC is connected to the DL-7450. Returns an integer which can be any of the values below.

HOST_NOT_CONNECTED

No host is connected to the dock.

HOST_CONNECTED

A host is connected to the dock.

HOST_CONNECTION_SUSPENDED

A host is connected to the dock, but the connection has been suspended by the dock.

These values are read-only attributes, and can be accessed via either the class directly, or an object of the class.

from dock import DockInfo

assert DockInfo.HOST_NOT_CONNECTED == DockInfo().HOST_NOT_CONNECTED
assert DockInfo.HOST_CONNECTED == DockInfo().HOST_CONNECTED
assert DockInfo.HOST_CONNECTION_SUSPENDED == DockInfo().HOST_CONNECTION_SUSPENDED