예제 #1
0
 public EpcMessage(MessgaeType mType, ushort mOIndex, byte mDataLength, int value)
 {
     _mType       = mType;
     ObjectIndex  = mOIndex;
     _mDataLength = mDataLength;
     Value        = value;
 }
예제 #2
0
 public EpcMessage(byte[] message)
 {
     _mType = (MessgaeType)message[0];
     _mId   = (short)BitConverter.ToUInt16(new byte[2] {
         message[2], message[3]
     }, 0);
     ObjectIndex = BitConverter.ToUInt16(new byte[2] {
         message[4], message[5]
     }, 0);
     _mDataLength = BitConverter.ToInt16(new byte[2] {
         message[6], message[7]
     }, 0);
     Value = BitConverter.ToInt32(new byte[4] {
         message[8], message[9], message[10], message[11]
     }, 0);
 }