Author Topic: Accessing FlowPort Direction (Code Generation Temp  (Read 1083 times)

Frank42

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Accessing FlowPort Direction (Code Generation Temp
« on: February 24, 2015, 09:40:10 pm »
Hi,

I want to tweak the SystemC Code Generation. I can access Attributes as well as the port type and name as shown in the reference guide. However I do not know how to access the direction from a stereotyped flow port (from the property declaration template). Can anyone help and provide a working code snippet?

Thank you very much.

qwerty

  • EA Guru
  • *****
  • Posts: 9434
  • Karma: +150/-139
  • I'm no guru at all
    • View Profile
Re: Accessing FlowPort Direction (Code Generation
« Reply #1 on: February 25, 2015, 12:30:22 am »
If you're using SysML then it's stored in a tagged value. No idea how to access a TV from a code gen macro.

q.

Frank42

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Accessing FlowPort Direction (Code Generation
« Reply #2 on: February 25, 2015, 09:08:08 pm »
Anyone else?

I am using SysML.
I know I can access the properties of attributes with %attName% %attType% and the Tagged Values of the attributes with %attTag:"mode"%. I can access some of the  Ports Properties with EASL_GET("Property", $GUID, "Kind" or "Name") but not their TaggedValues. To my knowledge this is not addressed in the reference guide.
« Last Edit: February 25, 2015, 09:09:15 pm by FranktheTank »

qwerty

  • EA Guru
  • *****
  • Posts: 9434
  • Karma: +150/-139
  • I'm no guru at all
    • View Profile
Re: Accessing FlowPort Direction (Code Generation
« Reply #3 on: February 27, 2015, 04:00:59 am »
IIRC there's an EXEC_ADD_IN (or the like) which allows to call an add-in doing that kind of work for you.

q.