Class ReadOnlyAttribute
Attribute allows to prevent writing to the members of twin connector.
ReadOnlyAttribute can be declared for member of a FB, GVL or STRUCT.
note
This attribute is typically defined in the declaration section of PLC block and then trans-piled by ixc builder.
warning
Use of ReadOnlyAttribute does not prevent the PLC program to write to the variable that declares this attribute.
FUNCTION_BLOCK fbSomeReadOnlyMembers
VAR
{#ix-attr:[ReadOnly()]]}
_nonWrittableItem : BOOL; // Member is readonly for .net application.
{#ix-attr:[ReadOnly()]]}
_nonWrittableFunctionBlock : fbNonWrittable; // Member and its members are readonly for the .net application.
END_VAR
Inherited Members
Namespace: AXSharp.Connector
Assembly: AXSharp.Connector.dll
Syntax
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field)]
public class ReadOnlyAttribute : Attribute
Constructors
| Edit this page View SourceReadOnlyAttribute()
Creates new instance of ReadOnlyAttribute
Declaration
public ReadOnlyAttribute()