Skip to main content
Ctrl+K
Wattson  documentation - Home
  • Wattson Setup
  • First Steps with Wattson
  • High-Level-Documentation
  • API Documentation
  • Wattson Home
  • Wattson GitHub
  • Wattson Setup
  • First Steps with Wattson
  • High-Level-Documentation
  • API Documentation
  • Wattson Home
  • Wattson GitHub

Contents:

  • Wattson Setup
  • First Steps with Wattson
  • High-Level-Documentation
  • API Documentation
    • analysis
    • apps
    • cosimulation
      • cli
      • control
      • exceptions
      • models
      • remote
      • simulators
        • network
          • components
            • interface
            • network_link_model
            • patches
            • remote
            • wattson_network_docker_host
            • wattson_network_docker_router
            • wattson_network_entity
            • wattson_network_host
            • wattson_network_interface
            • wattson_network_ipmininet_router
            • wattson_network_link
              • WattsonNetworkLink
                • WattsonNetworkLink
                  • WattsonNetworkLink.__init__()
                  • WattsonNetworkLink.add_on_link_property_change_callback()
                  • WattsonNetworkLink.down()
                  • WattsonNetworkLink.get_other_interface()
                  • WattsonNetworkLink.to_remote_representation()
                  • WattsonNetworkLink.up()
            • wattson_network_nat
            • wattson_network_node
            • wattson_network_router
            • wattson_network_switch
            • wattson_network_virtual_machine_host
          • constants
          • emulators
          • messages
          • network_emulator
          • network_scenario_loader
          • remote_network_emulator
          • roles
          • wattson_segment
        • physical
        • secondary
        • simulator
    • datapoints
    • exceptions
    • hosts
    • iec104
    • iec61850
    • lib
    • networking
    • powergrid
    • services
    • time
    • util
  • API Documentation
  • wattson_network_link
  • WattsonNetworkLink

WattsonNetworkLink#

class wattson.cosimulation.simulators.network.components.wattson_network_link.WattsonNetworkLink(*, id: str, system_name: Optional[str] = None, display_name: Optional[str] = None, network_emulator: Optional[ForwardRef('NetworkEmulator')] = None, emulation_instance: Optional[Any] = None, segment: str = 'main', config: dict = <factory>, _is_started: bool = False, logger: Optional[logging.Logger] = None, interface_a: Optional[ForwardRef('WattsonNetworkInterface')] = None, interface_b: Optional[ForwardRef('WattsonNetworkInterface')] = None, link_model: wattson.cosimulation.simulators.network.components.network_link_model.NetworkLinkModel = <factory>, link_type: str = 'digital')#

Bases: WattsonNetworkEntity, NetworkLink

Methods

__init__

add_on_link_property_change_callback

Sets a callback to be called whenever a link model property is updated.

down

Set the link state to "down", i.e., disabling the link

get_interface_a

get_interface_b

get_link_model

get_link_state

get_other_interface

Given a valid interface, returns the other interface connected forming this link.

get_prefix

is_up

prefix_id

to_remote_representation

Creates a dictionary for synchronization with a RemoteNetworkEntity.

up

Set the link state to "up", i.e., enabling the link

Attributes

class_id

entity_id

interface_a

interface_b

link_id

link_type

link_model

config

id

__init__(*, id: str, system_name: str | None = None, display_name: str | None = None, network_emulator: NetworkEmulator | None = None, emulation_instance: ~typing.Any | None = None, segment: str = 'main', config: dict = <factory>, _is_started: bool = False, logger: ~logging.Logger | None = None, interface_a: WattsonNetworkInterface | None = None, interface_b: WattsonNetworkInterface | None = None, link_model: ~wattson.cosimulation.simulators.network.components.network_link_model.NetworkLinkModel = <factory>, link_type: str = 'digital') → None#
add_on_link_property_change_callback(callback: Callable[[WattsonNetworkLink, str, Any], None])#

Sets a callback to be called whenever a link model property is updated.

Parameters:

callback (Callable[['WattsonNetworkLink', str, Any], None]) – The callback to call. Takes the link instance, the changed property name and the new value

down()#

Set the link state to “down”, i.e., disabling the link

get_other_interface(interface: WattsonNetworkInterface) → WattsonNetworkInterface#

Given a valid interface, returns the other interface connected forming this link. In case the given interface is not part of this link, interface A is returned.

Parameters:

interface ('NetworkInterface') – One interface that forms the link

Returns:

The other interface forming the link.

Return type:

‘NetworkInterface’

to_remote_representation(force_state_synchronization: bool = True) → RemoteNetworkEntityRepresentation#

Creates a dictionary for synchronization with a RemoteNetworkEntity.

Parameters:

force_state_synchronization (bool, optional) – Whether to force a synchronization of the internal state with the actual state (Default value = True)

Returns:

A dictionary representation of this WattsonNetworkEntity for synchronization with a RemoteNetworkEntity.

Return type:

RemoteNetworkEntityRepresentation

up()#

Set the link state to “up”, i.e., enabling the link

previous

wattson_network_link

next

wattson_network_nat

© Copyright 2025, Lennart Bader.