Versions in this module Expand all Collapse all v1 v1.0.2 Jun 21, 2023 Changes in this version + const FAULT_FAILURE + const FAULT_FLOODING + const FAULT_MIS_ROUTING + const FAULT_OVERFLOW + const FAULT_SLOW + const PACKET_TYPE_CTRL + const PACKET_TYPE_DATA + const PKT_BUF_LEN + const PORT_NUM_SUBSYS + const PORT_NUM_SWITCH + const QUEUE_LEN_SWITCH + const QUEUE_NUM_SWITCH + const SAVE_STATS_PERIOD + const UPLOAD_STATS_PERIOD + const WSLOG_HEARTBEAT + const WSLOG_MSG + const WSLOG_PKT_TX + const WSLOG_STAT + var ANIMATION_ENABLED = false + var ASN = 0 + var ActiveTopoTag = "" + var BandwidthWire float64 = 1073741824 + var BandwidthWireless float64 = 2048 + var CONSOLE_ENABLED = false + var DELAY_ENABLED = false + var DUP_ELI_ENABLED = false + var DistanceWire float64 = 30 + var DistanceWireless float64 = 57968000000 + var FRER_ENABLED = false + var HYPER_PERIOD = 100 + var JITTER_BASE = 0 + var Links []*Link + var NEW_SLOT_SIGNAL chan int + var PacketLossRate float64 = 0 + var REROUTE_ENABLED = false + var SAVE_STATS = false + var SLOT_DURATION time.Duration = 100 + var SUBSYS_MAP = map[string]uint8 + var SequenceNumber int32 = 0 + var SpeedWire float64 = 231000000 + var SpeedWireless float64 = 300000000 + var Subsystems []*Subsys + var Switches []*Switch + var TAS_ENABLED = false + var UID = 0 + var UIDIncMutex sync.Mutex + var WSLog = make(chan Log, 65536) + func Connect(n1, n2 Node) + type Fault struct + Durtaion int + Happening bool + Type string + type Flow struct + Dst []string + Freq string + ID int + Name string + type Link struct + Bandwidth float64 + Distance float64 + Failed bool + HardcodedDelay float64 + PacketLossRate float64 + Speed float64 + func (l *Link) Stop() + type Log struct + Msg string + PktTx PktTx + Statistics map[string][2]int + Type int + type Node interface + InPort func() *Port + Name func() string + OutPort func() *Port + Start func() + type Packet struct + Delay float64 + Dst uint8 + DupID int + IsSim bool + Length uint16 + MessageType uint8 + Path []string + Payload []byte + PhysicalTime uint32 + Priority uint8 + RawBytes []byte + Reserved uint8 + RxTimestamp int64 + Seq int32 + Sequence uint16 + SimulinkTime uint32 + Src uint8 + TxTimestamp int64 + UID int + Version uint8 + func (pkt *Packet) Dup() *Packet + func (pkt *Packet) FromBuf(buf []byte) error + func (pkt *Packet) ToBuf() []byte + type PktTx struct + Finished bool + Node string + UID int + type Port struct + Channel chan *Packet + Failed bool + ID int + Neighbor string + Owner string + func NewPort(id int, owner string) *Port + type Priority struct + Name string + Priority json.Number + type RoutingEntry struct + HopCount int + NextHop string + type StatsDelay struct + Data [][2]float64 + Source string + type Subsys struct + Priority int + RoutingTable map[string][]RoutingEntry + SeqRecoverHistory map[int32]bool + SeqRecoverHistoryMutex sync.Mutex + func NewSubsys(name string, position [2]int) *Subsys + func (s *Subsys) CreateFlow(dst int) + func (s *Subsys) InPort() *Port + func (s *Subsys) Name() string + func (s *Subsys) OutPort() *Port + func (s *Subsys) Start() + func (s *Subsys) Stop() + type Switch struct + Faults map[string]Fault + GCL [PORT_NUM_SWITCH][]TimeWindow + Neighbors []string + RoutingTable map[string][]RoutingEntry + SeqRecoverHistory map[int32]bool + SeqRecoverHistoryMutex sync.Mutex + func NewSwitch(name string, position [2]int) *Switch + func (sw *Switch) Classify(pkt *Packet) + func (sw *Switch) InPort() *Port + func (sw *Switch) Name() string + func (sw *Switch) OutPort() *Port + func (sw *Switch) Start() + func (sw *Switch) Stop() + type TimeWindow struct + Queue int + type TopoGraph struct + Nodes []*TopologyGraphNode + var Graph *TopoGraph + func (g *TopoGraph) FindAllPaths(src, dst string) [][]string + type TopologyData struct + Edges [][2]string + Nodes []TopologyNode + Tag string + type TopologyGraphNode struct + type TopologyNode struct + Name string + Position [2]int