ScriptSymbolConfigObject¶
- class ScriptSymbolConfigObject.DirectIoAccessObstacles(value)¶
Bases:
Enum
This enum shows the obstacles which prevent the Direct IO access from taking place.
- none = (0,)¶
Direct I/O access is possible.
- OldCompilerVersion = (1,)¶
The compiler version is to old.
- TargetSettingSeparateApplication = (2,)¶
The symbol configuration is configured as a child object.
- class ScriptSymbolConfigObject.SymbolConfigContentFeatureFlags(value)¶
Bases:
Enum
The feature flags describing the contents of the symbol tables and XML files. (Introduced in V3.5.8.30, more broadly supported in V3.5.9.0.)
Remark: The “runtime” part of this enum is also defined in the “ContentFeatureFlags” enumeration in the IecVarAccess Interfaces library.
- none = (0,)¶
Nothing configured.
- MaskRuntime = (65535,)¶
The runtime feature bit mask (also relevant for CRC calculation).
- MaskXml = (4294901760,)¶
The XML feature bit mask (not relevant for CRC calculation).
- SupportOPCUA = (1,)¶
Support OPC UA features (flag supported since V3.5.8.30). This is equal to the <see cref=”ISymbolConfigObject6.SupportOPCUA”/> property. Remark: This is required for <see cref=”IncludeComments”/>, <see cref=”IncludeAttributes”/> and <see cref=”IncludeTypeNodeAttributes”/>. In compiler versions V3.5.5.0 to V3.5.7.X, this implied <see cref=”IncludeAttributes”/> with a filter matching only single IEC identifiers. In compiler versions V3.5.8.X, this implied <see cref=”IncludeAttributes”/> with a filter matching IEC identifier pathes (e. G. foo.bar.baz).
- IncludeComments = (2,)¶
Include comments (flag supported since V3.5.9.0).
- IncludeAttributes = (4,)¶
Include attributes (flag supported since V3.5.9.0).
- IncludeTypeNodeAttributes = (8,)¶
Also include comments / attributes for type nodes (flag supported since V3.5.9.0).
- IncludeExecutables = (16,)¶
Inclusion of executable members (flag supported since V3.5.11.0, allows calling of programs, functions, FBs and methods, requires OPC UA). Remark: If this flag is set, the list of available signatures will also include callables.
- UseEmptyNamespaceByDefault = (32,)¶
Assumes that effectively every POU has the {attribute ‘namespace’:=’’} set. This is required to preserve compatibility to V2 symbol definitions.
- XmlIncludeNodeFlags = (65536,)¶
Include the node flags in the XML file (flag supported since V3.5.8.30). Remark: This was implied in compiler version V3.5.8.0, and is configurable using this flag since V3.5.8.30 due to backwards compatibility problems with various XML parsers.
- XmlIncludeComments = (131072,)¶
Include comments in the XML file (flag supported since V3.5.8.30), equal to <see cref=”ISymbolConfigObject5.ExportCommentsInXML”/> flag. Remark: In compiler versions 3.5.5.X to 3.5.8.X, this implied <see cref=”SymbolCommentFilterType.PreferDocuComments”/>.
- XmlIncludeAttributes = (262144,)¶
Include the attributes in XML (flag supported since V3.5.9.0).
- XmlIncludeTypeNodeAttributes = (524288,)¶
Also include comments / attributes for type nodes (flag supported since V3.5.9.0).
- XmlIncludeExecutables = (1048576,)¶
Inclusion of executable members (flag supported since V3.5.11.0, allows calling of programs, functions, FBs and methods, requires OPC UA). Remark: This requires <see cref=”IncludeExecutables”/> to be active - settingt his flag to false allows to suppress the executables in the for backwards compatibility.
- class ScriptSymbolConfigObject.SymbolAttributeFilterTypes(value)¶
Bases:
Enum
Definition of the attribute matching type
- none = (0,)¶
No attributes or not configured.
- All = (1,)¶
All attributes are included.
- SimpleIdentifiers = (2,)¶
Match all simple identifiers without fullstop (non-hierarchical attributes). Remark: This is mainly here for backwards compatibility.
- Prefix = (3,)¶
Prefix matching of attributes
- Regex = (4,)¶
Regex matching of attributes
- class ScriptSymbolConfigObject.SymbolCommentFilterType(value)¶
Bases:
Enum
Defines which comments are included in the XML file or symbol tables.
- none = (0,)¶
No comments are included at all, or not configured.
- DocuComments = (2,)¶
Only docu comments are included, those delimited with ///.
- Both = (3,)¶
Include both normal and docu comments. This is the default, currently. Remark: This is equal to combining <see cref=”NormalComments”/> and <see cref=”DocuComments”/>.
- PreferNormalComments = (4,)¶
Prefer the normal comments, docu comment is used when no normal comment is there. Remark: This implies <see cref=”NormalComments”/> and <see cref=”DocuComments”/>.
- PreferDocuComments = (5,)¶
Prefer the docu comments, normal comment is used when docu comment is not there. Remark: This implies <see cref=”NormalComments”/> and <see cref=”DocuComments”/>.
- class ScriptSymbolConfigObject.ScriptSymbolConfigObjectMarker¶
Bases:
object
Every ScriptObject instance will be extended with this method.
- Version added:
3.5.10.0
- property is_symbol_config¶
Gets a value indicating whether this instance is a symbol config object.
- Return type:
bool
- Returns:
True
if this instance is symbol config object, otherwiseFalse
.
- class ScriptSymbolConfigObject.ScriptSymbolConfigObject¶
Bases:
ScriptSymbolConfigObjectMarker
Functionality for manipulating symbol configuration objects.
- Version added:
3.5.10.0
- property client_side_layout_calculator_guid¶
Gets or sets the Guid denoting the currently configured client side layout calculator.
Currently, two different values are allowed:
Guid.Empty
to use the Compatibility Offset Calculator which is always available. And “{0141eb75-141b-4ea1-9a8c-75f952b22a6c}” to use the OptimizedOutputOffsetCalculator which is new with V3.5.7.0 and also requires the compiler version 3.5.7.0 (see http://jira.3s-software.com/browse/CDS-41816). This scheme may be extended to allow more or even arbitrary offset calculators in the future.- Return type:
Guid
- property client_side_layout_calculator¶
Gets or sets the calculator object denoting the currently configured client side layout calculator.
Currently, two different values are allowed:
Guid.Empty
to use the Compatibility Offset Calculator which is always available. And “{0141eb75-141b-4ea1-9a8c-75f952b22a6c}” to use the OptimizedOutputOffsetCalculator which is new with V3.5.7.0 and also requires the compiler version 3.5.7.0 (see http://jira.3s-software.com/browse/CDS-41816). This scheme may be extended to allow more or even arbitrary offset calculators in the future.- Return type:
- property available_client_side_layout_calculators¶
Gets all currently known layout calculators.
- property enable_direct_io_access¶
Gets or sets a boolean whether direct Access to the I/O Area is configured.
Enabling direct access to the I/O area is supported for debugging purposes, e. G. testing the cables and connections. It is not meant for productive operation. It is only available under certain conditions, e. G. the compiler version must be >= V3.5.8.0 and the symbol config must not be generated as a child application.
- Return type:
bool
- check_effective_direct_io_access()¶
Checks whether and why the direct Access to the I/O Area is effectively enabled / disabled.
Enabling direct access to the I/O area is supported for debugging purposes, e. G. testing the cables and connections. It is not meant for productive operation. It is only available under certain conditions, e. G. the compiler version must be >= V3.5.8.0 and the symbol config must not be generated as a child application.
- Return type:
- Returns:
The
DirectIoAccessObstacles
flag describing which reasons prevent the Direct IO Access from being enabled.
- get_direct_io_obstacle_explanations(obstacles)¶
Gets user readable, localized messages / explanations of the obstacles.
- Parameters:
obstacles (
DirectIoAccessObstacles
) – The obstacles.- Return type:
list[str]
- Returns:
A list of strings with one entry for each obstacle, or an “is enabled” message when
obstacles
==DirectIoAccessObstacles.None
.
- property content_feature_flags¶
The configured content feature flags. This is partially redundant with
SymbolConfigObject.ExportCommentsInXML
andSymbolConfigObject.SupportOPCUA
.- Return type:
- property effective_content_feature_flags¶
The effective content feature flags, considering the
content_feature_flags
and the compiler version setting.- Return type:
- get_symbol_configuration_xsd()¶
Gets the current symbol configuration XML schema, as appropriate for the current symbol config object.
The schema is delivered as a byte array, containing the UTF-8 encoded XSD file as it is also published in the http://www.3s-software.com/schemas/Symbolconfiguration.xsd. The above URL aways points to the newest released version of the schema, while the
get_symbol_configuration_xsd()
property delivers the XSD file applicable to the current release of the SymbolConfig plugin.- Return type:
list[byte]
- Returns:
The current symbol configuration XML schema as byte array.
- property symbol_attribute_filter_type¶
The configured filter type for the attributes.
- Return type:
- property effective_symbol_attribute_filter_type¶
The effective filter type, considering compiler version and other side conditions.
- Return type:
- property symbol_attribute_filter_data¶
Describes the filter data for
SymbolAttributeFilterTypes.Prefix
andSymbolAttributeFilterTypes.Regex
.- Return type:
str
- property symbol_comment_filter_type¶
The configured comment filter type.
- Return type:
- property effective_symbol_comment_filter_type¶
The effective comment filter type, considering compiler version and other side conditions.
- Return type:
- get_all_signatures(compile=True)¶
Get all signatures (compiler and configured).
- Parameters:
compile (bool) – If True, build the application before generating the list. If the application was not built before, the returned list is empty.
- Return type:
- Returns:
Collection of signatures.
- get_all_datatypes(compile=True)¶
Get all data types (compiler and configured).
- Parameters:
compile (bool) – If True, build the application before generating the list. If the application was not built before, the returned list is empty.
- Return type:
- Returns:
Collection of data types.
- get_only_configured_signatures()¶
Get only the configured signatures.
- Return type:
- Returns:
Collection of signatures.
- get_only_configured_datatypes()¶
Get only the configured data types.
- Return type:
- Returns:
Collection of data types.
- class ScriptSymbolConfigObject.ScriptClientSideLayoutCalculatorDescriptionCollection(iterable=(), /)¶
Bases:
list
Descriptions of the client side layout calculators.
- Version added:
3.5.10.0
- class ScriptSymbolConfigObject.ScriptClientSideLayoutCalculatorDescription¶
Bases:
object
Description of an client side layout calculator.
Currently, two different values are allowed:
Guid.Empty
to use the Compatibility Offset Calculator which is always available. And “{0141eb75-141b-4ea1-9a8c-75f952b22a6c}” to use the OptimizedOutputOffsetCalculator which is new with V3.5.7.0 and also requires the compiler version 3.5.7.0 (see http://jira.3s-software.com/browse/CDS-41816). This scheme may be extended to allow more or even arbitrary offset calculators in the future.- Version added:
3.5.10.0
- property type_guid¶
The unique ID of the output layout calculator.
- Return type:
Guid
- property name¶
The name of the output layout calculator - human readable and localized.
- Return type:
str
- property description¶
A longer description of the output layout calculator.
- Return type:
This may be shown in a tooltip, and should give some detailed explanation of the calculator, and e. G. the conditions under which the calculator is valid.
- class ScriptSymbolConfigObject.ScriptSymbolConfigSignature¶
Bases:
object
Signature element of the symbol configuration.
- Version added:
3.5.10.0
- property name¶
The name of this element.
- Return type:
str
- property full_qualified_name¶
The full qualified name of this element.
- Return type:
str
- property library_id¶
The identification of the library where this signature is declared.
- Return type:
str
- property namespace_path¶
Namespace path of the library where this signature is declared.
- Return type:
list <str>
- property variables¶
The variables of the signature.
- Return type:
ScriptSymbolConfigVariableCollection
- class ScriptSymbolConfigObject.ScriptSymbolConfigSignatureCollection(iterable=(), /)¶
Bases:
list
Collection of symbol configuration signatures.
- Version added:
3.5.10.0
- find(name, library_id=None)¶
Get the first
ScriptSymbolConfigSignature
with the specified name and library ID which should be fully qualified.- Parameters:
name (str) – Name of a signature.
library_id (str) – Library ID.
- Return type:
- Returns:
Signature of the symbol configuration. Otherwise None.
- class ScriptSymbolConfigObject.ScriptSymbolConfigVariable¶
Bases:
object
Variable element of the symbol configuration.
- Version added:
3.5.10.0
- property name¶
The name of this variable.
- Return type:
str
- property type¶
The type of this variable, as the user declared it.
- Return type:
str
- property comment¶
Gets the comment of the signature or variable, or an empty string if no comment is available.
This member is only valid for objects parsed from the compiler, not for configured symbol config instances.
- Return type:
str
- property configured_access¶
The allowed symbolic access to this variable.
- Return type:
SymbolAccess
- property maximal_access¶
The maximal access that is allowed for this variable, decided by the given attributes.
- Return type:
SymbolAccess
- property effective_access¶
The effective symbolic access to this variable.
- Return type:
SymbolAccess
- property exported_via_attribute¶
Gets a value indicating whether this variable is configured via compiler attribute.
- Return type:
bool
- Returns:
True
if exported via attribute; otherwiseFalse
. IfTrue
, the Access attribute gives the effective access for this variable.
- property attribute_access¶
Gets the attribute access. When
attribute_access
is false, the result of this member is undefined.- Return type:
SymbolAccess
- property type_library_id¶
Gets the library id, when the type of the member is from a library.
This is currently only set for supported data types (userdef and array).
- Return type:
str
- property full_qualified_base_type¶
Gets the full qualified base type of the member.
This is currently only set for supported data types (userdef and array).
- Return type:
str
- property alias_type¶
The name of the alias type.
For variables with aliased types, the Type,
SymbolConfigVariable.VariableType
andSymbolConfigVariable2.FullQualifiedBaseType
properties point to the effective, resolved type. Use this member in the UI to display the alias type used in the source. This member is only valid for objects parsed from the compiler, not for configured symbol config instances.- Return type:
str
- class ScriptSymbolConfigObject.ScriptApplicationSymbolConfigExtension¶
Bases:
object
Extension provider for ApplicationObject instances.
- Version added:
3.5.10.0
- create_symbol_config(export_comments_to_xml, support_opc_ua, client_side_layout_calculator)¶
Add the symbol configuration object to an application.
- Return type:
- Returns:
Script object of the symbol config object.