src/utilities.js
function processMultiBytePacket (o) {
  if (o.multiPacketBuffer) {
    o.multiPacketBuffer = Buffer.concat([Buffer.from(o.multiPacketBuffer), Buffer.from(o.rawDataPacket.slice(k.OBCIGanglionPacket19Bit.dataStart, k.OBCIGanglionPacket19Bit.dataStop))]);
  } else {
    o.multiPacketBuffer = o.rawDataPacket.slice(k.OBCIGanglionPacket19Bit.dataStart, k.OBCIGanglionPacket19Bit.dataStop);
  }
}
function processMultiBytePacket (o) {
  if (o.multiPacketBuffer) {
    o.multiPacketBuffer = Buffer.concat([Buffer.from(o.multiPacketBuffer), Buffer.from(o.rawDataPacket.slice(k.OBCIGanglionPacket19Bit.dataStart, k.OBCIGanglionPacket19Bit.dataStop))]);
  } else {
    o.multiPacketBuffer = o.rawDataPacket.slice(k.OBCIGanglionPacket19Bit.dataStart, k.OBCIGanglionPacket19Bit.dataStop);
  }
}
function processMultiBytePacket ( o ) { if ( o . multiPacketBuffer ) { o . multiPacketBuffer = Buffer . concat ( [ Buffer . from ( o . multiPacketBuffer ) , Buffer . from ( o . rawDataPacket . slice ( k . OBCIGanglionPacket19Bit . dataStart , k . OBCIGanglionPacket19Bit . dataStop ) ) ] ) ; } else { o . multiPacketBuffer = o . rawDataPacket . slice ( k . OBCIGanglionPacket19Bit . dataStart , k . OBCIGanglionPacket19Bit . dataStop ) ; } }
Used to stack multi packet buffers into the multi packet buffer. This is finally emitted when a stop packet byte id
is received.
@param o {RawDataToSample} - Used to hold data and configuration settings
@private
Used to stack multi packet buffers into the multi packet buffer . This is finally emitted when a stop packet byte id is received .