Contenido principal

isPacketRelevant

Class: wnet.Node
Namespace: wnet

Determine if the packet is relevant to node

Since R2026a

Description

[flag,receiverNodeInfo] = isPacketRelevant(wirelessNode,packet) determines if the packet is relevant to the node wirelessNode and provides information about the node required to apply the channel model to a wireless packet.

Note

Only the wirelessNetworkSimulator calls the isPacketRelevant method.

Input Arguments

expand all

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

Packet to check, specified as a structure or a vector of structures. For more information about the structure of a wireless packet, see the wirelessPacket function..

Output Arguments

expand all

Acceptance for reception of the packet, returned as a logical 1 (true) or 0 (false). A value of true indicates that the packet is relevant, while a value of false indicates that it is not relevant.

Receiver node information, returned as [] or a structure. When the value of flag is false, the value of receiverNodeInfo is []. When the value of flag is logical true, the value of receiverNodeInfo is a structure containing these fields:

  • Position — Current node position in Cartesian x-, y-, and z-coordinates, returned as a three-element numeric row vector. Units are in meters.

  • Velocity— Current node velocity in Cartesian x-, y-, and z-coordinates, returned as a numeric vector of the form [vx vy vz]. vx, vy, and vz are velocity components in the x-, y-, and z-directions. Units are in meters per second.

  • NumReceiveAntennas — Number of receiving antennas.

  • ID — Receiver node identifier

If the packet is relevant, the simulator uses this information to apply the channel to the incoming packet.

Version History

Introduced in R2026a