A link consists of two Simics configuration classes: link and endpoint. In a running simulation, there will exist one link object per link, and one endpoint object per device connected to the link.
The link and endpoint classes use the link library to handle many of the details of link operation. The link library keeps its state in opaque data structures attached to the link and endpoint objects. Some of this information can be queried via the link library API.
When devices connect to the link, they really contact a freshly created endpoint object, usually provided by the link component. Any interaction between the device and the link goes through that endpoint object.
When running in a distributed simulation, a link is represented by an identically named instance in each process of the simulation.
Link objects may have configuration parameters, which are represented as Simics attributes in the link class.
These parameters should only be changed when the simulation is not running, to avoid indeterminism.
In a distributed setup, configuration parameters should also be shared with the other instances of the same link: the link library provides the SIMLINK_config_update_value() and SIMLINK_config_remove_value() functions for that purpose.
For example, the goal_latency of the link is implemented as a global configuration parameter.
More information is available in the Link Library API reference.
Endpoint objects may contain configuration parameters, as well as simulation state that can be changed at runtime, since they are only involved with one device on the link.
For example, the ethernet_switch implementation keeps a translation table from MAC addresses to endpoint IDs in each endpoint on the link, allowing them to be updated as endpoints learn about the connected devices.