createRequest method
Constructs and returns a request command packet.
Implementation
Uint8List createRequest() {
var length = 0;
var types = List<int>.filled(_values.length * 2, 0, growable: false);
var nullMap = createNullMap();
preparedValues = List.filled(_values.length, 0, growable: false);
for (var i = 0; i < _values.length; i++) {
types[i * 2] = _getType(_values[i]);
types[i * 2 + 1] = 0;
preparedValues[i] = prepareValue(_values[i]);
length += measureValue(_values[i], preparedValues[i]);
}
var buffer = writeValuesToBuffer(nullMap, length, types);
return buffer;
}