Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Counter ¶
type Counter struct { Cur Matrix Sum Matrix }
func NewCounter ¶
func NewCounter() *Counter
func (*Counter) CountMatrix ¶
func (self *Counter) CountMatrix(m Matrix)
func (*Counter) CountPacket ¶
func (self *Counter) CountPacket(p *Packet)
type Display ¶
type Display interface { Start(setup *Setup) TakesHour() bool DrawHour(r *HourReport) Stop() }
type HourReport ¶
type LineProgress ¶
type LineProgress struct { NoSingleLine bool Flows Flows // contains filtered or unexported fields }
func NewLineProgress ¶
func NewLineProgress() *LineProgress
func (*LineProgress) Start ¶
func (self *LineProgress) Start(s *ProgressStat)
func (*LineProgress) Stop ¶
func (self *LineProgress) Stop(s *ProgressStat)
func (*LineProgress) Tick ¶
func (self *LineProgress) Tick(s *ProgressStat)
type Progress ¶
type Progress interface { Start(s *ProgressStat) Tick(s *ProgressStat) Stop(s *ProgressStat) }
type ProgressStat ¶
type Recorder ¶
type Recorder struct {
// contains filtered or unexported fields
}
func NewRecorder ¶
type SchedRecorder ¶
type SchedRecorder struct {
// contains filtered or unexported fields
}
func NewSchedRecorder ¶
func NewSchedRecorder(out io.Writer) *SchedRecorder
func (*SchedRecorder) Log ¶
func (self *SchedRecorder) Log(days []*Day)
type Scheduler ¶
type Scheduler interface { // Based on the "demand" given for the next "wind" amount of ticks // Returns a series of days, and the allocated bandwidth matrix Schedule(leftover, demand Matrix, wind uint64) (days []*Day, bandw Matrix) }
type Switch ¶
type Switch interface { // Tells if the switch is a TDMA switch. Tdma() bool /* A switch is a sender where other parts can queue some packet onto the switch. Nics queues are also part of the switch. */ blocks.Sender /* Moves packet inside the switch to the sink. If the switch is a TDMA switch (a circuit switch or a hybrid switches), it uses the estimator to estimate the demand in the near future. Returns the schedule for current tick, and the schedule events that happens at the end of the tick. If the switch is not a TDMA switch (a packet switch), then it just moves packets, and always returns (nil, 0) */ Tick(sink blocks.Block, estimator Estimator) (Matrix, Events) // Sets the switch to use a particular scheduler Bind(s Scheduler, logger *SchedRecorder) Served() (circ Matrix, pack Matrix) }
type Testbed ¶
type Testbed struct { Hosts Hosts // Send and receive packets Switch Switch // Transmits packets from host to host Estimator Estimator // (TDMA switch only), estimates the upcoming demands Scheduler Scheduler // (TDMA switch only), breaks the demand into days Monitor Monitor // (optional) tracks past demands Stopper Stopper // (optional) tells the testbed to stop Display Display // (optional) displays the simulation status Progress Progress // (optional) shows the simulation progress WarmUp uint64 EndTime uint64 // The time that the simulation ends *ProgressStat // contains filtered or unexported fields }
A Testbed runs a simulation
func NewTestbed ¶
func (*Testbed) LogSchedTo ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.