Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Match ¶
Match represents input to output port matching when there is no match for a port use -1.
type Packet ¶
type Packet struct {
InputPort int
OutputPort int
Delay int
// contains filtered or unexported fields
}
Packet contains information about network packet that comes into switch
type Port ¶
type Port struct {
// contains filtered or unexported fields
}
Port represents input port of switch
type Switch ¶
Switch represents switching fabric that can work with each algorithm
func NewWithFractionalSpeedup ¶
NewWithFractionalSpeedup creates new switch with n in/out port and speedup s - f/n
func NewWithSpeedup ¶
NewWithSpeedup creates new switch with n in/out port and speedup s
func (*Switch) ArriveMany ¶
ArriveMany packets into switch
func (*Switch) MarshalJSON ¶
MarshalJSON marshals switch into valid json
func (*Switch) UnmarshalJSON ¶
UnmarshalJSON unmarshal switch from valid json packet arrival timestamps are invalid
Click to show internal directories.
Click to hide internal directories.