public ReadCompleteEventArgs(
     int transactionId,
     int groupHandle,
     int quality,
     int errorCode,
     OpcItemState[] items)
 {
     TransactionId = transactionId;
     GroupHandle = groupHandle;
     MasterQuality = quality;
     MasterErrorCode = errorCode;
     Items = items;
 }
Пример #2
0
            public void OnReadComplete(int dwTransid, int hGroup, int hrMasterquality, int hrMastererror, int dwCount, int[] phClientItems, object[] pvValues, short[] pwQualities, System.Runtime.InteropServices.ComTypes.FILETIME[] pftTimeStamps, int[] pErrors)
            {
                var items = new OpcItemState[dwCount];

                for (int i = 0; i < dwCount; i++)
                {
                    var item = new OpcItemState();
                    item.ClientHandle = phClientItems[i];
                    item.DataValue    = pvValues[i];
                    item.ErrorCode    = pErrors[i];
                    item.Quality      = pwQualities[i];
                    item.Timestamp    = ComUtils.GetDateTime(pftTimeStamps[i]);
                    items[i]          = item;
                }
                _group.OnReadComplete(new ReadCompleteEventArgs(dwTransid, hGroup, hrMasterquality, hrMastererror, items));
            }