ParameterStatusMessage constructor

ParameterStatusMessage(
  1. Uint8List bytes,
  2. Encoding encoding,
  3. TimeZoneSettings timeZone
)

Implementation

factory ParameterStatusMessage(
    Uint8List bytes, Encoding encoding, TimeZoneSettings timeZone) {
  final first0 = bytes.indexOf(0);
  final name = encoding.decode(bytes.sublist(0, first0));
  final value =
      encoding.decode(bytes.sublist(first0 + 1, bytes.lastIndexOf(0)));

  if (name.toLowerCase() == 'timezone') {
    timeZone.value = value;
    //print('ParameterStatusMessage ${timeZone.value} ');
  }
  return ParameterStatusMessage._(name, value);
}