/*****************************************************************************
* File: EXP_T_actions.c
*
* Description:
* State actions methods implementation for the following object:
*
* Object: technique (T)
* Domain: EXP
* Subsystem: experiment
* Repository: exp.ooa
*
* Notice:
* (C) Copyright 1999, 2000 ROX Software, Inc.
* All rights reserved.
*
* Model Compiler: MC3020 V1.3.0
*
* Warnings:
* !!! THIS IS AN AUTO-GENERATED FILE. PLEASE DO NOT EDIT. !!!
****************************************************************************/
#include "e_mechs.h"
#include "e_events.h"
#include "EXP_objects.h"
#include "A_enums.h"
#include "EXP_T_object.h"
#include "EXP_T_events.h"
#include "A_FBO_bridge.h"
#include "EXP_T_xform.h"
/*****************************************************************************
* State [1]: 'idle'
****************************************************************************/
void
EXP_T_Action_1( EXP_T_s * self, const OoaEvent_t * const event )
{
/* ASSIGN SELF.current_batch = 0 */
self->m_current_batch = 0;
/* TRANSFORM T::done() */
EXP_T_Xform_done();
}
/*****************************************************************************
* State [2]: 'running'
****************************************************************************/
void
EXP_T_Action_2( EXP_T_s * self, const OoaEvent_t * const event )
{
/* ASSIGN SELF.current_batch = SELF.current_batch + 1 */
self->m_current_batch = self->m_current_batch + 1;
/* IF (SELF.current_batch <= SELF.number_of_batches) */
if ( (self->m_current_batch <= self->m_number_of_batches) )
{
/* BRIDGE A::stopandgo(directive:'go') */
A_FBO_stopandgo( A_order_go_e );
}
/* ELSE */
else
{
/* GENERATE T3:'stop'() TO SELF */
{
EXP_T_Event3_s * event1 = (EXP_T_Event3_s *) Escher_NewOoaEvent( (void *) self, &EXP_T_Event3_sc );
Escher_SendSelfEvent( (OoaEvent_t *)event1 );
}
}
/* END IF */
}