Page 1 of 1

Reading/Writing Read Structural Feature Actions

PostPosted: Thu Jul 18, 2019 2:20 pm
by Jacob.alva@navy.mil
I have two seperate blocks, one holds a value property, the other holds an activity diagram. If I try to use the activity diagram to read structural feature (value property from other block) I will be given an error message that I can not read said value because I am out of its context. Is there a efficient workaround to read value properties, etc., out of context with an activity diagram?

Re: Reading/Writing Read Structural Feature Actions

PostPosted: Sat Aug 17, 2019 5:43 pm
by rjhudson@mitre.org
Does the block with the activity diagram have any kind of reference to the other block? If it doesn't then that could indicator you are trying to perform some action that doesn't make sense for that block. If you block really should have access to that other block, then just add a reference of some kinda and use that in the activity diagram.

Re: Reading/Writing Read Structural Feature Actions

PostPosted: Mon Aug 19, 2019 6:17 am
by Jacob.alva@navy.mil
Thank you, is this done through a bound reference or?

Re: Reading/Writing Read Structural Feature Actions

PostPosted: Thu Apr 02, 2020 6:42 pm
by danbrunski@gmail.com
I could use some help on this too. I have been struggling with this all day, in a way I would never have trouble with if it were C++. I have a block that is a directed composition of another block, and I'm trying to use the readStructureFeature in an activity diagram to read a value property of the sub block, but no matter how many lines and ports I draw, I just get "the specified structure feature is not owned by the given context."

To be more specific, let's say we have a satellite with a propulsion system. The satellite is a composition of the propulsion system. In the satellite I have a state machine diagram called calculate_burn. In the propulsion system I have a value property called thrust. In calculate_burn as the do activity I create the readStructureFeature action and tell it the structure is the thrust property.

I've tried creating an IBB in Satellite with all manner of ports and lines between satellite and propulsion. I've also tried creating another block called Satellite Context with an IBB that contains Satellite and Propulsion.

When I simulate my satellite, I just get the context error. Why? How is the propulsion system not part of the context?

Re: Reading/Writing Read Structural Feature Actions

PostPosted: Mon Apr 06, 2020 11:53 am
by danbrunski@gmail.com
Ok, I actually figured this out. As it turns out, SysML works just like an object oriented language! But man is it not intuitive, and the guides out there are not very clear.

I feel like this is a super obvious thing to everyone else here, so I won't go through a lengthy explanation unless someone asks. Basically I needed to create an internal block diagram on the lowest level block with the value of interest bound to an external port. Then on the upper level block, I created an ibd that has the lower level block's port bound to the upper level block. Then in my upper level block's activity diagram, I use a readSelf function, that sends the object to a readStructuralFeature, which sends the value to some calculation, and then at the end I have an addStructuralFeatureValue that receives both the object and calculated value.

This example is what made the read/addStructureFeature actions click for me: https://thaisysml.blogspot.com/2012/08/simple-clock-modeling-with-sysml.html

These two helped me understand ports better:

https://mbse4u.com/2013/09/23/sysml-full-ports-versus-proxy-ports/

https://mbse4u.com/2018/11/30/sysml-question-why-you-should-not-connect-ports-with-associations/

Re: Reading/Writing Read Structural Feature Actions

PostPosted: Fri May 01, 2020 12:11 am
by johnsteve6689@gmail.com
I need a general opinion on the topic that says Do you agree writing helps in mental maturity? We had to mention professional dissertation help for them. Justify. I need it for research purposes so i anyone out there who has some know-how regarding it then it would be really helpful for all of us now.