| %set[!] <PropName> <Feature> <Value> | Sets the (Feature) feature of the property/method/event in question feature selected from CHG script (identified by the PropName symbol) to a new value (Value). The optional exclamation mark behind the command means that the item value does not need to be set exactly, disabling a report of potential error (serves, for instance, for setting the request for calculation of the PLL clock into PE).
Note: The command above will not modify the value of a macro which has been already defined - the macros will be maintained as defined with their original values until the end of script processing.
|
%set IntgPropSymbol Value D:0 %set @_CPU_@Clock Value 1.0 %set @InhrItem@PerphDevice ReqValue DMA0=Channel needed for correct operation of ADC0 in trigger mode %set @_CPU_@IntCtrl@PeriphDevice GIC=Peripheral required for proper operation %set @>%compName@Clock Value 1.0
The table listed below contains a list of supported features including their values:
| Items | Feature | Value |
|---|---|---|
| Method/event | Selection | always|never|enable|yes|no always= Generate always, not user-modified, never= Do not generate, not user-modified, yes= Generate, user-modified, no= Do not generate, user-modified, enable= changes always/never values to the value set last time by the user yes/no, yes/no values are maintained, (%set yes/no should not be used at all) (using %get Selection is not recommended due to frequent omission of a certain setting in the test, %getBoolis recommended instead) |
| Method/event | MethodDeclaration, EventDeclaration | Returns declaration (header) of the method; %set not supported |
| Event | EventParamCount | Returns number of event parameters; decimal number |
| Event | EventParamName[index] | Returns name of event parameter with specified index (index of first parameter is 0) |
| Event | EventParamType[index] | Returns type of event parameter with specified index (index of first parameter is 0); type is returned in the same format as it is stored in the .bean file |
| Event | EventParamAnsiCType[index] | Returns ANSI-C type of event parameter with specified index (index of first parameter is 0); the following base types are supported: bool, char, uint8_t, int8_t, uint16_t, int16_t, uint32_t, int32_t, uint64_t, int64_t, TPE_Float; if user type is assigned, its name is returned; if the parameter address is passed instead of value, the type is returned with * as suffix |
| Property | ReadOnly | yes|no|true|false specifies if the item is read-only or editable; items set as read-only in the component and template cannot be edited !no - will change the value and read-only items in the component or template |
| Property like groups of items | ReadOnlyALL | Can only be used for %set, Any value like ReadOnly, The command applies %set ReadOnly for all items within the group. |
| Property | Value | Value as per property
|
| Boolean property, method, event | Bool | yes/no as per item value. Returns only these two identifiers regardless of item symbol generating setting. Useful for method and event setting tests. |
| Boolean group | BoolValue | Supported for %get command only. If a symbol is defined for each item, will return this very symbol; in the reverse case, it will return yes/no. |
| All group property | Expanded | yes/no, based on the item status (unpacked/packed) |
| Property | Error | Text of an error, for %get, it will return the text in the column 3 |
| Property | LightError | Sets light error to the property. %get not supported. Light errors are supported only if option LightErrorsSupported is listed in the options of the .bean file (see PEx_Data\Config\XMLSpec\Component.xsd). |
| Property | HtmlHint | Gets description of the property in HTML format. %set is not supported. |
| Property/Method/ Event | IsError | Works only for %get, will return yes if the item contains an error due to PE, or no in other cases. Any possible error from CHG/TST is deleted. |
| Property/Method/ Event | IsEnabled | Returns yes/no depending on whether the item is enabled in the current component setting or not (i.e. will return 'yes' if the item is not version-specific for other CPUs, not contained in a disabled boolean group, or disabled within the enumeration group). The item has to exist. |
| Property/Method/ Event | Exists? | Returns yes/no based on whether the item exists within the component or not |
| Property/Method/ Event | Warning | Works for %set only, sets the message (warning) into the item column 3. Supported in CHG and TS2 scripts only. |
| Property | Name | Item name - ItemName property (read-only) |
| Property real or integer or list | MinValue MaxValue | Numerical value Note: for %get, the real value will be returned with/without 3 decimals
|
| Property list | MaxItem | Returns last element index (from zero) |
| Property enum or bool or peripheral | Index | Enumerating item index Boolean: 0 for true or 1 for false |
| Property enum, enumeration-group or bool | IndexFromDefinedValue | Sets item Index as per defined value (i.e. converts the value defined to Index). If the value is not defined, it will set Index to -1 (deletes the values), for enumeration group preserves current value Function %get(_,IndexFromDefinedValue[def]) returns value -1 if defined value def not found, otherwise index of the corresponding item (decimal integer >=0); |
| Property enum or enum-group | DefinedValueFromIndex | %get( _ , DefinedValueFromIndex [index]) returns defined value for selected index (decimal number from range [0..ItemsCount-1]; %set is not supported |
| Property enum or bool or enum-group or bool-group | IndexError, IndexWarning | Sets an error message (or more specifically warning) to the count value with index specified. %set <symbol> IndexError <index><message> Does not work for %get. In addition, to display the icons in the value selection, the IconPopup needs to be set within BW. Setting for all errors will be deleted if item type is changed. |
| Property enum or enum-group | LightIndexError | Sets light error to the value with specified index. %get not supported |
| Property enum or bool or peripheral | ItemsCount | Returns a count of possible enumeration values. |
| Property enum or bool | TypeSpecName | Type name Item TypeSpecChangeAble property must be set within BW. |
| Property enum | CustomValueRangeLo, CustomValueRageHi | Sets limits for custom value. %get is not supported. It is not allowed to set CustomValueRangeLo>CustomValueRageHi. |
| Property ListItemFromFile | ItemFile | File name (including extension) with item definition, relative path to components root directory). If a list has been assigned to the item, it is deleted before editing. Once edited, the list will be completed to the minimum number of items. |
| Property ListItemFromFile | ItemFile_ReloadContent | File name (including extension) with item definition, relative path to components root directory). If the file is changed, number of items and items configuration is re-loaded from previous configuration (read-only items are not stored for reload). If the file does not exists, Processor Expert displays error message. |
| Property addr | AddrType | A family of properties in comma-separated brackets, [external, internal, RAM, ROM, FLASH, EEPROM,code,data]. For a complete list of identifiers, see InspectorItemFeatures.xls, TaddrItem item, column of controls from CHG script. |
| Property, method or event | ItemLevel | Setting an item visibility level: BASIC, ADVANCED, EXPERT, "@ HIDDEN @". It is recommended using this as least as possible as this may cause the inspector flashing and user confusing in editing (the user will not see the item that is described in the documentation). |
| Property | Text | Returns the value of the item as can be visible in the item text field in the inspector. For %set , this works identically as %set(_,Value) . It is recommend using %get(_,Value) instead. |
| Property | AutoSelectedValue | If the property value is Automatic, returns auto-selected value (text) of the property in format for UI (empty string if no value auto-selected). Note: usually the same value is also displayed in the third column in case there is no warning; otherwise (if value is not Automatic) returns value of the property (text displayed in second column). |
| Property | IsDefaultValueAutoSelected | Return yes if the property is set to <Automatic> and default value is selected without any user requirement for register modification; for pin properties returns yes also if no pin is routed; returns no in all other cases. This is designed to detect, if the value is selected based on after reset register configuration without any user requirement for modification. %set is not supported. |
| Property | ExtraText | Writes in the inspector column 3, the write will be enabled only for items displaying implicitly no value in the column 3. The text will not disappear in the case of new CHG script passing, while for instance errors from CHG will be deleted in the case of new passing. If the text is enclosed within<tt> </tt>, it will be displayed using Courier font with a constant character width. The following item types will display ExtraText from CHG in the column 3 with added specific information on item setting: „CPU frequency". |
| Property for inheritance | Text Value |
Component name Component type |
| Property link to component | Text Value |
Component type Component name |
| Property link to component | Value | %set enables adding the component into the project by setting the new:<component/template name>value; the component will be added once CHG script is closed, with subsequent CHG script restart |
| Property | InitializationValue | %get not supported. %set works same as feature Value, but only in case the property was not supported in the component yet during CHG execution; otherwise the command is ignored |
| Property string-list | Line[index] | Returns/sets the line with a number index in the string-list (line numbering from 1). Set will add a new line at the end. |
| Property import from CPU | ImportSymbols | See Modification of string-list topic for details about possibilities for modification of string-list value using %set command. Editing will immediately update the list of items displayed. %get not supported so far. |
| Property string-list | Strings | Feature to modify value of the string-list. See Modification of string-list topic for details about possibilities for modification of string-list value using %set command. |
| Property string, real and CPU frequency | RecommendedDropDownValues | Feature to modify drop down list of recommended values for the property. The drop down list is used only to allow easy modification of the value of the property; it is not used for validation. See Modification of string-list topic for details about possibilities for modification of string-list value using %set command. |
| Property | SymbolValue[<symbol>] | Current value of the symbol defined from the item. If the symbol has not been defined, #undef#
will be returned. Can only be used for %get.
The value returned from this feature may be different from value currently defined local symbol (if property value was changed by any previous %set command). |
| TIntrItem | InterruptUsageStrategy | Specifies usage of the interrupt vector by the property. Supported values are: NOT_USED, USED_IF_NOT_ELSEWHERE, USED_NOT_EXCLUSIVELY, USED_EXCLUSIVELY |
| Property | ReqValue | Detailed description in 3.3.2.16 |
| Any property | NumberOfReqValues | %set
not supported,
%get
returns number of requirements registered to the property using
%set ReqValue
command; return integer decimal number,
0 if there is no requirement;
This is used in advanced technique for sharing TimerUnit_LDD component |
| Any property | PE_ItemType | Item type name within PE |
| Property TListItem and TListItemFromFile | DeleteItemIndex | Deletes an item with specified index from the list, works only for %set |
| Directory like property | BaseDir | Sets a directory to which a selected path is to be set relatively |
Example:
%set @_ProjectOptions_@MainModuleUpdate Index 4