- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am trying to find a way to extract the Display Name property from custom-declared component type:
Here is "my_type" is a custom-declared type holding enumerated elements: Name: t1 (t2); Value: 1 (2), and Display Name: "AAA" ("BBB") accordingly. Parameter "my_Label" is assigned a Type of "my_type" and default Value of 1 (Display Name = "AAA").
Now in the header file I can access the parameter my_Label Value using evaluator `$my_Label` (=1) , and extract the element Name ("t1") using API function:
GetNameForEnum("my_Label", 1).
Q. How can I extract the property Display Name ("AAA") from parameter my_Label?
/odissey1
...
Solved! Go to Solution.
- Labels:
-
PSoC Creator Software
- Tags:
- basic dialog
- component properties
- display name
- enumeration types
- getnameforenum
- name for enumeration
- parameters definition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
odissey1
You can try using the ResolveEnumIdToDislay() API to extract the Display Name. The details about this are given in the PSoC Creator Customization API Reference Guide (In PSoC Creator goto, Help > Documentation > Customizer API Reference guide)
Best Regards
Ekta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello odissey1,
Can you please let me know the application for which you need to extract the display name.
You can view the type, value, value name, value display name for a parameter in the Component's Configure dialog pull down menu for that parameter as shown in the figure below:
Best Regards
Ekta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ekta,
I am trying to make a custom component implementing 16-bit wide Control register following
and other similar threads:
32-bit parallel non-contiguous GPIO write technique
I am using Control file attribute for fixed location placement, which works well when explicit expression is used, like "U(0,0)". But I am having trouble parametrizing this expression, because control file is processed before *.h file, and all defines from the header files are ignored.
Using enumerated custom types allows declaring Display Name strings (like "AAA" or "U(0,0)"), which can be accessed and parsed by the Control file, but I can't figure a way to access that Display Name property field for custom type. ( Other fields, like Type Name is extractable by GetNameForEnum(...,...) API).
Alternative way would be adding attribute declaration to the verilog file itself. I found some examples of fixed placement from Xilinx and Altera, which (obviously) do not work in Warp Verilog.
Using Control file seems straightforward, using Verilog should work as well. Any example would be greatly appreciated.
/odissey1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
odissey1
You can try using the ResolveEnumIdToDislay() API to extract the Display Name. The details about this are given in the PSoC Creator Customization API Reference Guide (In PSoC Creator goto, Help > Documentation > Customizer API Reference guide)
Best Regards
Ekta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ekta,
Thank you. I am traveling, will check on weekends.
/odissey1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ekta,
Thank you for the hint and direction. This should work, but I have to write a Customizer, which would write into the Control file - that i quite a job! I was hoping for some easy function, similar to GetNameForEnum, which works outside of C# framework.
/odissey1