Search in sources :

Example 1 with RedundancySupport

use of org.eclipse.milo.opcua.stack.core.types.enumerated.RedundancySupport in project milo by eclipse.

the class ServerRedundancyTypeNode method getRedundancySupport.

@Override
public RedundancySupport getRedundancySupport() throws UaException {
    PropertyTypeNode node = getRedundancySupportNode();
    Object value = node.getValue().getValue().getValue();
    if (value instanceof Integer) {
        return RedundancySupport.from((Integer) value);
    } else if (value instanceof RedundancySupport) {
        return (RedundancySupport) value;
    } else {
        return null;
    }
}
Also used : UInteger(org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger) RedundancySupport(org.eclipse.milo.opcua.stack.core.types.enumerated.RedundancySupport) PropertyTypeNode(org.eclipse.milo.opcua.sdk.client.model.nodes.variables.PropertyTypeNode)

Aggregations

PropertyTypeNode (org.eclipse.milo.opcua.sdk.client.model.nodes.variables.PropertyTypeNode)1 UInteger (org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger)1 RedundancySupport (org.eclipse.milo.opcua.stack.core.types.enumerated.RedundancySupport)1