-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add usb-serial network interface skeleton-code and update README.md
- Loading branch information
1 parent
da0e10e
commit 45fc742
Showing
4 changed files
with
41 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import 'package:VirtualFlightThrottle/network/interface/network_interface.dart'; | ||
|
||
class USBSerialNetworkAgent extends NetworkAgent { | ||
|
||
USBSerialNetworkAgent(String address, Function onSessionKilled): super(address, onSessionKilled); | ||
|
||
@override | ||
void sendData(NetworkData networkData) {} | ||
|
||
@override | ||
void removeConnection() {} | ||
} | ||
|
||
class USBSerialNetworkManager extends NetworkManager { | ||
|
||
@override | ||
Future<bool> checkInterfaceAlive() async => Future<bool>.value(false); | ||
|
||
@override | ||
Future<String> getLocalAddress() async => Future<String>.value("None"); | ||
|
||
@override | ||
Future<List<String>> findAliveTargetList() async {return Future.value([]);} | ||
|
||
@override | ||
Future<void> connectToTarget(String targetAddress, Function() onSessionLost) async {return Future.value();} | ||
|
||
@override | ||
String toString() => "USB"; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters