18. Node information


The NODE_INFO service provides a single place to collate node-related information that is commonly needed by many agents. It is a special service, in the sense that each node must be configured to have one and only one agent providing this service.

18.1. Overview

An agent implementing the NODE_INFO service not only exposes a set of parameters, as described in this section, but also provides some special handling for specific parameters.

18.1.1. Parameters

An agent offering the NODE_INFO service supports several parameters:

  • nodeName — node name

  • address — node address

  • addressSize — address size in bits (valid values are 8 or 16)

  • time — node time (read-only)

  • canForward — true if the node will forward datagrams to other nodes (routing)

  • origin — origin as (latitude, longitude)

  • location — location as (x, y, z) in meters if origin set, otherwise (latitude, longitude, z)

  • mobility — true if the node is mobile, false if it is fixed

  • speed — speed in m/s, if mobile node

  • heading — heading in degrees, 0 is North, measured clockwise

  • pitch — pitch angle in degrees, 0 is level, positive is nose down

  • roll — roll angle in degrees, 0 is level, positive is rolling starboard

  • turnRate — turn rate in degrees/s, measured clockwise, if mobile node

  • diveRate — dive rate in m/s, if mobile node

Any changes to parameters nodeName , address , addressSize , origin or location are published as ParamChangeNtf to the agent’s topic (in addition to the PARAMCHANGE topic that all parameter changes are automatically published to — see Chapter 25 ). This is to facilitate monitoring of changes to these important parameters by other agents, simply by subscribing to the NODE_INFO service provider’s topic.

Additionally, if time stability or location accuracy information is available, the following parameters are populated:

18.1.2. Notes

  • See Section 4.1 for a discussion on nodeName , address and addressSize .

  • See Section 5.6 for a discussion on origin , location and coordinate systems.

  • If node mobility is enabled, the agent may automatically update location based on motion parameters such as speed , heading , etc.

18.2. Example

If you start the mission2013 network simulation ( bin/unet samples/mission2013-network.groovy ), connect to node 21’s shell and type node , you’ll see the NODE_INFO parameters for the node in this network:

> node
« Node information »

Manages and maintains node information and attributes.

  address = 21
  addressSize = 8
  canForward = true
  diveRate = 0
  heading = 0
  location = [-512.0, 248.8, -6.0]
  mobility = false
  nodeName = 21
  origin = [1.217, 103.743]
  speed = 0
  time ⤇ Sat Apr 04 16:49:55 SGT 2020
  turnRate = 0
<<< [Ranging and synchronization] [Address resolution] >>>