A Dart library for UDP communication, featuring our Protobuf data and our heartbeat + handshake protocol.
See the docs for details.
Use the RoverSocket
class to handle messages, heartbeats, and logs from the rover. On the Dashboard, subclass BurtSocket
.
import "package:burt_network/burt_network.dart";
void main() async {
final socket = RoverSocket(port: 8001, device: Device.SUBSYSTEMS);
socket.messages.onMessage(
name: ScienceData().messageName,
constructor: ScienceData.fromBuffer,
callback: (data) => print(data.co2),
);
}