Contenuto principale

init

Class: wnet.Mobility
Namespace: wnet

Initialize mobility context

Since R2026a

Description

init(mobilityModel,mobilityContext) initializes the mobility context information, such as the node ID, node name, latest position, and last update time.

Note

Note that, a subclass of wnet.Node calls the init method when you configure a mobility model using the addMobility method. The addMobility method creates the mobility context and passes it to the init method.

Input Arguments

expand all

Mobility model, specified as an object of a subclass of the wnet.Mobility base class.

Mobility context information, represented as a structure. This argument contains these fields:

  • NodeID — ID of the node.

  • NodeName — Name of the node.

  • LatestPosition — Latest position of the node. Units are in meters.

  • LastUpdateTime — Most recent update time for the mobility information of the node. Units are in seconds.

For more information about these fields, see wnet.Node.

Version History

Introduced in R2026a