aversive_10-03-12/modules/devices/control_system/control_system_manager/control_system_manager.h File Reference

Interface for the control_system manager module. More...

#include <aversive.h>

Go to the source code of this file.

Data Structures

struct  cs

Functions

void cs_init (struct cs *cs)
void cs_set_consign_filter (struct cs *cs, int32_t(*consign_filter)(void *, int32_t), void *consign_filter_params)
void cs_set_correct_filter (struct cs *cs, int32_t(*correct_filter)(void *, int32_t), void *correct_filer_params)
void cs_set_feedback_filter (struct cs *cs, int32_t(*feedback_filter)(void *, int32_t), void *feedback_filer_params)
void cs_set_process_in (struct cs *cs, void(*process_in)(void *, int32_t), void *process_in_params)
void cs_set_process_out (struct cs *cs, int32_t(*process_out)(void *), void *process_out_params)
int32_t cs_do_process (struct cs *cs, int32_t consign)
 This function do the main loop of the control system process.
void cs_manage (void *cs)
int32_t cs_get_out (struct cs *cs)
int32_t cs_get_error (struct cs *cs)
int32_t cs_get_consign (struct cs *cs)
int32_t cs_get_filtered_consign (struct cs *cs)
int32_t cs_get_filtered_feedback (struct cs *cs)
void cs_set_consign (struct cs *cs, int32_t v)


Detailed Description

Interface for the control_system manager module.

Todo:
Test the module on a real system.
Test:
No test for the moment, only correct compilation.
This module provide functions to control and regulate a system.

Definition in file control_system_manager.h.


Function Documentation

int32_t cs_do_process ( struct cs cs,
int32_t  consign 
)

This function do the main loop of the control system process.

  • Save the consign in the structure.
  • Apply the consign filter to the consign.
  • Read the process out
  • Apply the feedback filter to the process out
  • Substract filtered consign to filtered process out.
  • Save the result in error_value and apply the correct filter.
  • Save the filtered result and send it to process_in().
  • Return this result.

Definition at line 183 of file control_system_manager.c.

References cs::consign_filter, cs::consign_filter_params, cs::consign_value, cs::correct_filter, cs::correct_filter_params, debug_printf, cs::error_value, cs::feedback_filter, cs::feedback_filter_params, cs::filtered_consign_value, cs::filtered_feedback_value, i, cs::out_value, cs::process_in, cs::process_in_params, cs::process_out, and cs::process_out_params.

Referenced by cs_manage().

int32_t cs_get_consign ( struct cs cs  ) 

Return the current consign

Definition at line 264 of file control_system_manager.c.

References cs::consign_value, IRQ_LOCK, and IRQ_UNLOCK.

Referenced by trajectory_finished().

int32_t cs_get_error ( struct cs cs  ) 

Return the last calculated error

Definition at line 251 of file control_system_manager.c.

References cs::error_value, IRQ_LOCK, and IRQ_UNLOCK.

int32_t cs_get_filtered_consign ( struct cs cs  ) 

Return the current consign, after filter

Definition at line 275 of file control_system_manager.c.

References cs::filtered_consign_value, IRQ_LOCK, and IRQ_UNLOCK.

Referenced by trajectory_finished().

int32_t cs_get_filtered_feedback ( struct cs cs  ) 

Return the last feedback value, after filter

Definition at line 286 of file control_system_manager.c.

References cs::filtered_feedback_value, IRQ_LOCK, and IRQ_UNLOCK.

int32_t cs_get_out ( struct cs cs  ) 

Return the last output sent to process

Definition at line 238 of file control_system_manager.c.

References IRQ_LOCK, IRQ_UNLOCK, and cs::out_value.

void cs_init ( struct cs cs  ) 

void cs_manage ( void *  cs  ) 

Apply cs_do_process() to the structure cs

Parameters:
cs should be a (struct cs*)

Definition at line 230 of file control_system_manager.c.

References cs::consign_value, and cs_do_process().

void cs_set_consign ( struct cs cs,
int32_t  v 
)

Change the consign without calculating control system

Definition at line 299 of file control_system_manager.c.

References cs::consign_value, IRQ_LOCK, and IRQ_UNLOCK.

Referenced by __trajectory_goto_d_a_rel().

void cs_set_consign_filter ( struct cs cs,
int32_t(*)(void *, int32_t)  consign_filter,
void *  consign_filter_params 
)

Set the cs consign_filter fields in the cs structure

Definition at line 130 of file control_system_manager.c.

References cs::consign_filter, cs::consign_filter_params, IRQ_LOCK, and IRQ_UNLOCK.

void cs_set_correct_filter ( struct cs cs,
int32_t(*)(void *, int32_t)  correct_filter,
void *  correct_filer_params 
)

Set the cs correct_filter fields in the cs structure

Definition at line 141 of file control_system_manager.c.

References cs::correct_filter, cs::correct_filter_params, IRQ_LOCK, and IRQ_UNLOCK.

void cs_set_feedback_filter ( struct cs cs,
int32_t(*)(void *, int32_t)  feedback_filter,
void *  feedback_filer_params 
)

Set the cs feedback_filter fields in the cs structure

Definition at line 151 of file control_system_manager.c.

References cs::feedback_filter, cs::feedback_filter_params, IRQ_LOCK, and IRQ_UNLOCK.

void cs_set_process_in ( struct cs cs,
void(*)(void *, int32_t)  process_in,
void *  process_in_params 
)

Set the cs process_in fields in the cs structure

Definition at line 161 of file control_system_manager.c.

References IRQ_LOCK, IRQ_UNLOCK, cs::process_in, and cs::process_in_params.

void cs_set_process_out ( struct cs cs,
int32_t(*)(void *)  process_out,
void *  process_out_params 
)

Set the cs process_out fields in the cs structure

Definition at line 172 of file control_system_manager.c.

References IRQ_LOCK, IRQ_UNLOCK, cs::process_out, and cs::process_out_params.


Generated on Fri Mar 12 06:32:06 2010 for AVR by  doxygen 1.5.6