replyFromVirtualDevice method
void
replyFromVirtualDevice(
- int seqNr,
- UrpResponse response
)
Implementation
void replyFromVirtualDevice(int seqNr, UrpResponse response) {
final message = UrpMessage(
header: UrpMessageHeader(
seqNr: seqNr,
origin: UrpDeviceIdentifier(
deviceClass: UrpDeviceClass.urpReader,
deviceType: _connectedReaderType!,
id: _connectedReaderAddress!,
),
target: UrpDeviceIdentifier(
deviceClass: UrpDeviceClass.urpHost,
id: "host",
),
),
response: response,
);
final bytes = message.writeToBuffer();
final length = _int16ToBytes(bytes.length);
onData(Uint8List.fromList(length + bytes));
}