Search in sources :

Example 26 with ExtensionObject

use of org.eclipse.milo.opcua.stack.core.types.builtin.ExtensionObject in project milo by eclipse.

the class SessionsDiagnosticsSummaryTypeNode method setSessionSecurityDiagnosticsArray.

@Override
public void setSessionSecurityDiagnosticsArray(SessionSecurityDiagnosticsDataType[] sessionSecurityDiagnosticsArray) throws UaException {
    SessionSecurityDiagnosticsArrayTypeNode node = getSessionSecurityDiagnosticsArrayNode();
    ExtensionObject[] encoded = ExtensionObject.encodeArray(client.getStaticSerializationContext(), sessionSecurityDiagnosticsArray);
    node.setValue(new Variant(encoded));
}
Also used : Variant(org.eclipse.milo.opcua.stack.core.types.builtin.Variant) SessionSecurityDiagnosticsArrayTypeNode(org.eclipse.milo.opcua.sdk.client.model.nodes.variables.SessionSecurityDiagnosticsArrayTypeNode) ExtensionObject(org.eclipse.milo.opcua.stack.core.types.builtin.ExtensionObject)

Example 27 with ExtensionObject

use of org.eclipse.milo.opcua.stack.core.types.builtin.ExtensionObject in project milo by eclipse.

the class CubeItemTypeNode method writeYAxisDefinitionAsync.

@Override
public CompletableFuture<StatusCode> writeYAxisDefinitionAsync(AxisInformation yAxisDefinition) {
    ExtensionObject encoded = ExtensionObject.encode(client.getStaticSerializationContext(), yAxisDefinition);
    DataValue value = DataValue.valueOnly(new Variant(encoded));
    return getYAxisDefinitionNodeAsync().thenCompose(node -> node.writeAttributeAsync(AttributeId.Value, value));
}
Also used : Variant(org.eclipse.milo.opcua.stack.core.types.builtin.Variant) DataValue(org.eclipse.milo.opcua.stack.core.types.builtin.DataValue) ExtensionObject(org.eclipse.milo.opcua.stack.core.types.builtin.ExtensionObject)

Example 28 with ExtensionObject

use of org.eclipse.milo.opcua.stack.core.types.builtin.ExtensionObject in project milo by eclipse.

the class CubeItemTypeNode method writeZAxisDefinitionAsync.

@Override
public CompletableFuture<StatusCode> writeZAxisDefinitionAsync(AxisInformation zAxisDefinition) {
    ExtensionObject encoded = ExtensionObject.encode(client.getStaticSerializationContext(), zAxisDefinition);
    DataValue value = DataValue.valueOnly(new Variant(encoded));
    return getZAxisDefinitionNodeAsync().thenCompose(node -> node.writeAttributeAsync(AttributeId.Value, value));
}
Also used : Variant(org.eclipse.milo.opcua.stack.core.types.builtin.Variant) DataValue(org.eclipse.milo.opcua.stack.core.types.builtin.DataValue) ExtensionObject(org.eclipse.milo.opcua.stack.core.types.builtin.ExtensionObject)

Example 29 with ExtensionObject

use of org.eclipse.milo.opcua.stack.core.types.builtin.ExtensionObject in project milo by eclipse.

the class ImageItemTypeNode method writeXAxisDefinitionAsync.

@Override
public CompletableFuture<StatusCode> writeXAxisDefinitionAsync(AxisInformation xAxisDefinition) {
    ExtensionObject encoded = ExtensionObject.encode(client.getStaticSerializationContext(), xAxisDefinition);
    DataValue value = DataValue.valueOnly(new Variant(encoded));
    return getXAxisDefinitionNodeAsync().thenCompose(node -> node.writeAttributeAsync(AttributeId.Value, value));
}
Also used : Variant(org.eclipse.milo.opcua.stack.core.types.builtin.Variant) DataValue(org.eclipse.milo.opcua.stack.core.types.builtin.DataValue) ExtensionObject(org.eclipse.milo.opcua.stack.core.types.builtin.ExtensionObject)

Example 30 with ExtensionObject

use of org.eclipse.milo.opcua.stack.core.types.builtin.ExtensionObject in project milo by eclipse.

the class MultiStateValueDiscreteTypeNode method writeEnumValuesAsync.

@Override
public CompletableFuture<StatusCode> writeEnumValuesAsync(EnumValueType[] enumValues) {
    ExtensionObject[] encoded = ExtensionObject.encodeArray(client.getStaticSerializationContext(), enumValues);
    DataValue value = DataValue.valueOnly(new Variant(encoded));
    return getEnumValuesNodeAsync().thenCompose(node -> node.writeAttributeAsync(AttributeId.Value, value));
}
Also used : Variant(org.eclipse.milo.opcua.stack.core.types.builtin.Variant) DataValue(org.eclipse.milo.opcua.stack.core.types.builtin.DataValue) ExtensionObject(org.eclipse.milo.opcua.stack.core.types.builtin.ExtensionObject)

Aggregations

ExtensionObject (org.eclipse.milo.opcua.stack.core.types.builtin.ExtensionObject)191 Variant (org.eclipse.milo.opcua.stack.core.types.builtin.Variant)178 DataValue (org.eclipse.milo.opcua.stack.core.types.builtin.DataValue)98 NodeId (org.eclipse.milo.opcua.stack.core.types.builtin.NodeId)22 PropertyTypeNode (org.eclipse.milo.opcua.sdk.client.model.nodes.variables.PropertyTypeNode)16 UaException (org.eclipse.milo.opcua.stack.core.UaException)12 Identifiers (org.eclipse.milo.opcua.stack.core.Identifiers)11 UInteger (org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger)11 AttributeId (org.eclipse.milo.opcua.stack.core.AttributeId)10 Unsigned.uint (org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.Unsigned.uint)10 OpcUaServer (org.eclipse.milo.opcua.sdk.server.OpcUaServer)9 List (java.util.List)8 QualifiedName (org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName)8 Reference (org.eclipse.milo.opcua.sdk.core.Reference)7 LoggerFactory (org.slf4j.LoggerFactory)7 ArrayList (java.util.ArrayList)6 NoSuchElementException (java.util.NoSuchElementException)6 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)6 AbstractLifecycle (org.eclipse.milo.opcua.sdk.server.AbstractLifecycle)6 Session (org.eclipse.milo.opcua.sdk.server.Session)6