directconnection

package
v4.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2024 License: MIT Imports: 1 Imported by: 2

Documentation

Overview

Package directconnection provides directconnection

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

Builder can help building directconnection.

func MakeBuilder

func MakeBuilder() Builder

func (Builder) Build

func (b Builder) Build(name string) *Comp

func (Builder) WithEngine

func (b Builder) WithEngine(e sim.Engine) Builder

func (Builder) WithFreq

func (b Builder) WithFreq(f sim.Freq) Builder

type Comp

type Comp struct {
	*sim.TickingComponent
	sim.MiddlewareHolder
	// contains filtered or unexported fields
}

Comp is a DirectConnection connects two components without latency

func (*Comp) NotifyAvailable

func (c *Comp) NotifyAvailable(p sim.Port)

NotifyAvailable is called by a port to notify that the connection can deliver to the port again.

func (*Comp) NotifySend

func (c *Comp) NotifySend()

NotifySend is called by a port to notify that the connection can start to tick now

func (*Comp) PlugIn

func (c *Comp) PlugIn(port sim.Port)

PlugIn marks the port connects to this DirectConnection.

func (*Comp) Tick

func (c *Comp) Tick() bool

func (*Comp) Unplug

func (c *Comp) Unplug(_ sim.Port)

Unplug marks the port no longer connects to this DirectConnection.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL