SEAL Components

From DiLab
Revision as of 11:10, 5 October 2012 by Atis (talk | contribs)
Jump to: navigation, search

Introduction

Most of SEAL application syntax is based on component (sensors, LEDs, output channels etc.) use case descriptions.

The description of a component use case contains the name of the component followed by a list of parameters. For example, the line:

use Beeper, times 10, period 100ms;

tells to use Beeper component for 10 times with 100 millisecond period (i.e. beep for one second with 10Hz on/off frequency).

Parameters

A parameter is described by parameter name followed by optiona parameter value.

For example, period 1h or on are both valid parameter descriptions.

= Parameter value formats

  • Integer: a whole number, for example 1, 100, 1234
  • Boolean: true/false value, for example True, False
  • String: a sequence of ASCII symbols, for example "hello world"
  • Time value is an integer with an optional suffix, for example 13min
    • h - hours
    • min - minutes
    • s - seconds
    • ms - milliseconds.
  • If no suffix is specified, the value is treated as milliseconds.

If only parameter name is specified, the default value (usually 0 or False) is used.

Parameters for all components

id (integer) - object identifier period (time value) - the use/read period once (boolean) - use just once times (integer) - use just the number of times ("times 1" is the same as once) duration (time value) - use just for a specific duration (time period) since first used pattern (pattern name) - read/use using a specific time valu patter.

Sensor-specific parameters

turnOnOff (boolean) - turn on the sensor before reading and off afterwards. By default the sensors are on whole time. This parameter can be used to save energy. cache (boolean) - use cache to store and retrieve sensor values? By default, all sensors are read every time they are accessed.

Actuator-specific parameters

on (boolean) - turn the component on off (boolean) - turn the component off blink (boolean) - turn the component on, then off (using "period" parameter)


Outputs

agregate (boolean) - if true, then a packet is formed; if no, then values are sent indiviually. True by default for all except serial port.


Components

Sensors

Real sensors

Light

Sample light reading.

Parameters: all sensor parameters.

Humidity

Sample air humidity sensor reading.

Parameters: all sensor parameters.

Temperature

Sample air humidity sensor reading.

Parameters: all sensor parameters.

AnalogIn

Parameters:

  • all sensor parameters
  • channel (integer) - which channel to read. Possible values depend on device.

DigitalIn

Pseudosensors

Constant

Counter

Random

TimeCounter

Timestamp

Uptime

Actuators

LED

RedLed

GreenLed

BlueLed

Beeper

AnalogOut

DigitalOut

Print

Outputs

Serial

Radio

Network

SdCard

File

Other syntax elements

C variables

C constants