public Tag(ref Device device, TAGENTRY tTagEntry, DWORD dwRelativeOffset, DWORD dwParentOffset)
        {
            tagDevice = device;

            tagName = tTagEntry.strName;
            tagStringSize = tTagEntry.stringSize;
            tagArrayRows = tTagEntry.arrayRows;
            tagArrayCols = tTagEntry.arrayCols;
            tagDataType = tTagEntry.dataType;
            tagReadWrite = tTagEntry.Access;
            tagScanRateMS = 100;
            tagDescription = tTagEntry.description;
            tagGroupName = tTagEntry.groupName;

            tagRelativeOffset = dwRelativeOffset;
            tagSharedMemoryOffset = dwParentOffset + dwRelativeOffset;
            tagWriteRequestPending = false;
            tagReadRequestPending = false;
            tagWriteResponsePending = false;
            tagReadResponsePending = false;

            if ((tTagEntry.Access == AccessType.READONLY) ||
                (tTagEntry.Access == AccessType.READWRITE))
            {
                tagReadData = new TagData(tTagEntry.dataType,
                    tTagEntry.stringSize, tTagEntry.arrayRows, tTagEntry.arrayCols);
            }

            if ((tTagEntry.Access == AccessType.READWRITE) ||
                (tTagEntry.Access == AccessType.WRITEONLY))
            {
                tagWriteData = new TagData(tTagEntry.dataType,
                    tTagEntry.stringSize, tTagEntry.arrayRows, tTagEntry.arrayCols);
            }
        }
 public Tag(DWORD _readOffset, DWORD _writeOffset, VALTYPE vType, WORD stringSize, int rows, int cols)
 {
     readOffset = _readOffset;
     writeOffset = _writeOffset;
     tagReadData = new TagData(_readOffset, vType, stringSize, rows, cols);
     if (writeOffset != 0)
     {
         tagWriteData = new TagData(_writeOffset, vType, stringSize, rows, cols);
     }
 }