Skip to content
Anton Dukeman edited this page Jun 3, 2015 · 4 revisions

Introduction

This page describes the keys used for referencing variables in the MADARA knowledge base. See MADARA for discussion of the syntax used in this article.


Local

Variable Type Purpose
.id Integer The ID for the device. All positive integers and zero are valid
.processes Integer Number of devices participating

Prefixes

Prefix Description
device.{.id} Device specific information
sim Simulation purposes

Device Specific Variables

Each of these have device.{.id}. as a prefix.

Variable Type Purpose
battery Integer Battery life remaining
busy Integer 1 if this device is executing an algorithm, 0 otherwise
command String Command for the device to execute
command.size Integer Number of arguments passed to the command
command.{i} Multi-Type Array Arguments for the command. i goes from 0 to command.size
source Double[2] Location that device is moving from
dest Double[2] Location that device is moving towards
home Double[2] Home location for the device
location Double[3] Last known location of device
mobile Integer Set to 1 if device is mobile

Clone this wiki locally