CellularConfig.parse constructor
CellularConfig.parse(
- ByteData data_
Implementation
factory CellularConfig.parse(ByteData data_) {
if (data_.lengthInBytes < CellularConfig.mavlinkEncodedLength) {
var len = CellularConfig.mavlinkEncodedLength - data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var enableLte = data_.getUint8(0);
var enablePin = data_.getUint8(1);
var pin = MavlinkMessage.asInt8List(data_, 2, 16);
var newPin = MavlinkMessage.asInt8List(data_, 18, 16);
var apn = MavlinkMessage.asInt8List(data_, 34, 32);
var puk = MavlinkMessage.asInt8List(data_, 66, 16);
var roaming = data_.getUint8(82);
var response = data_.getUint8(83);
return CellularConfig(
enableLte: enableLte,
enablePin: enablePin,
pin: pin,
newPin: newPin,
apn: apn,
puk: puk,
roaming: roaming,
response: response);
}