/*2011-01-03T15:23:48-01:00*/

/********************************************************************
 * addition_10_cov.c
 * 
 * generated by: plcgen 2.1.201
 ********************************************************************/

#include "cb_comp.h"
#include "cb_covs.h"
#include "iec_1131.h"

#include "addition_10.h"



/**************************** Variables *****************************/

CB_Index addition_10__num = 0;
CB_Mem_Float *addition_10_E1;
CB_Mem_Float *addition_10_E2;
CB_Mem_Float *addition_10_E3;
CB_Mem_Float *addition_10_E4;
CB_Mem_Float *addition_10_E5;
CB_Mem_Float *addition_10_E6;
CB_Mem_Float *addition_10_E7;
CB_Mem_Float *addition_10_E8;
CB_Mem_Float *addition_10_E9;
CB_Mem_Float *addition_10_E10;
CB_Mem_Float *addition_10_valeur;
CB_Mem_Bool *addition_10_d_blocage;
CB_Mem_Float *addition_10_v_d_blocage;

/**************************** Variables *****************************/

#define E1 (addition_10_E1->CB_current_value)
#define E2 (addition_10_E2->CB_current_value)
#define E3 (addition_10_E3->CB_current_value)
#define E4 (addition_10_E4->CB_current_value)
#define E5 (addition_10_E5->CB_current_value)
#define E6 (addition_10_E6->CB_current_value)
#define E7 (addition_10_E7->CB_current_value)
#define E8 (addition_10_E8->CB_current_value)
#define E9 (addition_10_E9->CB_current_value)
#define E10 (addition_10_E10->CB_current_value)
#define valeur (addition_10_valeur->CB_current_value)
#define d_blocage (addition_10_d_blocage->CB_current_value)
#define v_d_blocage (addition_10_v_d_blocage->CB_current_value)


/************************ Components offsets ************************/


/********************* Initialization function **********************/

int _bibliotheque_epo__addition_10_init(void)
{
	self.Bool+=1;
	self.Float+=1;


	return 0;
}


/************************ Behavior function *************************/

int bibliotheque_epo__addition_10(void)
{
	static char *__comp_name = "bibliotheque_epo.addition_10";
	if (exec_term_node(self_num)) {

		/*********************** Internals variables ************************/

		addition_10_d_blocage = self.Bool+0;
		addition_10_v_d_blocage = self.Float+0;

		/********************* Pre-conditions execution *********************/

		/*no Pre-conditions*/

		/************************ Behavior execution ************************/

		{
			/* -----------------------------------------------------------------	*/
			/* Type : Modèle de Comportement Opératif					*/
			/* Catégorie :  Boite à outils						*/
			/* Auteur : Techniques Nouvelles d'Informatique				*/
			/* Date de révision : Octobre 2002						*/
			/* -----------------------------------------------------------------	*/
			/* Ce module représente une addition de 10 nombres			*/
			/* réels au maximum								*/
			/* -----------------------------------------------------------------	*/
			
			if (d_blocage)
				valeur = v_d_blocage; 			/* forçage de la valeur 	*/
			else
				valeur = E1+E2+E3+E4+E5+E6+E7+E8+E9+E10; /* résultat de l'addition 	*/
			
					}

		CB_post_float(addition_10_valeur);

		/******************** Post-conditions execution *********************/

		/*no Post-conditions*/
	}

	/*************************** self update ****************************/

	self.Bool += 1;
	self.Float += 1;

	return 0;
}

