Record Class OpcReferenceBody
java.lang.Object
java.lang.Record
com.inductiveautomation.ignition.designer.ai.opc.OpcReferenceBody
- Record Components:
opcServer- the OPC connection/server name.nodeId- the OPC node id or browse path.nodeClass- the OPC node class or item type, or null to omit it.hasChildren- whether the selected OPC row was browseable.dataType- the OPC datatype from browse metadata, or null to omit it.
- All Implemented Interfaces:
ReferenceBody, ReferenceBody.TextBody
public record OpcReferenceBody(String opcServer, String nodeId, @Nullable String nodeClass, boolean hasChildren, @Nullable String dataType)
extends Record
implements ReferenceBody.TextBody
The resolved body of an
@opc: prompt reference — the OPC source node the user selected.
The Key: value wire text is derived from these components; a consumer downcasts the
reference body to this type and reads the typed accessors rather than parsing the rendered text.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface ReferenceBody
ReferenceBody.TextBodyNested classes/interfaces inherited from interface ReferenceBody.TextBody
ReferenceBody.TextBody.RenderedText -
Constructor Summary
ConstructorsConstructorDescriptionOpcReferenceBody(String opcServer, String nodeId, @Nullable String nodeClass, boolean hasChildren, @Nullable String dataType) Creates an instance of aOpcReferenceBodyrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable StringdataType()Returns the value of thedataTyperecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thehasChildrenrecord component.final inthashCode()Returns a hash code value for this object.@Nullable StringReturns the value of thenodeClassrecord component.nodeId()Returns the value of thenodeIdrecord component.Returns the value of theopcServerrecord component.rendered()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
OpcReferenceBody
public OpcReferenceBody(String opcServer, String nodeId, @Nullable String nodeClass, boolean hasChildren, @Nullable String dataType) Creates an instance of aOpcReferenceBodyrecord class.- Parameters:
opcServer- the value for theopcServerrecord componentnodeId- the value for thenodeIdrecord componentnodeClass- the value for thenodeClassrecord componenthasChildren- the value for thehasChildrenrecord componentdataType- the value for thedataTyperecord component
-
-
Method Details
-
rendered
- Specified by:
renderedin interfaceReferenceBody.TextBody- Returns:
- the exact text the wire format embeds between
<reference>tags.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
opcServer
-
nodeId
-
nodeClass
-
hasChildren
public boolean hasChildren()Returns the value of thehasChildrenrecord component.- Returns:
- the value of the
hasChildrenrecord component
-
dataType
-