J'ai déjà posé une question hier concernant ce sujet et je suis bloqué en ce moment au niveau du fichier géneré par le logiciel de modelisation Esterel Studio.
voici ci-dessous les fichiers .cpp et .h génerés
/* ssccpp : C++ FILE OF SORTED EQUATIONS Tic_Acc - INLINE MODE */
#include "Impl_Log_class.h"
/* ACTIONS */
/* PREDEFINED ACTIONS */
/* PRESENT SIGNAL TESTS */
#define A1 \
V0
/* OUTPUT ACTIONS */
#define A2 \
O_ACC()
/* ASSIGNMENTS */
#define A3 \
V0 = _false
/* PROCEDURE CALLS */
/* CONDITIONS */
/* DECREMENTS */
/* START ACTIONS */
/* KILL ACTIONS */
/* SUSPEND ACTIONS */
/* ACTIVATE ACTIONS */
/* WRITE ARGS ACTIONS */
/* RESET ACTIONS */
/* ACTION SEQUENCES */
/* INITIALIZED CONSTANTS */
/* CLASS CONSTRUCTOR */
Tic_Acc::Tic_Acc () {
reset ();
}
/* CLASS DESTRUCTOR */
Tic_Acc::~Tic_Acc () {
}
/* INPUT FUNCTIONS */
void Tic_Acc::I_TIC () {
V0 = _true;
}
/* FUNCTIONS RETURNING NUMBER OF EXEC */
int Tic_Acc::number_of_exec () {
return (0);
}
/* AUTOMATON (STATE ACTION-TREES) */
void Tic_Acc::_reset_input () {
V0 = _false;
}
/* AUTOMATON ENGINE */
int Tic_Acc::run () {
/* AUXILIARY VARIABLES */
char E[6];
E[0] = R[1]&&!(R[0]);
E[1] = E[0]&&(
#ifdef TRACE_ACTION
fprintf(stderr, "test 1\n"),
#endif
A1);
if (E[1]) {
A2;
#ifdef TRACE_ACTION
fprintf(stderr, "A2\n");
#endif
}
E[2] = !(_true);
E[0] = E[0]&&!((
#ifdef TRACE_ACTION
fprintf(stderr, "test 1\n"),
#endif
A1));
E[0] = R[0]||(R[1]&&E[0]);
E[3] = E[1]||(R[2]&&!(R[0]));
E[4] = E[0]||E[3];
E[5] = R[1]||R[2];
R[0] = !(_true);
R[1] = E[0];
R[2] = E[3];
_reset_input();
return E[4];
}
/* AUTOMATON RESET */
int Tic_Acc::reset () {
R[0] = _true;
R[1] = _false;
R[2] = _false;
_reset_input();
return 0;
}
//Voici le fichier .h
///////////////////////////////////////////////////////////////
#ifndef __Tic_Acc_H__
#define __Tic_Acc_H__
/* ssccpp : C++ HEADER FILE OF SORTED EQUATIONS Tic_Acc - INLINE MODE */
/* AUXILIARY DECLARATIONS */
#ifndef STRLEN
#define STRLEN 81
#endif
#define _COND(A,B,C) ((A)?(B):(C))
#ifdef TRACE_ACTION
#ifndef ECL_DEFINITIONS
#include <stdio.h>
#endif
#endif
#ifndef NULL
#define NULL ((char*)0)
#endif
#include <string.h>
#ifndef __EXEC_STATUS_H_LOADED
#define __EXEC_STATUS_H_LOADED
typedef struct {
unsigned int start:1;
unsigned int kill:1;
unsigned int active:1;
unsigned int suspended:1;
unsigned int prev_active:1;
unsigned int prev_suspended:1;
unsigned int exec_index;
unsigned int task_exec_index;
void (*pStart)();
void (*pRet)();
} __ExecStatus;
#endif
#define __ResetExecStatus(status) {\
status.prev_active = status.active; \
status.prev_suspended = status.suspended; \
status.start = status.kill = status.active = status.suspended = 0; }
#define __DSZ(V) (--(V)<=0)
# define __SENSOR_VAL(t,v,a) _COND(t,v,(t=_true,a,v))
#define BASIC_TYPES_DEFINED
//typedef int boolean;
typedef int integer;
typedef char* string;
#define _true 1
#define _false 0
#define GENERIC_TEST(TEST) return TEST;
typedef void (APF)();
/* EXTERN DECLARATIONS */
#ifndef _NO_EXTERN_DEFINITIONS
#endif
class Tic_Acc {
public :
/* INITIALIZED CONSTANTS */
protected :
/* MEMORY ALLOCATION */
//boolean V0;
int V0;
/* REGISTER VARIABLES */
char R[3];
/* AUTOMATON (STATE ACTION-TREES) */
void _reset_input ();
public :
/* CLASS CONSTRUCTOR */
Tic_Acc ();
/* CLASS DESTRUCTOR */
virtual ~Tic_Acc ();
/* INPUT FUNCTIONS */
void I_TIC ();
/* OUTPUTS FUNCTIONS */
virtual void O_ACC();
/* SENSORS FUNCTIONS */
/* FUNCTIONS RETURNING NUMBER OF EXEC */
int number_of_exec ();
/* AUTOMATON ENGINE */
int run ();
/* AUTOMATON RESET */
int reset ();
};
#endif
///////////////////////////////////////////////////////////////////////
Quand je compile, je reçois 3 erreures dont celle-ci
unresolved external symbol..
+ un problème au niveau d'une librairie LIBCD.lib
En vous remerçiant d'avance, passez une bonne journée!!
haffa