Ejemplo n.º 1
0
 private void SetPayload(QTPayload payload)
 {
     //payload
     PayloadWord = 0x0000;
     if (payload.QTSR)
     {
         PayloadWord |= 0x8000;
     }
     if (payload.QTMEM)
     {
         PayloadWord |= 0x4000;
     }
     if (payload.RFU13)
     {
         PayloadWord |= 0x2000;
     }
     if (payload.RFU12)
     {
         PayloadWord |= 0x1000;
     }
     if (payload.RFU11)
     {
         PayloadWord |= 0x0800;
     }
     if (payload.RFU10)
     {
         PayloadWord |= 0x0400;
     }
     if (payload.RFU9)
     {
         PayloadWord |= 0x0200;
     }
     if (payload.RFU8)
     {
         PayloadWord |= 0x0100;
     }
     if (payload.RFU7)
     {
         PayloadWord |= 0x0080;
     }
     if (payload.RFU6)
     {
         PayloadWord |= 0x0040;
     }
     if (payload.RFU5)
     {
         PayloadWord |= 0x0020;
     }
     if (payload.RFU4)
     {
         PayloadWord |= 0x0010;
     }
     if (payload.RFU3)
     {
         PayloadWord |= 0x0008;
     }
     if (payload.RFU2)
     {
         PayloadWord |= 0x0004;
     }
     if (payload.RFU1)
     {
         PayloadWord |= 0x0002;
     }
     if (payload.RFU0)
     {
         PayloadWord |= 0x0001;
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor to initialize the parameters QTReadWrite
 /// </summary>
 /// <param name="accessPassword">the access password</param>
 /// <param name="payLoad">comprises of qtSR - Bit 15 (MSB) is first transmitted bit of the
 /// payload field and qtMEM - Tag uses Public/Private Memory Map
 /// </param>
 /// <param name="controlByte">comprises of qtReadWrite - The Read/Write field indicates whether the tag
 /// reads or writes QT control data and
 /// </param>
 public QTReadWrite(UInt32 accessPassword, QTPayload payLoad, QTControlByte controlByte)
 {
     ChipType = 0x08;
     this.AccessPassword = accessPassword;
     SetPayload(payLoad);
     SetControlByte(controlByte);
 }