The Program - GerardT/Arro GitHub Wiki

The concept of the Arro project is that a program is developed using a (graphical) development environment on PC or Mac, using Eclipse and a dedicated Eclipse plug in. Once the program is ready, it gets downloaded to the Runtime environment and executed there.

A program looks like this:

Overview

A diagram as shown is contained in one module. Beside the diagram, a module may consist of a state diagram, and program code (Python).

Inside a diagram there is a network of blocks:

  • Elementary Blocks
  • Function Blocks

A Function block is basically a reference to a module that itself contains a network of blocks, as described above. An Elementary Block refers an actual execution module in the runtime environment (the raspberry PI). In a diagram, blocks communicate to each other by messages. A message flows from one Block's output pad to another Block's input pad. The message pads define the type (ie the data structure) of the messages that it can receive or send. Not all pads need to be connected.

There are several kinds of Elementary Blocks:

  • Programmable blocks (e.g. Python or C programmable)
  • User Input and output blocks - those provide HTML input and output elements for the user to communicate.
  • Configuration blocks.
  • State Machine blocks.

A program always has a “Main” module that is the main entry point of the program.

Once the program gets loaded into the runtime environment, all Function Blocks are replaced by the blocks in referred modules. Function Blocks in those modules also get replaced until only a network of Elementary Blocks remains. The message connections that connect Function Block pads are replaced by message connections to/from Elementary Blocks.

When the network of Elementary Blocks is finished the program can start. While running, the runtime environment will execute an (infinite) number of consecutive steps, called RunCycles. Each RunCycle will trigger all Blocks that have messages waiting on their input pad(s). The Blocks will then perform their logic (depending on the kind of Elementary Block it is) and possibly produce output. That output will be input to other Block(s) during the next RunCycle, and so on.

Messages

As stated above, each message is defined by its type.