getWeight method
Retrieves the weight from a connected scale device.
deviceIdentifier specifies the scale device (defaults to
DataWedgeScannerIdentifier.usbTgcsMp7000).
The result is delivered as a command result event on the events stream.
Implementation
Future<void> getWeight({
String deviceIdentifier = DataWedgeScannerIdentifier.usbTgcsMp7000,
String? commandTag,
bool requestResult = true,
}) {
return sendCommandBundle(
command: DataWedgeApi.scale,
value: DataWedgeScaleRequest(
deviceIdentifier: deviceIdentifier,
command: DataWedgeScaleCommand.getWeight,
).toMap(),
commandTag: commandTag ?? 'GET_WEIGHT',
requestResult: requestResult,
);
}