Skip to content

Commit

Permalink
Regenerated code with EEs at system level. #1
Browse files Browse the repository at this point in the history
  • Loading branch information
Cortland Starrett authored and Cortland Starrett committed Dec 6, 2012
1 parent dec160f commit a85b0e4
Show file tree
Hide file tree
Showing 12 changed files with 235 additions and 25 deletions.
32 changes: 32 additions & 0 deletions VandMC_testing/ttt/src/ARCH_bridge.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*----------------------------------------------------------------------------
* File: ARCH_bridge.c
*
* Description:
* Methods for bridging to an external entity.
*
* External Entity: Architecture (ARCH)
*
* (C) Copyright 1998-2012 Mentor Graphics Corporation. All rights reserved.
*--------------------------------------------------------------------------*/

#include "ttt_sys_types.h"
#include "ARCH_bridge.h"
#include "LOG_bridge.h"
#include "ARCH_bridge.h"
#include "ttt_sys_types.h"
extern bool Escher_run_flag; /* Turn this false to stop the event queues. */

/*
* Bridge: shutdown
*/
void
ARCH_shutdown()
{
Escher_run_flag = false; /* default automatic action for this bridge */
return;
/* Replace/Insert your implementation code here... */
/* CONTROL */
ARCH_shutdown();
}


25 changes: 25 additions & 0 deletions VandMC_testing/ttt/src/ARCH_bridge.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*----------------------------------------------------------------------------
* File: ARCH_bridge.h
*
* Description:
* Methods for bridging to an external entity.
*
* External Entity: Architecture (ARCH)
*
* (C) Copyright 1998-2012 Mentor Graphics Corporation. All rights reserved.
*--------------------------------------------------------------------------*/

#ifndef ARCH_BRIDGE_H
#define ARCH_BRIDGE_H
#ifdef __cplusplus
extern "C" {
#endif

#include "ttt_sys_types.h"

void ARCH_shutdown( void );

#ifdef __cplusplus
}
#endif
#endif /* ARCH_BRIDGE_H */
87 changes: 87 additions & 0 deletions VandMC_testing/ttt/src/LOG_bridge.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/*----------------------------------------------------------------------------
* File: LOG_bridge.c
*
* Description:
* Methods for bridging to an external entity.
*
* External Entity: Logging (LOG)
*
* (C) Copyright 1998-2012 Mentor Graphics Corporation. All rights reserved.
*--------------------------------------------------------------------------*/

#include "ttt_sys_types.h"
#include "ARCH_bridge.h"
#include "LOG_bridge.h"
#include "LOG_bridge.h"
#include "ttt_sys_types.h"

/*
* Bridge: LogSuccess
*/
void
LOG_LogSuccess( c_t p_message[ESCHER_SYS_MAX_STRING_LEN])
{
/* Replace/Insert your implementation code here... */
}


/*
* Bridge: LogFailure
*/
void
LOG_LogFailure( c_t p_message[ESCHER_SYS_MAX_STRING_LEN])
{
/* Replace/Insert your implementation code here... */
}


/*
* Bridge: LogInfo
*/
void
LOG_LogInfo( c_t p_message[ESCHER_SYS_MAX_STRING_LEN])
{
/* Replace/Insert your implementation code here... */
}


/*
* Bridge: LogDate
*/
void
LOG_LogDate( Escher_Date_t p_d, c_t p_message[ESCHER_SYS_MAX_STRING_LEN])
{
/* Replace/Insert your implementation code here... */
}


/*
* Bridge: LogTime
*/
void
LOG_LogTime( c_t p_message[ESCHER_SYS_MAX_STRING_LEN], Escher_TimeStamp_t p_t)
{
/* Replace/Insert your implementation code here... */
}


/*
* Bridge: LogReal
*/
void
LOG_LogReal( c_t p_message[ESCHER_SYS_MAX_STRING_LEN], r_t p_r)
{
/* Replace/Insert your implementation code here... */
}


/*
* Bridge: LogInteger
*/
void
LOG_LogInteger( i_t p_message)
{
/* Replace/Insert your implementation code here... */
}


31 changes: 31 additions & 0 deletions VandMC_testing/ttt/src/LOG_bridge.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*----------------------------------------------------------------------------
* File: LOG_bridge.h
*
* Description:
* Methods for bridging to an external entity.
*
* External Entity: Logging (LOG)
*
* (C) Copyright 1998-2012 Mentor Graphics Corporation. All rights reserved.
*--------------------------------------------------------------------------*/

#ifndef LOG_BRIDGE_H
#define LOG_BRIDGE_H
#ifdef __cplusplus
extern "C" {
#endif

#include "ttt_sys_types.h"

void LOG_LogSuccess( c_t[ESCHER_SYS_MAX_STRING_LEN] );
void LOG_LogFailure( c_t[ESCHER_SYS_MAX_STRING_LEN] );
void LOG_LogInfo( c_t[ESCHER_SYS_MAX_STRING_LEN] );
void LOG_LogDate( Escher_Date_t, c_t[ESCHER_SYS_MAX_STRING_LEN] );
void LOG_LogTime( c_t[ESCHER_SYS_MAX_STRING_LEN], Escher_TimeStamp_t );
void LOG_LogReal( c_t[ESCHER_SYS_MAX_STRING_LEN], r_t );
void LOG_LogInteger( i_t );

#ifdef __cplusplus
}
#endif
#endif /* LOG_BRIDGE_H */
21 changes: 16 additions & 5 deletions VandMC_testing/ttt/src/c1.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
*--------------------------------------------------------------------------*/

#include "ttt_sys_types.h"
#include "c1_LOG_bridge.h"
#include "ARCH_bridge.h"
#include "LOG_bridge.h"
#include "c3.h"
#include "c2.h"
#include "c1_classes.h"
Expand All @@ -21,6 +22,7 @@
void
c1_catch_s1( i_t p_sp1)
{
COMP_MSG_START_TRACE( "%d", c1_DOMAIN_ID, 0, 0, p_sp1 );
c_t s[ESCHER_SYS_MAX_STRING_LEN];
/* ASSIGN s = 'tic catch' */
XTUML_OAL_STMT_TRACE( 1, "ASSIGN s = 'tic catch'" );
Expand All @@ -30,7 +32,7 @@ c1_catch_s1( i_t p_sp1)
if ( ( 3 != p_sp1 ) ) {
/* LOG::LogFailure( message:'tic catch did not get 3' ) */
XTUML_OAL_STMT_TRACE( 2, "LOG::LogFailure( message:'tic catch did not get 3' )" );
c1_LOG_LogFailure( "tic catch did not get 3" );
LOG_LogFailure( "tic catch did not get 3" );
}
else {
i_t r;
Expand All @@ -42,7 +44,7 @@ c1_catch_s1( i_t p_sp1)
if ( ( 3 != r ) ) {
/* LOG::LogFailure( message:'tic catch did not get 3 returned from lase' ) */
XTUML_OAL_STMT_TRACE( 3, "LOG::LogFailure( message:'tic catch did not get 3 returned from lase' )" );
c1_LOG_LogFailure( "tic catch did not get 3 returned from lase" );
LOG_LogFailure( "tic catch did not get 3 returned from lase" );
}
}
}
Expand All @@ -55,6 +57,7 @@ c1_catch_s1( i_t p_sp1)
void
c1_catch_s2()
{
COMP_MSG_START_TRACE( "", c1_DOMAIN_ID, 0, 1 );
c_t s[ESCHER_SYS_MAX_STRING_LEN]; i_t r;
/* ASSIGN s = 'tic catch s2' */
XTUML_OAL_STMT_TRACE( 1, "ASSIGN s = 'tic catch s2'" );
Expand All @@ -72,19 +75,20 @@ c1_catch_s2()
i_t
c1_burn_o2( i_t p_op2)
{
COMP_MSG_START_TRACE( "%d", c1_DOMAIN_ID, 1, 0, p_op2 );
c_t s[ESCHER_SYS_MAX_STRING_LEN];
/* ASSIGN s = 'tic burn' */
XTUML_OAL_STMT_TRACE( 1, "ASSIGN s = 'tic burn'" );
Escher_strcpy( s, "tic burn" );
/* LOG::LogInfo( message:s ) */
XTUML_OAL_STMT_TRACE( 1, "LOG::LogInfo( message:s )" );
c1_LOG_LogInfo( s );
LOG_LogInfo( s );
/* IF ( ( 3 != PARAM.op2 ) ) */
XTUML_OAL_STMT_TRACE( 1, "IF ( ( 3 != PARAM.op2 ) )" );
if ( ( 3 != p_op2 ) ) {
/* LOG::LogFailure( message:'tic burn did not get 3' ) */
XTUML_OAL_STMT_TRACE( 2, "LOG::LogFailure( message:'tic burn did not get 3' )" );
c1_LOG_LogFailure( "tic burn did not get 3" );
LOG_LogFailure( "tic burn did not get 3" );
}
else {
/* SEND toss::s1(sp1:1) */
Expand All @@ -104,6 +108,7 @@ c1_burn_o2( i_t p_op2)
void
c1_burn_o3()
{
COMP_MSG_START_TRACE( "", c1_DOMAIN_ID, 1, 1 );
c_t s[ESCHER_SYS_MAX_STRING_LEN];
/* ASSIGN s = 'tic burn o3' */
XTUML_OAL_STMT_TRACE( 1, "ASSIGN s = 'tic burn o3'" );
Expand All @@ -121,6 +126,7 @@ c1_burn_o3()
i_t
c1_burn_o4()
{
COMP_MSG_START_TRACE( "", c1_DOMAIN_ID, 1, 2 );
c_t s[ESCHER_SYS_MAX_STRING_LEN];
/* ASSIGN s = 'tic.burn::o4' */
XTUML_OAL_STMT_TRACE( 1, "ASSIGN s = 'tic.burn::o4'" );
Expand All @@ -138,6 +144,7 @@ c1_burn_o4()
void
c1_toss_s1( i_t p_sp1)
{
COMP_MSG_START_TRACE( "%d", c1_DOMAIN_ID, 2, 0, p_sp1 );
c2_catch_s1( p_sp1 );
}

Expand All @@ -149,6 +156,7 @@ c1_toss_s1( i_t p_sp1)
void
c1_toss_s2()
{
COMP_MSG_START_TRACE( "", c1_DOMAIN_ID, 2, 1 );
c2_catch_s2();
}

Expand All @@ -160,6 +168,7 @@ c1_toss_s2()
i_t
c1_lase_o2( i_t p_op2)
{
COMP_MSG_START_TRACE( "%d", c1_DOMAIN_ID, 3, 0, p_op2 );
return c3_burn_o2( p_op2 );
}

Expand All @@ -171,6 +180,7 @@ return c3_burn_o2( p_op2 );
void
c1_lase_o3()
{
COMP_MSG_START_TRACE( "", c1_DOMAIN_ID, 3, 1 );
c3_burn_o3();
}

Expand All @@ -182,6 +192,7 @@ c1_lase_o3()
i_t
c1_lase_o4()
{
COMP_MSG_START_TRACE( "", c1_DOMAIN_ID, 3, 2 );
return c3_burn_o4();
}

Expand Down
3 changes: 2 additions & 1 deletion VandMC_testing/ttt/src/c1_classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ extern void c1_test( void );



#include "c1_LOG_bridge.h"
#include "ARCH_bridge.h"
#include "LOG_bridge.h"
#include "c1.h"


Expand Down
Loading

0 comments on commit a85b0e4

Please sign in to comment.