Aversive/Modules/devices/control system

De Wikidroids

Sommaire

Control system generic architecture

The control_system module aims to provide a very generic and portable architecture for programming control loops.
The whole control system is portable, because it is separated from the IO functions. It can be compiled as it is on nearly every architecture.

This structure contains all the informations for a control loop to be able to work. The filters informations are contained separately, but are pointed by this structure.

Interface

The interface is simple but pwoerfull : it could accomodate two styles

all function call : use cs_manage() as call, and cs_set_consign() for the consign. This is tdeal for interfacing directly to the scheduler.

I/O done by passing arguments : use cs_do_process() as call

void cs_init(struct cs * cs)

This initialises the structure.
Here it is absolutely necessary to initialize properly, because of the function pointers contained !
Please note that a filter function pointer set to NULL bypasses this filter.