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

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

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

#include "bouton_accrochage.h"


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

CB_Index bouton_accrochage__num = 0;
CB_Mem_Bool *bouton_accrochage_bp;
CB_Mem_Bool *bouton_accrochage_action;
CB_Mem_Bool *bouton_accrochage_logiqueBp;

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

#define bp (bouton_accrochage_bp->CB_current_value)
#define action (bouton_accrochage_action->CB_current_value)
#define logiqueBp (bouton_accrochage_logiqueBp->CB_current_value)


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


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

int _bibliotheque_epo__bouton_accrochage_init(void)
{
	(self.Bool+1)->CB_current_value = 1; /*logiqueBp*/
	self.Bool+=2;


	return 0;
}


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

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

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

		bouton_accrochage_action = self.Bool+0;
		bouton_accrochage_logiqueBp = self.Bool+1;

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

		/*no Pre-conditions*/

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

		{
			bp = action ^ !logiqueBp;
		}

		CB_post_bool(bouton_accrochage_bp);

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

		/*no Post-conditions*/
	}

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

	self.Bool += 2;

	return 0;
}

