Skip to content

AddPlatform

ediazal edited this page Jan 8, 2016 · 4 revisions

Introduction

This guide briefly shows how to add platforms into sky-boards-collect. Despite the project name, platforms doesn't need to be sky based; every device supported by ContikiOS can be added.

Details

1. Platform firmware

To define contiki-collect firmware for a platform, create collect-view-platform.[ch]. See:

After that, edit SensorInfo.java to reflect the platform message format in CollectView tool.

2. Sensors classes

A sensor class implements the sensor conversion expressions. Take existing sensor classes as reference.

3. Platform class

The platform class extends the Node class, creates its sensors instances, and map the sensor identifiers to the specific collect message position. Take existing platform classes as reference.

If a sensor that didn't previously exist in the application is introduced along with the defined platform, sensor identifier should be create in SensorIdentifier.java. eg:

public static final String PRESSURE_SENSOR = "Pressure";

4 Add instances

In the main class, CollectServer.java, add the corresponding platform instance in the getNode(..) method.

If a sensor that didn't previously exist in the application is introduced along with the defined platform, TimeChartPanel instance should be added into visualizers[] structure.

See also

Clone this wiki locally