Commit a5f71b1a authored by Botond Baranyi's avatar Botond Baranyi
Browse files

Implemented timestamp redirect (incoming events only) for real-time TTCN-3 (bug 539514)



Change-Id: I92c4fc164a68023a5717c5c6d5365cb096f5a3b7
Signed-off-by: Botond Baranyi's avatarBotond Baranyi <botond.baranyi@ericsson.com>
parent be2f307d
......@@ -802,6 +802,7 @@ namespace Common {
{"noblock__", "noblock", "noblock_"},
{"none__", "none", "none_"},
{"not4b__", "not4b", "not4b_"},
{"now__", "now", "now_"},
{"nowait__", "nowait", "nowait_"},
{"null__", "null", "null_"},
{"objid__", "objid", "objid_"},
......@@ -821,6 +822,7 @@ namespace Common {
{"procedure__", "procedure", "procedure_"},
{"raise__", "raise", "raise_"},
{"read__", "read", "read_"},
{"realtime__", "realtime", "realtime_"},
{"receive__", "receive", "receive_"},
{"record__", "record", "record_"},
{"recursive__", "recursive", "recursive_"},
......@@ -844,6 +846,7 @@ namespace Common {
{"testcase__", "testcase", "testcase_"},
{"timeout__", "timeout", "timeout_"},
{"timer__", "timer", "timer_"},
{"timestamp__", "timestamp", "timestamp_"},
{"to__", "to", "to_"},
{"trigger__", "trigger", "trigger_"},
{"type__", "type", "type_"},
......
......@@ -612,6 +612,7 @@ namespace Ttcn {
delete port_op.r.redirect.value;
delete port_op.r.redirect.sender;
delete port_op.r.redirect.index;
delete port_op.r.redirect.timestamp;
break;
case S_GETCALL:
case S_CHECK_GETCALL:
......@@ -621,6 +622,7 @@ namespace Ttcn {
delete port_op.r.redirect.param;
delete port_op.r.redirect.sender;
delete port_op.r.redirect.index;
delete port_op.r.redirect.timestamp;
break;
case S_GETREPLY:
case S_CHECK_GETREPLY:
......@@ -632,6 +634,7 @@ namespace Ttcn {
delete port_op.r.redirect.param;
delete port_op.r.redirect.sender;
delete port_op.r.redirect.index;
delete port_op.r.redirect.timestamp;
break;
case S_CATCH:
case S_CHECK_CATCH:
......@@ -642,12 +645,14 @@ namespace Ttcn {
delete port_op.r.redirect.value;
delete port_op.r.redirect.sender;
delete port_op.r.redirect.index;
delete port_op.r.redirect.timestamp;
break;
case S_CHECK:
delete port_op.portref;
delete port_op.r.fromclause;
delete port_op.r.redirect.sender;
delete port_op.r.redirect.index;
delete port_op.r.redirect.timestamp;
break;
case S_CLEAR:
case S_START_PORT:
......@@ -1170,7 +1175,8 @@ namespace Ttcn {
TemplateInstance *p_templinst,
TemplateInstance *p_fromclause,
ValueRedirect *p_redirectval, Reference *p_redirectsender,
Reference* p_redirectindex, bool p_translate)
Reference* p_redirectindex, Reference* p_timestamp_redirect,
bool p_translate)
: statementtype(p_st), my_sb(0)
{
switch(statementtype) {
......@@ -1186,6 +1192,7 @@ namespace Ttcn {
port_op.r.redirect.param=0;
port_op.r.redirect.sender=p_redirectsender;
port_op.r.redirect.index = p_redirectindex;
port_op.r.redirect.timestamp = p_timestamp_redirect;
break;
default:
FATAL_ERROR("Statement::Statement()");
......@@ -1197,7 +1204,8 @@ namespace Ttcn {
TemplateInstance *p_fromclause,
ParamRedirect *p_redirectparam,
Reference *p_redirectsender,
Reference* p_redirectindex)
Reference* p_redirectindex,
Reference* p_timestamp_redirect)
: statementtype(p_st), my_sb(0)
{
switch(statementtype) {
......@@ -1211,6 +1219,7 @@ namespace Ttcn {
port_op.r.redirect.param=p_redirectparam;
port_op.r.redirect.sender=p_redirectsender;
port_op.r.redirect.index = p_redirectindex;
port_op.r.redirect.timestamp = p_timestamp_redirect;
break;
default:
FATAL_ERROR("Statement::Statement()");
......@@ -1222,7 +1231,8 @@ namespace Ttcn {
TemplateInstance *p_valuematch,
TemplateInstance *p_fromclause,
ValueRedirect *p_redirectval, ParamRedirect *p_redirectparam,
Reference *p_redirectsender, Reference* p_redirectindex)
Reference *p_redirectsender, Reference* p_redirectindex,
Reference* p_timestamp_redirect)
: statementtype(p_st), my_sb(0)
{
switch(statementtype) {
......@@ -1238,6 +1248,7 @@ namespace Ttcn {
port_op.r.redirect.param=p_redirectparam;
port_op.r.redirect.sender=p_redirectsender;
port_op.r.redirect.index = p_redirectindex;
port_op.r.redirect.timestamp = p_timestamp_redirect;
break;
default:
FATAL_ERROR("Statement::Statement()");
......@@ -1248,7 +1259,7 @@ namespace Ttcn {
Reference *p_sig, TemplateInstance *p_templinst,
bool p_timeout, TemplateInstance *p_fromclause,
ValueRedirect *p_redirectval, Reference *p_redirectsender,
Reference* p_redirectindex)
Reference* p_redirectindex, Reference* p_timestamp_redirect)
: statementtype(p_st), my_sb(0)
{
switch(statementtype) {
......@@ -1270,6 +1281,7 @@ namespace Ttcn {
port_op.r.redirect.param=0;
port_op.r.redirect.sender=p_redirectsender;
port_op.r.redirect.index = p_redirectindex;
port_op.r.redirect.timestamp = p_timestamp_redirect;
break;
default:
FATAL_ERROR("Statement::Statement()");
......@@ -1278,7 +1290,8 @@ namespace Ttcn {
Statement::Statement(statementtype_t p_st, Reference *p_ref, bool p_anyfrom,
TemplateInstance *p_fromclause,
Reference *p_redirectsender, Reference* p_redirectindex)
Reference *p_redirectsender, Reference* p_redirectindex,
Reference* p_timestamp_redirect)
: statementtype(p_st), my_sb(0)
{
switch(statementtype) {
......@@ -1290,6 +1303,7 @@ namespace Ttcn {
port_op.r.redirect.param=0;
port_op.r.redirect.sender=p_redirectsender;
port_op.r.redirect.index = p_redirectindex;
port_op.r.redirect.timestamp = p_timestamp_redirect;
break;
default:
FATAL_ERROR("Statement::Statement()");
......@@ -1838,6 +1852,9 @@ namespace Ttcn {
if (port_op.r.redirect.index != NULL) {
port_op.r.redirect.index->set_my_scope(p_scope);
}
if (port_op.r.redirect.timestamp != NULL) {
port_op.r.redirect.timestamp->set_my_scope(p_scope);
}
break;
case S_GETCALL:
case S_CHECK_GETCALL:
......@@ -1851,6 +1868,9 @@ namespace Ttcn {
if (port_op.r.redirect.index != NULL) {
port_op.r.redirect.index->set_my_scope(p_scope);
}
if (port_op.r.redirect.timestamp != NULL) {
port_op.r.redirect.timestamp->set_my_scope(p_scope);
}
break;
case S_GETREPLY:
case S_CHECK_GETREPLY:
......@@ -1868,6 +1888,9 @@ namespace Ttcn {
if (port_op.r.redirect.index != NULL) {
port_op.r.redirect.index->set_my_scope(p_scope);
}
if (port_op.r.redirect.timestamp != NULL) {
port_op.r.redirect.timestamp->set_my_scope(p_scope);
}
break;
case S_CATCH:
case S_CHECK_CATCH:
......@@ -1883,6 +1906,9 @@ namespace Ttcn {
if (port_op.r.redirect.index != NULL) {
port_op.r.redirect.index->set_my_scope(p_scope);
}
if (port_op.r.redirect.timestamp != NULL) {
port_op.r.redirect.timestamp->set_my_scope(p_scope);
}
break;
case S_CHECK:
if(port_op.portref) port_op.portref->set_my_scope(p_scope);
......@@ -1892,6 +1918,9 @@ namespace Ttcn {
if (port_op.r.redirect.index != NULL) {
port_op.r.redirect.index->set_my_scope(p_scope);
}
if (port_op.r.redirect.timestamp != NULL) {
port_op.r.redirect.timestamp->set_my_scope(p_scope);
}
break;
case S_CLEAR:
case S_START_PORT:
......@@ -2122,6 +2151,9 @@ namespace Ttcn {
if (port_op.r.redirect.index != NULL) {
port_op.r.redirect.index->set_fullname(p_fullname+".redirindex");
}
if (port_op.r.redirect.timestamp != NULL) {
port_op.r.redirect.timestamp->set_fullname(p_fullname+".redirtimestamp");
}
break;
case S_GETCALL:
case S_CHECK_GETCALL:
......@@ -2137,6 +2169,9 @@ namespace Ttcn {
if (port_op.r.redirect.index != NULL) {
port_op.r.redirect.index->set_fullname(p_fullname+".redirindex");
}
if (port_op.r.redirect.timestamp != NULL) {
port_op.r.redirect.timestamp->set_fullname(p_fullname+".redirtimestamp");
}
break;
case S_GETREPLY:
case S_CHECK_GETREPLY:
......@@ -2156,6 +2191,9 @@ namespace Ttcn {
if (port_op.r.redirect.index != NULL) {
port_op.r.redirect.index->set_fullname(p_fullname+".redirindex");
}
if (port_op.r.redirect.timestamp != NULL) {
port_op.r.redirect.timestamp->set_fullname(p_fullname+".redirtimestamp");
}
break;
case S_CATCH:
case S_CHECK_CATCH:
......@@ -2173,6 +2211,9 @@ namespace Ttcn {
if (port_op.r.redirect.index != NULL) {
port_op.r.redirect.index->set_fullname(p_fullname+".redirindex");
}
if (port_op.r.redirect.timestamp != NULL) {
port_op.r.redirect.timestamp->set_fullname(p_fullname+".redirtimestamp");
}
break;
case S_CHECK:
if(port_op.portref) port_op.portref->set_fullname(p_fullname+".portref");
......@@ -2183,6 +2224,9 @@ namespace Ttcn {
if (port_op.r.redirect.index != NULL) {
port_op.r.redirect.index->set_fullname(p_fullname+".redirindex");
}
if (port_op.r.redirect.timestamp != NULL) {
port_op.r.redirect.timestamp->set_fullname(p_fullname+".redirtimestamp");
}
break;
case S_CLEAR:
case S_START_PORT:
......@@ -4089,6 +4133,7 @@ error:
chk_index_redirect(port_op.r.redirect.index,
t_ass != NULL ? t_ass->get_Dimensions() : NULL, port_op.anyfrom, "port");
}
chk_timestamp_redirect(port_type);
// checking deterministic
if (port_op.r.rcvpar) {
......@@ -4203,6 +4248,7 @@ error:
chk_index_redirect(port_op.r.redirect.index,
t_ass != NULL ? t_ass->get_Dimensions() : NULL, port_op.anyfrom, "port");
}
chk_timestamp_redirect(port_type);
}
void Statement::chk_getreply()
......@@ -4359,6 +4405,7 @@ error:
chk_index_redirect(port_op.r.redirect.index,
t_ass != NULL ? t_ass->get_Dimensions() : NULL, port_op.anyfrom, "port");
}
chk_timestamp_redirect(port_type);
}
void Statement::chk_catch()
......@@ -4555,6 +4602,7 @@ error:
chk_index_redirect(port_op.r.redirect.index,
t_ass != NULL ? t_ass->get_Dimensions() : NULL, port_op.anyfrom, "port");
}
chk_timestamp_redirect(port_type);
}
void Statement::chk_check()
......@@ -4574,6 +4622,7 @@ error:
chk_index_redirect(port_op.r.redirect.index,
t_ass != NULL ? t_ass->get_Dimensions() : NULL, port_op.anyfrom, "port");
}
chk_timestamp_redirect(port_type);
}
void Statement::chk_clear()
......@@ -5573,6 +5622,26 @@ error:
}
return t_var_type;
}
void Statement::chk_timestamp_redirect(Type* port_type)
{
if (port_op.r.redirect.timestamp == NULL) {
return;
}
if (port_type != NULL && !port_type->get_PortBody()->is_realtime()) {
port_op.r.redirect.timestamp->error("The timestamp cannot be redirected, "
"because port type `%s' does not have the 'realtime' clause",
port_type->get_typename().c_str());
}
Type* t_var_type = port_op.r.redirect.timestamp->chk_variable_ref();
if (t_var_type != NULL &&
t_var_type->get_type_refd_last()->get_typetype() != Type::T_REAL) {
port_op.r.redirect.timestamp->error("The type of the variable should be "
"float instead of `%s'", t_var_type->get_typename().c_str());
}
}
Type *Statement::chk_signature_ref(Reference *p_ref)
{
......@@ -6001,6 +6070,9 @@ error:
if (port_op.r.redirect.index != NULL) {
port_op.r.redirect.index->set_code_section(p_code_section);
}
if (port_op.r.redirect.timestamp != NULL) {
port_op.r.redirect.timestamp->set_code_section(p_code_section);
}
break;
case S_GETCALL:
case S_CHECK_GETCALL:
......@@ -6015,6 +6087,9 @@ error:
if (port_op.r.redirect.index != NULL) {
port_op.r.redirect.index->set_code_section(p_code_section);
}
if (port_op.r.redirect.timestamp != NULL) {
port_op.r.redirect.timestamp->set_code_section(p_code_section);
}
break;
case S_GETREPLY:
case S_CHECK_GETREPLY:
......@@ -6033,6 +6108,9 @@ error:
if (port_op.r.redirect.index != NULL) {
port_op.r.redirect.index->set_code_section(p_code_section);
}
if (port_op.r.redirect.timestamp != NULL) {
port_op.r.redirect.timestamp->set_code_section(p_code_section);
}
break;
case S_CATCH:
case S_CHECK_CATCH:
......@@ -6047,6 +6125,9 @@ error:
if (port_op.r.redirect.index != NULL) {
port_op.r.redirect.index->set_code_section(p_code_section);
}
if (port_op.r.redirect.timestamp != NULL) {
port_op.r.redirect.timestamp->set_code_section(p_code_section);
}
break;
case S_CHECK:
if (port_op.portref) port_op.portref->set_code_section(p_code_section);
......@@ -6057,6 +6138,9 @@ error:
if (port_op.r.redirect.index != NULL) {
port_op.r.redirect.index->set_code_section(p_code_section);
}
if (port_op.r.redirect.timestamp != NULL) {
port_op.r.redirect.timestamp->set_code_section(p_code_section);
}
break;
case S_CLEAR:
case S_START_PORT:
......@@ -7911,6 +7995,8 @@ error:
generate_code_expr_fromclause(expr);
expr->expr = mputstr(expr->expr, ", ");
generate_code_expr_senderredirect(expr);
expr->expr = mputstr(expr->expr, ", ");
generate_code_expr_timestamp_redirect(expr);
if (port_op.portref || port_op.translate) {
expr->expr = mputstr(expr->expr, ", ");
if (port_op.r.redirect.index != NULL) {
......@@ -7964,6 +8050,8 @@ error:
generate_code_expr_senderredirect(expr);
}
expr->expr = mputstr(expr->expr, ", ");
generate_code_expr_timestamp_redirect(expr);
expr->expr = mputstr(expr->expr, ", ");
if (port_op.r.redirect.index != NULL) {
generate_code_index_redirect(expr, port_op.r.redirect.index, my_sb);
}
......@@ -7976,6 +8064,8 @@ error:
generate_code_expr_fromclause(expr);
expr->expr = mputstr(expr->expr, ", ");
generate_code_expr_senderredirect(expr);
expr->expr = mputstr(expr->expr, ", ");
generate_code_expr_timestamp_redirect(expr);
}
expr->expr=mputc(expr->expr, ')');
}
......@@ -8047,6 +8137,8 @@ error:
generate_code_expr_senderredirect(expr);
}
expr->expr = mputstr(expr->expr, ", ");
generate_code_expr_timestamp_redirect(expr);
expr->expr = mputstr(expr->expr, ", ");
if (port_op.r.redirect.index != NULL) {
generate_code_index_redirect(expr, port_op.r.redirect.index, my_sb);
}
......@@ -8059,6 +8151,8 @@ error:
generate_code_expr_fromclause(expr);
expr->expr = mputstr(expr->expr, ", ");
generate_code_expr_senderredirect(expr);
expr->expr = mputstr(expr->expr, ", ");
generate_code_expr_timestamp_redirect(expr);
}
expr->expr = mputc(expr->expr, ')');
}
......@@ -8097,6 +8191,8 @@ error:
generate_code_expr_fromclause(expr);
expr->expr = mputstr(expr->expr, ", ");
generate_code_expr_senderredirect(expr);
expr->expr = mputstr(expr->expr, ", ");
generate_code_expr_timestamp_redirect(expr);
if (port_op.portref) {
expr->expr = mputstr(expr->expr, ", ");
if (port_op.r.redirect.index != NULL) {
......@@ -8123,6 +8219,8 @@ error:
generate_code_expr_fromclause(expr);
expr->expr = mputstr(expr->expr, ", ");
generate_code_expr_senderredirect(expr);
expr->expr = mputstr(expr->expr, ", ");
generate_code_expr_timestamp_redirect(expr);
if (port_op.portref) {
expr->expr = mputstr(expr->expr, ", ");
if (port_op.r.redirect.index != NULL) {
......@@ -8286,6 +8384,18 @@ error:
expr->expr = mputc(expr->expr, ')');
} else expr->expr = mputstr(expr->expr, "NULL");
}
void Statement::generate_code_expr_timestamp_redirect(expression_struct* expr)
{
if (port_op.r.redirect.timestamp != NULL) {
expr->expr = mputstr(expr->expr, "&(");
port_op.r.redirect.timestamp->generate_code(expr);
expr->expr = mputstr(expr->expr, ")");
}
else {
expr->expr = mputstr(expr->expr, "NULL");
}
}
void Statement::generate_code_portref(expression_struct *expr,
Reference *p_ref)
......
......@@ -317,6 +317,7 @@ namespace Ttcn {
ParamRedirect *param;
Reference *sender;
Reference* index;
Reference* timestamp;
} redirect;
union {
TemplateInstance *getreply_valuematch;
......@@ -567,31 +568,33 @@ namespace Ttcn {
Statement(statementtype_t p_st, Reference *p_ref, bool p_anyfrom,
TemplateInstance *p_templinst, TemplateInstance *p_fromclause,
ValueRedirect *p_redirectval, Reference *p_redirectsender,
Reference* p_redirectindex, bool p_translate);
Reference* p_redirectindex, Reference* p_timestamp_redirect,
bool p_translate);
/** Constructor used by S_GETCALL and S_CHECK_GETCALL. p_ref==0
* means any port. */
Statement(statementtype_t p_st, Reference *p_ref, bool p_anyfrom,
TemplateInstance *p_templinst, TemplateInstance *p_fromclause,
ParamRedirect *p_redirectparam, Reference *p_redirectsender,
Reference* p_redirectindex);
Reference* p_redirectindex, Reference* p_timestamp_redirect);
/** Constructor used by S_GETREPLY and S_CHECK_GETREPLY. p_ref==0
* means any port. */
Statement(statementtype_t p_st, Reference *p_ref, bool p_anyfrom,
TemplateInstance *p_templinst, TemplateInstance *p_valuematch,
TemplateInstance *p_fromclause,
ValueRedirect *p_redirectval, ParamRedirect *p_redirectparam,
Reference *p_redirectsender, Reference* p_redirectindex);
Reference *p_redirectsender, Reference* p_redirectindex,
Reference* p_timestamp_redirect);
/** Constructor used by S_CATCH and S_CHECK_CATCH. p_ref==0 means
* any port. */
Statement(statementtype_t p_st, Reference *p_ref, bool p_anyfrom,
Reference *p_sig, TemplateInstance *p_templinst,
bool p_timeout, TemplateInstance *p_fromclause,
ValueRedirect *p_redirectval, Reference *p_redirectsender,
Reference* p_redirectindex);
Reference* p_redirectindex, Reference* p_timestamp_redirect);
/** Constructor used by S_CHECK. p_ref==0 means any port. */
Statement(statementtype_t p_st, Reference *p_ref, bool p_anyfrom,
TemplateInstance *p_fromclause, Reference *p_redirectsender,
Reference* p_redirectindex);
Reference* p_redirectindex, Reference* p_timestamp_redirect);
/** Constructor used by S_CLEAR, S_START_PORT and S_STOP_PORT.
* p_ref==0 means all port. S_STOP_TIMER (p_ref==0: all timer). */
Statement(statementtype_t p_st, Reference *p_ref);
......@@ -781,6 +784,7 @@ namespace Ttcn {
/** Checks whether \a p_ref points to a signature. The type
* describing the respective signature is returned or NULL in
* case of error. */
void chk_timestamp_redirect(Type* port_type);
static Type *chk_signature_ref(Reference *p_ref);
/** Checks whether \a p_ref points to a timer, timer parameter or timer array.
* If \a p_ref refers to a timer array the array indices within
......@@ -902,6 +906,7 @@ namespace Ttcn {
void generate_code_expr_sendpar(expression_struct *expr);
void generate_code_expr_fromclause(expression_struct *expr);
void generate_code_expr_senderredirect(expression_struct *expr);
void generate_code_expr_timestamp_redirect(expression_struct* expr);
/** Creates the string equivalent of port reference \a p_ref and
* appends it to \a expr->expr. Used in configuration operations
* when the component type cannot be determined from the
......
......@@ -1034,7 +1034,8 @@ namespace Ttcn {
PortTypeBody::PortTypeBody(PortOperationMode_t p_operation_mode,
Types *p_in_list, Types *p_out_list, Types *p_inout_list,
bool p_in_all, bool p_out_all, bool p_inout_all, Definitions *defs)
bool p_in_all, bool p_out_all, bool p_inout_all, Definitions *defs,
bool p_realtime)
: Node(), Location(), my_type(0), operation_mode(p_operation_mode),
in_list(p_in_list), out_list(p_out_list), inout_list(p_inout_list),
in_all(p_in_all), out_all(p_out_all), inout_all(p_inout_all),
......@@ -1042,7 +1043,7 @@ namespace Ttcn {
in_msgs(0), out_msgs(0), in_sigs(0), out_sigs(0),
testport_type(TP_REGULAR), port_type(PT_REGULAR),
provider_refs(), provider_types(), mapper_types(),
in_mappings(0), out_mappings(0), vardefs(defs)
in_mappings(0), out_mappings(0), vardefs(defs), realtime(p_realtime)
{
}
......@@ -2121,6 +2122,7 @@ namespace Ttcn {
port_def pdef;
memset(&pdef, 0, sizeof(pdef));
pdef.legacy = legacy;
pdef.realtime = realtime;
const string& t_genname = my_type->get_genname_own();
pdef.name = t_genname.c_str();
pdef.dispname = my_type->get_fullname().c_str();
......
......@@ -406,6 +406,7 @@ private:
///< only for PT_USER && !legacy
TypeMappings *in_mappings, *out_mappings; ///< mappings for PT_USER
Definitions *vardefs; ///< variable definitions inside the port
bool realtime;
/** Copy constructor not implemented */
PortTypeBody(const PortTypeBody& p);
/** Assignment disabled */
......@@ -413,7 +414,8 @@ private:
public:
PortTypeBody(PortOperationMode_t p_operation_mode,
Types *p_in_list, Types *p_out_list, Types *p_inout_list,
bool p_in_all, bool p_out_all, bool p_inout_all, Definitions *defs);
bool p_in_all, bool p_out_all, bool p_inout_all, Definitions *defs,
bool p_realtime);
~PortTypeBody();
virtual PortTypeBody *clone() const;
virtual void set_fullname(const string& p_fullname);
......@@ -425,6 +427,7 @@ public:
TypeSet *get_in_sigs() const;
TypeSet *get_out_sigs() const;
Definitions *get_vardefs() const;
bool is_realtime() const { return realtime; }
bool has_queue() const;
bool getreply_allowed() const;
bool catch_allowed() const;
......
......@@ -475,6 +475,7 @@ procedure RETURN(ProcedureKeyword);
public RETURN(PublicKeyword);
raise RETURN_DOT(RaiseKeyword);
read RETURN_DOT(ReadKeyword);
realtime RETURN(RealtimeKeyword);
receive RETURN_DOT(ReceiveOpKeyword);
record RETURN(RecordKeyword);
recursive RETURN(RecursiveKeyword);
......@@ -501,6 +502,7 @@ system RETURN(SystemKeyword);
template RETURN(TemplateKeyword);
testcase RETURN(TestcaseKeyword);
timeout RETURN_DOT(TimeoutKeyword);
timestamp RETURN(TimestampKeyword);
timer RETURN(TimerKeyword);
to RETURN(ToKeyword);
trigger RETURN_DOT(TriggerOpKeyword);
......
This diff is collapsed.
This diff is collapsed.
......@@ -124,6 +124,7 @@ typedef struct port_def_tag {
char *var_defs;
char *mapping_func_decls;
char *mapping_func_defs;
boolean realtime;
} port_def;
#ifdef __cplusplus
......
......@@ -29,6 +29,7 @@
#include "Optional.hh"
#include "Parameters.h"
#include "Integer.hh"
#include "Float.hh"
#include "Struct_of.hh"
#include "memory.h"
#include "Component.hh"
......@@ -225,7 +226,8 @@ public:
// alt-status priority: ALT_YES (return immediately) > ALT_REPEAT > ALT_MAYBE > ALT_NO
alt_status receive(const COMPONENT_template& sender_template,
COMPONENT *sender_ptr, Index_Redirect* index_redirect)
COMPONENT *sender_ptr, FLOAT* timestamp_redirect,
Index_Redirect* index_redirect)
{
if (index_redirect != NULL) {
index_redirect->incr_pos();
......@@ -233,7 +235,7 @@ public:
alt_status result = ALT_NO;
for (unsigned int i = 0; i < array_size; ++i) {
alt_status ret_val = array_elements[i].receive(sender_template,
sender_ptr, index_redirect);
sender_ptr, timestamp_redirect, index_redirect);
if (ret_val == ALT_YES) {
if (index_redirect != NULL) {
index_redirect->add_index((int)i + index_offset);
......@@ -261,7 +263,8 @@ public:
// if it's NULL, so a separate function is needed for this case in RT1
alt_status receive(const T_template& value_template, int /* NULL */,
const COMPONENT_template& sender_template,
COMPONENT* sender_ptr, Index_Redirect* index_redirect)
COMPONENT* sender_ptr, FLOAT* timestamp_redirect,
Index_Redirect* index_redirect)
{
if (index_redirect != NULL) {
index_redirect->incr_pos();
......@@ -269,7 +272,7 @@ public: