主要内容

run

Class: wnet.Node
Namespace: wnet

Run the node at the current time and return the next invocation time

Since R2026a

Description

nextInvokeTime = run(wirelessNode,currentTime) runs the node at the current simulation time and returns the next scheduled run time for the node. You can override this method so it simulates the actions the node performs at the current simulation time.

Note

Only the wirelessNetworkSimulator object calls the run method.

Input Arguments

expand all

Wireless node, specified as an object of a subclass of wnet.Node.

Current simulation time, specified as a nonnegative scalar. Units are in seconds.

Data Types: double

Output Arguments

expand all

Next scheduled run time of node, returned as a positive scalar. Units are in seconds. Note that, nextInvokeTime must be greater than or equal to the current time.

Data Types: double

Version History

Introduced in R2026a