Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Papyrus for Real Time » Boolean array in Papyrusrt(Create an attribute with type array)
Boolean array in Papyrusrt [message #1844652] Mon, 20 September 2021 12:14 Go to next message
Shruthi Basavaraju is currently offline Shruthi BasavarajuFriend
Messages: 4
Registered: September 2021
Junior Member
I want to create an attribute in my capsule with type array which can hold Boolean values.

Is there a way to do it ? I looked up in the attribute type window and unsure about what type to select and how to use it.


Thanks & Regards
Shruthi


Thanks & Regards
Shruthi B
Re: Boolean array in Papyrusrt [message #1844663 is a reply to message #1844652] Mon, 20 September 2021 17:49 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
In the Model Explorer, right-click on the capsule, select "New UML-RT Child > Attribute", give it a name. Then select the attribute itself, and in the Properties view, in the UML tab, set the Type field to Boolean by clicking the button with dots [...] to browse for types. You can find several boolean types: under the "Primitive Types" library, you'll get the UML Boolean type, under the "EcorePrimitiveTypes", you'll get the Ecore Boolean type, and under the "Ansi C" library, you'll get the plain C bool type. For the purpose of code generation, all of them will result in the C++ bool type. Once you've set the attribute type to Boolean, set the "Multiplicity" field to the size of the array. It has the format n..m. So if you want an array of size 5, type 5..5.
Re: Boolean array in Papyrusrt [message #1844682 is a reply to message #1844663] Tue, 21 September 2021 12:10 Go to previous message
Shruthi Basavaraju is currently offline Shruthi BasavarajuFriend
Messages: 4
Registered: September 2021
Junior Member
Thank you very much for the detailed answer.

Thanks & Regards
Shruthi B
Previous Topic:Q about structure of ISO 80000 and QUDV in SysML Papyrus and how to apply it.
Next Topic:Parallel / Distributed Execution
Goto Forum:
  


Current Time: Fri Apr 26 00:14:45 GMT 2024

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

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

Back to the top