Documentation
¶
Overview ¶
Package standalone provides infrastructures to write network simulations without simulating compute cores and memory systems.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct { *sim.TickingComponent ToOut sim.Port Buffer []*TrafficMsg }
Agent is a component that connects the network. It can send and receive msg to/ from the network.
func (*Agent) NotifyRecv ¶
NotifyRecv notifies that a port has received a message.
type GreedyTrafficInjector ¶
type GreedyTrafficInjector struct { PacketSize int NumPackets int // contains filtered or unexported fields }
GreedyTrafficInjector generate a large number of traffic at the beginning of the simulation.
func NewGreedyTrafficInjector ¶
func NewGreedyTrafficInjector(engine sim.Engine) *GreedyTrafficInjector
NewGreedyTrafficInjector creates a new GreedyTrafficInjector.
func (*GreedyTrafficInjector) InjectTraffic ¶
func (ti *GreedyTrafficInjector) InjectTraffic()
InjectTraffic injects traffic.
func (*GreedyTrafficInjector) RegisterAgent ¶
func (ti *GreedyTrafficInjector) RegisterAgent(a *Agent)
RegisterAgent allows the GreedyTraffiCInjector to inject traffic from the agent.
type StartSendEvent ¶
type StartSendEvent struct { *sim.EventBase Msg *TrafficMsg }
StartSendEvent is an event that triggers an agent to send a message.
func NewStartSendEvent ¶
func NewStartSendEvent( time sim.VTimeInSec, src, dst *Agent, byteSize int, trafficClass int, ) *StartSendEvent
NewStartSendEvent creates a new StartSendEvent.
type TrafficInjector ¶
type TrafficInjector interface { RegisterAgent(a *Agent) InjectTraffic() }
A TrafficInjector can inject traffic to a network.
type TrafficMsg ¶
TrafficMsg is a type of msg that only used in standalone network test. It has a byte size, but we do not care about the information it carries.
func NewTrafficMsg ¶
func NewTrafficMsg(src, dst sim.RemotePort, byteSize int) *TrafficMsg
NewTrafficMsg creates a new traffic message
func (*TrafficMsg) Meta ¶
func (m *TrafficMsg) Meta() *sim.MsgMeta
Meta returns the meta data of the message.