public OPCItemState GetValue() { int[] handler = new int[1] { this.HandleServer }; OPC.Data.OPCItemState[] itemValues = this.Group.Read(handler); if (itemValues == null || itemValues.Length == 0) { return(null); } OPC.Data.OPCItemState s = itemValues[0]; if (HRESULTS.Succeeded(s.Error)) { return(s); } else { throw (new Exception("ERROR 0x" + s.Error.ToString("X"))); } }
public ItemValue(string id, OPC.Data.OPCItemState value) { this.id = id; this.value = value; }