1.1 KiB
1.1 KiB
knx_stack_tpuart
knx_stack_tpuart is the Flutter adapter that bridges knx_stack to TPUART serial hardware.
Status
This is the initial implementation slice. The package already exposes runtime compatibility reporting and a raw serial-byte transport. The TPUART state machine, reset flow, ACK handling, and cEMI adaptation will be layered on top of this transport in later slices.
Platform compatibility
- macOS: supported.
- Linux: supported.
- Windows: supported.
- Android: conditional. The adapter package is present, but Android-specific validation still needs real-device coverage.
- iOS: unsupported.
- Web: unsupported.
Usage
import 'package:knx_stack_tpuart/knx_stack_tpuart.dart';
Future<void> main() async {
final support = KnxTpUartSupport.current();
final serialSupport = support.supportFor(KnxFeature.tpuartTransport);
if (!serialSupport.isSupported) {
throw UnsupportedError(serialSupport.summary);
}
final transport = KnxTpUartTransport(portName: '/dev/ttyUSB0');
await transport.connect();
await transport.disconnect();
}