getMessageIdFromHeaderIfSyncNumberOk function

(int?, int?) getMessageIdFromHeaderIfSyncNumberOk(
  1. ByteData byteData,
  2. int offset
)

Implementation

(int?, int?) getMessageIdFromHeaderIfSyncNumberOk(
    ByteData byteData, int offset) {
  var (endianness, syncNumber) = getEndianness(byteData, offset);
  if (endianness == null) return (null, null);
  var msgId = byteData.getUint16(offset + 2, endianness);
  return (msgId, syncNumber);
}