Package com.digitalpetri.opcua.nodeset.attributes

Source Code of com.digitalpetri.opcua.nodeset.attributes.ViewNodeAttributes

package com.digitalpetri.opcua.nodeset.attributes;

import org.opcfoundation.ua.builtintypes.UnsignedByte;
import org.opcfoundation.ua.core.NodeClass;
import org.opcfoundation.ua.generated.GeneratedUAView;

public class ViewNodeAttributes {

    private final NodeAttributes nodeAttributes;

    private final boolean containsNoLoops;
    private final UnsignedByte eventNotifier;

    public ViewNodeAttributes(NodeAttributes nodeAttributes,
                              boolean containsNoLoops,
                              UnsignedByte eventNotifier) {

        this.nodeAttributes = nodeAttributes;
        this.containsNoLoops = containsNoLoops;
        this.eventNotifier = eventNotifier;
    }

    public NodeAttributes getNodeAttributes() {
        return nodeAttributes;
    }

    public boolean isContainsNoLoops() {
        return containsNoLoops;
    }

    public UnsignedByte getEventNotifier() {
        return eventNotifier;
    }

    @Override
    public String toString() {
        return "ViewNodeAttributes{" +
                "nodeAttributes=" + nodeAttributes +
                ", containsNoLoops=" + containsNoLoops +
                ", eventNotifier=" + eventNotifier +
                '}';
    }

    public static ViewNodeAttributes fromGenerated(GeneratedUAView generated) {
        NodeAttributes nodeAttributes = NodeAttributes.fromGenerated(generated, NodeClass.View);

        boolean containsNoLoops = generated.isContainsNoLoops();
        UnsignedByte eventNotifier = new UnsignedByte(generated.getEventNotifier());

        return new ViewNodeAttributes(nodeAttributes, containsNoLoops, eventNotifier);
    }

}
TOP

Related Classes of com.digitalpetri.opcua.nodeset.attributes.ViewNodeAttributes

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.