GNSS eszközhöz való kapcsolódás és bluetooth kommunikáció refraktorálása külön osztályokba
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// lib/services/gnss/gnss_connection.dart
|
||||
|
||||
enum GnssConnectionType { btSerial, ble }
|
||||
|
||||
enum GnssConnectionState { disconnected, connecting, connected, error }
|
||||
|
||||
abstract class GnssConnection {
|
||||
GnssConnectionType get type;
|
||||
|
||||
/// NMEA sorok stream-je — mindkét implementáció ezt adja
|
||||
Stream<String> get nmeaLines;
|
||||
|
||||
/// Kapcsolat állapota
|
||||
Stream<GnssConnectionState> get connectionState;
|
||||
|
||||
Future<void> connect(String address);
|
||||
Future<void> disconnect();
|
||||
|
||||
void dispose();
|
||||
}
|
||||
Reference in New Issue
Block a user