standalone

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	*akita.TickingComponent

	ToOut akita.Port

	Buffer []*TrafficReq
}

Agent is a component that connects the network. It can send and receive requests to/ from the network.

func NewAgent

func NewAgent(name string, engine akita.Engine) *Agent

func (*Agent) Handle

func (a *Agent) Handle(e akita.Event) error

func (*Agent) NotifyRecv

func (a *Agent) NotifyRecv(now akita.VTimeInSec, port akita.Port)

type GreedyTrafficInjector

type GreedyTrafficInjector struct {
	PackageSize int
	NumPackages int
	// contains filtered or unexported fields
}

GreedyTraffic generate a large number of traffic at the beginning of the simulation.

func NewGreedyTrafficInjector

func NewGreedyTrafficInjector(engine akita.Engine) *GreedyTrafficInjector

func (*GreedyTrafficInjector) InjectTraffic

func (ti *GreedyTrafficInjector) InjectTraffic()

func (*GreedyTrafficInjector) RegisterAgent

func (ti *GreedyTrafficInjector) RegisterAgent(a *Agent)

type StartSendEvent

type StartSendEvent struct {
	*akita.EventBase
	Req *TrafficReq
}

func NewStartSendEvent

func NewStartSendEvent(
	time akita.VTimeInSec,
	src, dst *Agent,
	byteSize int,
) *StartSendEvent

type TrafficInjector

type TrafficInjector interface {
	RegisterAgent(a *Agent)
	InjectTraffic()
}

type TrafficReq

type TrafficReq struct {
	*akita.ReqBase
}

TrafficReq is a type of requests that only used in standalone network test. It has a byte size, but we do not care about the information it carries.

func NewTrafficReq

func NewTrafficReq(src, dst akita.Port, byteSize int) *TrafficReq

NewTrafficReq creates a new traffic request

Jump to

Keyboard shortcuts

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