kb2ma / nethead

Interface for monitoring an OpenWSN network in Adagios
0 stars 0 forks source link

Support multiple neighbors for RSS reporting #4

Closed kb2ma closed 9 years ago

kb2ma commented 9 years ago

Support for multiple neighbors requires two changes: reformatting the Nagios service name, and reformatting the '/nh/rss' message.

Service name

Presently each Nagios host includes a single service, 'rss', for the signal strength of its single neighbor. The service name will change to include the last four hex characters of the neighbor's address. So, the service for the signal strength from a neighbor whose address ends with '94a9' is 'rss-94a9'.

Reformatting

Presently Nethead encodes the RSS payload as a map for a single neighbor, in the format below.

{"n":"90b9", "s":-47}

To support multiple neighbors, we change the key to the address of the neighbor, and the value to the RSS value.

{"90b9":-47}

Each additional neighbor is another pair in the map. This change also reduces the size of the data for each entry from 18 bytes to 10 bytes.

kb2ma commented 9 years ago

Fixed in commits just now to nethead, openwsn-fw, and openwsn-sw.