18. Node information
org.arl.unet.Services.NODE_INFO
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:
-
timeStability— time stability in ppm -
locationAccuracy— location accuracy as (x, y, z) in meters
18.1.2. Notes
-
See Section 4.1 for a discussion on
nodeName,addressandaddressSize. -
See Section 5.6 for a discussion on
origin,locationand coordinate systems. -
If node
mobilityis enabled, the agent may automatically updatelocationbased on motion parameters such asspeed,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.
[org.arl.unet.nodeinfo.NodeInfoParam]
address = 232
addressSize = 8
canForward = true
diveRate = 0
heading = 0
location = [0.0, 0.0, -15.0]
mobility = false
nodeName = A
origin = [NaN, NaN]
pitch = 0
roll = 0
speed = 0
time ⤇ Thu Apr 08 20:43:40 SGT 2021
turnRate = 0
| <<< [Ranging and synchronization] | [Address resolution] >>> |