Hi
all,
I
am working with C and I saw the following “problem”:
If
an Actor has an Attribute like:
Structure {
external Port
ControlPort
SAP
timer: PTimer
Attribute
id: uint16
Attribute data:MyDataClass
And
a receiving message has a parameter (which is defined in the
protocol) like:
ProtocolClass
PButtonController {
incoming {
Message setId(data: uint16)
}
outgoing {
Message pressed()
The
C Code generator produces the following output:
/*
Action Codes */
static void action_TRANS_tr0_FROM_waitForId_TO_released_BY_setIdControlPort(ButtonController*
self, InterfaceItemBase
ifitem, uint16
data) {
self->id=self->data;
PTimerConjPort_startTimeout(&self->constData->timer,
50);
}
In
this case „data“ will be interpreted as the Attribute and
you can never access the parameter which is sent to actor.
This
is not a major problem but could be avoided by defining a
keyword for the parameter which is sent via a message. In
this case it would no longer be necessary (possible) to
define your own name for a message data. You would access
the received data always via the defined keyword (which is
nothing more than a fixed name for the message data).
The
problem with the current solution is that you may use the
same Protocol class at several ActorClasses.
Can
we solve this by using the action language???
If
not, do you think we should change that??
Best
Regards
Thomas
Thomas
Jung,
Senior Developer Embedded Systems
Tieto
ES GmbH,
email thomas.jung@xxxxxxxxxxx,
Telefon +49 89 78 722 352, Mobil +49 160 90 77 23 61,
Schertlinstraße 8, 81379 München
Tieto ES GmbH, Schertlinstraße 8, 81379 München
Geschäftsführung:
Olaf Dicker, Willem Huisman
Sitz
der Gesellschaft: München, Amtsgericht München HRB 188002
Wichtiger
Hinweis: Diese E-Mail und etwaige Anlagen können Betriebs-
oder Geschäftsgeheimnisse, dem Anwaltsgeheimnis
unterliegende oder sonstige vertrauliche Informationen
enthalten. Sollten Sie diese E-Mail irrtümlich erhalten
haben, ist Ihnen der Status dieser E-Mail bekannt. Bitte
benachrichtigen Sie uns in diesem Fall sofort durch
Antwort-Mail und löschen Sie diese E-Mail nebst etwaigen
Anlagen von Ihrem System. Ebenso dürfen Sie diese E-Mail
oder seine Anlagen nicht kopieren oder an Dritte
weitergeben. Vielen Dank.