public void pull(FrameBuffer frameBuffer) {
   frameBuffer.put(address64.array());
   frameBuffer.putInt8(options);
   if (packet != null) {
     frameBuffer.put(packet);
   }
 }
Esempio n. 2
0
 private void addCRC() {
   if (crcMode) {
     crc16.reset(0);
     for (int i = 0; i < XBlock.DATA_SIZE; i++) {
       crc16.update(writeBuffer[3 + i]);
     }
     writeFrameBuffer.putInt16(crc16.getCRC());
   } else {
     int cs = 0;
     for (int i = 0; i < XBlock.DATA_SIZE; i++) {
       cs += writeBuffer[3 + i];
     }
     writeFrameBuffer.putInt8(cs);
   }
 }