Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Papyrus for Real Time » Multiplicity of a part with a relay port
Multiplicity of a part with a relay port [message #1826919] Mon, 04 May 2020 15:28 Go to next message
S Andova is currently offline S AndovaFriend
Messages: 2
Registered: May 2020
Junior Member
I am trying to make a version of the CarDoorLock example in which instead of 4 instances of Door I like to use multiplicity 4. But I cannot get it work and I suspect that the messages do not get through the relay port. Any idea what might be causing this?
Re: Multiplicity of a part with a relay port [message #1826921 is a reply to message #1826919] Mon, 04 May 2020 15:51 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
What exactly is the problem? Do you get code generation errors? compile-time errors? runtime errors? unexpected behaviour? It's impossible to say without more details and without looking at the model.

Keep in mind that currently there is no support for Papyrus-RT as there is no longer any active development, so responses in this forum may be very slow.

Re: Multiplicity of a part with a relay port [message #1826933 is a reply to message #1826921] Mon, 04 May 2020 20:18 Go to previous messageGo to next message
S Andova is currently offline S AndovaFriend
Messages: 2
Registered: May 2020
Junior Member
Sorry I was not clear indeed. The model compiles and the code runs but it doesn't get further than "Sending Lock message to doors" which is the comment before the communication should take place.

The output I get is:
--
Controller "DefaultController" running.
The Lock Car.door1[0].lock is unlocked
The Lock Car.door1[1].lock is unlocked
The Lock Car.door1[2].lock is unlocked
The Lock Car.door1[3].lock is unlocked
Doors are open
Hit Enter to close doors

Sending Lock message to doors

--

Just in case I am attaching the model in which the only change wrt to the original model is in the Car capsule. The original example CarDoorLock runs properly.

>Keep in mind that currently there is no support for Papyrus-RT as there is no longer any active development, so responses in this forum may be very slow.

Yes I read it already and I find it very pity because I find Papyrus-RT a very nice tool. And many thanks for you quick answer.
Re: Multiplicity of a part with a relay port [message #1827080 is a reply to message #1826919] Wed, 06 May 2020 18:32 Go to previous message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
I took a look at the model. There is nothing obviously wrong, but there are a couple of odd things:

1) The "Door" parts are not replicated, only the centralLock.lockPort is replicated (4). Although this should not matter.

2) The "send" is done in the centralLock's 'doorsOpen' state's entry action, written as:

    lockPort.lock().send(4);


This doesn't mean "send 4 'lock' messages through the 'lockPort'". This means "send 'lock' message to all capsules connected to the 'lockPort', with priority 4".

The priority should not matter, but I suggest trying

    lockPort.lock().send();


This would send the message to all doors.

3) The output shows "Car.door1[0].lock", "Car.door1[1].lock", etc. That's not what I would expect with the attached model (where the slot name is printed with the expression "this->borderPorts[0]->slotName()"). I would expect that output if there was only one Door part called "door1", replicated 4 times. With the model attached, where the doors are separate parts, I would expect "Car.door1.lock", "Car.door2.lock", etc.

So that makes me think that the output you attached was not from the model attached but from a different version. Is that the case?


Previous Topic:'internal' vs 'local' transitions
Next Topic:Understanding of the timer implementation
Goto Forum:
  


Current Time: Tue Apr 23 13:27:00 GMT 2024

Powered by FUDForum. Page generated in 0.04553 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top