package opc.ua.addressspace.nodeclasses;

import opc.ua.addressspace.datatypes.NodeId;
import opc.ua.addressspace.datatypes.TimeZone;

public class VariableNode extends BaseNode {

	/**
	 * attributes
	 */
	/**
	 * defined by dataType
	 */
	private Object value;
	
	private NodeId dataType;
	private int valueRank;
	private long[] arrayDimensions;
	
	/**
	 * Field          Bit Description
		CurrentRead    0   Indicates if the current value is
		                   readable
		                   (0 means not readable, 1 means
		                   readable).
		CurrentWrite   1   Indicates if the current value is
		                   writable
		                   (0 means not writable, 1 means
		                   writable).
		HistoryRead    2   Indicates if the history of the value
		                   is readable
		                   (0 means not readable, 1 means
		                   readable).
		HistoryWrite   3   Indicates if the history of the value
		                   is writable (0 means not writable, 1
		                   means writable).
		SemanticChange 4   Indicates if the Variable used as
		                   Property generates
		                   SemanticChangeEvents (see
		                   9.31).
		Reserved       5:7 Reserved for future use. Shall
		                   always be zero.
	 */
	private byte accessLevel;
	
	/**
	 * Field        Bit Description
		CurrentRead  0   Indicates if the current value is readable
		                 (0 means not readable, 1 means readable).
		CurrentWrite 1   Indicates if the current value is writable
		                 (0 means not writable, 1 means writable).
		HistoryRead  2   Indicates if the history of the value is
		                 readable
		                 (0 means not readable, 1 means readable).
		HistoryWrite 3   Indicates if the history of the value is writable
		                 (0 means not writable, 1 means writable).
		Reserved     4:7 Reserved for future use. Shall always be
		                 zero.
	 */
	private byte userAccessLevel;
	
	private double minimumSamplingInterval;
	private boolean historizing;
	
	/**
	 * references
	 */
	/** 
	 * TODO - OPC UA Part 3, p.39
	 */
	private BaseNode hasModellingRule;
	private BaseNode[] hasProperty;
	private BaseNode[] hasComponent;
	private BaseNode hasTypeDefinition;
	private BaseNode hasModelParent;
	// other references 
	
	/**
	 * properties
	 */
	private String nodeVersion;
	private TimeZone localTime;
	private String dataTypeVersion;
	private byte[] dictionaryFragment;
	private boolean allowNulls;
	
}
