control

Signal ID to function call in state machines

Mapping Signal IDs to function calls The state machine pattern assumes, that function calls are made by each incoming signal. But what if the signals exist only as a number or ID? How is the ID transformed into a function call? Of course, you could simply write a switch case, converting the integer ID into a function call. But switch cases “smell” (look into Martin Fowlers book on Refactoring). This example uses the function process(Signal s) (line 61, lines 76 and 77) to process the signal which is given as an ID.

State Machine

Hierarchical State Machines Hierarchical State Machines (D. Harel) [4] are a common way to model behaviour of a software modul. Bran Selic [5] has extended the ideas towards real time modeling, introducing actors, ports and other components. GoF [2] have first proposed an implementation. M. Samek [1] has elaborated on the implementation. Here, I propose an idea to implement the change of states using the placement new operator. Nico Manske has made experiments with this idea in his Bachelorthesis [3].

Subsumption Architecture

Introduction to Rodney Brooks Subsumption Architecture: The subsumption architecture is a layered methodology for robot control systems. It consists of coupled components and their hierarchical behaviours. One component is superimposed on the other as single layers. Each layer disposes of an arbitration scheme which empowers higher layered behaviours to manipulate the input and output of lower behaviours by suppressing the input or inhibiting the output (see fig. 01). Also visible in fig.