otnstester

package
v0.0.0-...-565450b Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeInfo

type NodeInfo struct {
	ExtAddr uint64
	Rloc16  uint16
	X, Y    int
	Failed  bool
}

type OtnsTest

type OtnsTest struct {
	*testing.T
	// contains filtered or unexported fields
}

func NewOtnsTest

func NewOtnsTest(t *testing.T) *OtnsTest

func (*OtnsTest) AddNode

func (ot *OtnsTest) AddNode(role string) NodeId

func (*OtnsTest) Command

func (ot *OtnsTest) Command(cmd string) []string

func (*OtnsTest) Commandf

func (ot *OtnsTest) Commandf(format string, args ...interface{}) []string

func (*OtnsTest) DeleteNode

func (ot *OtnsTest) DeleteNode(ids ...NodeId)

func (*OtnsTest) ExpectNoError

func (ot *OtnsTest) ExpectNoError(err error)

func (*OtnsTest) ExpectTrue

func (ot *OtnsTest) ExpectTrue(value bool, msgAndArgs ...interface{})

func (*OtnsTest) ExpectVisualizeAddNode

func (ot *OtnsTest) ExpectVisualizeAddNode(nodeid NodeId, x int, y int, radioRange int)

func (*OtnsTest) ExpectVisualizeEvent

func (ot *OtnsTest) ExpectVisualizeEvent(match func(evt *visualize_grpc_pb.VisualizeEvent) bool)

func (*OtnsTest) GetNodeState

func (ot *OtnsTest) GetNodeState(id NodeId) string

func (*OtnsTest) Go

func (ot *OtnsTest) Go(duration time.Duration)

func (*OtnsTest) Join

func (ot *OtnsTest) Join()

func (*OtnsTest) ListNodes

func (ot *OtnsTest) ListNodes() map[NodeId]*NodeInfo

func (*OtnsTest) RemoveAllNodes

func (ot *OtnsTest) RemoveAllNodes()

func (*OtnsTest) Reset

func (ot *OtnsTest) Reset()

func (*OtnsTest) SetPacketLossRatio

func (ot *OtnsTest) SetPacketLossRatio(ratio float32)

func (*OtnsTest) SetSpeed

func (ot *OtnsTest) SetSpeed(speed int)

func (*OtnsTest) Shutdown

func (ot *OtnsTest) Shutdown()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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