Book a Demo

Author Topic: Pass operations through ports  (Read 7942 times)

royvanmarrewijk

  • EA User
  • **
  • Posts: 61
  • Karma: +1/-0
    • View Profile
Pass operations through ports
« on: October 16, 2015, 01:28:33 am »
Hi,

I have a SysML question. I created three Blocks [A, B, C]. The blocks contains ports and the ports are types by an (interface)block. An interface block either realizes an interface of depends on an interface. With this construction A is connected to B and B is connected to C. This construction enables me to design the interface behaviour of the interfaces between two blocks. But when I try to design the behaviour between the two ports that belongs to Block B (see Ports 3 and 4 below) it isn't possible, this because I can't call the operations of the interface on the side of Port 3, this because Port 3 is the required interface).

[A][Port 1]->Dep->[IF]<-Rlz-<[Port 2][Port 3]->Dep->[IF]-<Rlz<-[Port 4][C]

So If anyone can tell me how to pass operations through a port it would be very helpfull!

I already tried to work with Proxy Ports and Conjugated ports but this doesn't work.

Kind regards,
Roy

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Pass operations through ports
« Reply #1 on: October 16, 2015, 06:37:47 am »
Quote
So If anyone can tell me how to pass operations through a port it would be very helpfull!
An operation can never be passed (except printed or as file transfer in the code). What you pass are messages.

q.

royvanmarrewijk

  • EA User
  • **
  • Posts: 61
  • Karma: +1/-0
    • View Profile
Re: Pass operations through ports
« Reply #2 on: October 16, 2015, 05:03:41 pm »
Hi Qwerty,

Thanks for your reaction. Can you maybe tell me how you would design the following case:

I Have a System that Realizes the Interface IN and depends on the Interface Out. The System contains two Sub Systems (A & B). The messages from IN effects the Subsystem A. A gives B a command and B then send a message to the outer world by the OUT interface.

Roy

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Pass operations through ports
« Reply #3 on: October 16, 2015, 07:28:08 pm »
You can use delegation. Use a port with a provided and one with required interface on the borders. Then delegate the one to your A class and the other to the B class. Now you can model how A and B behave to produce what you need.

q.

royvanmarrewijk

  • EA User
  • **
  • Posts: 61
  • Karma: +1/-0
    • View Profile
Re: Pass operations through ports
« Reply #4 on: October 16, 2015, 09:50:27 pm »
Hi,

I created a Block "System" this block contains two ports (port1, port2). Port 2 depends on Interface "interface1" which contains the operation Hi(). So Port2 contains the required interface.
System has a part (via Part association) called "A". I dragged the arrow from Port2 to Block "A" and then selected required interface -> delegate. In the window that popped up I selected "interface 1".
Now when I try to create a sequence diagram and I create a message beween Port1 and A I can't select the operation Hi(). What should I do to fix this?

Roy

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Pass operations through ports
« Reply #5 on: October 16, 2015, 10:12:01 pm »
It would help if you post a diagram. You need to place the image on a public server since this steam boat does not accept images directly.

You need to put the realized/required interfaces inside the ports in order to see the methods in a SD. As I understand you just created connectors.

q.

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: Pass operations through ports
« Reply #6 on: October 16, 2015, 11:20:39 pm »
Hi

Here are my thoughts.

If you are modelling behaviour on a port in SysMl 1.3 than you should be using a[highlight] Full Port typed to a Block [/highlight]and [highlight]not an InterfaceBlock[/highlight].

Then you can:

  • Create an Interface to model what the Port is providing and add operations to this Interface.
  • Create a Block which Realizes this interfaces and hence adds the operation to the Block
  • Model your Block, Full Port and Provided Interface (typed to the Interface created above)
  • Set the Property of your Full Port to the Block that realizes your interface
  • Repeat for other Interfaces, Blocks and Full Ports
  • Model the interaction (message passing and invocation of operations) using a SysML 1.3 Sequence Diagram
  • When you instantiate your lifeline to the Block with the Full Port and Provided Interface you can add this as nested lifelines
  • Now you can show messages invoking operations (by selecting from the Message drop down list) on the Provided Interface, the Port and eventually the Block (provided you have added operations inside the Block containing the Port)

I hope the above is clear and I have just tried the method above and it works.

What I would like to do, but it is not possible, is to set the Property of my SysML Full port to a UML class ... but EA won't let me do that

It will let me type a Port to a UML Class, only a SysML 1.3 InterfaceBlock or SysML 1.3 Block

Cheers

Phil
Models are great!
Correct models are even greater!