You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
establish a connection with the rover (it's UDP, so probably just a few pings)
send messages to the rover as serialized Protobuf messages
receive Protobuf messages from the rover
Loosely going from the above, we'd probably need the following:
classRoverNetworkextendsService {
Future<void> init(); // send pings until receive responseFuture<void> send(RoverMessage message); // sends a message to the roverStream<RoverMessage> incomingMessages; // receives incoming messages from the rover
}
We'd use a stream for incoming messages since dart:io uses it for its RawDatagramSocket UDP implementation. It will also help the front end, which has built-in support for updating widget values based on data from a Stream object.
The text was updated successfully, but these errors were encountered:
We've decided to go with a Stream-like API, but without directly exposing streams. We're using:
classMessageSenderextendsService {
/// Wraps [message] in a [WrapperMessage] and sends over UDP.Future<void> send(Message message);
}
classMessageReceiverextendsService {
/// Runs [handler] with the message decoded by [decoder] whenever a message of type [name] appears.voidregisterHandler<TextendsMessage>({
requiredString name,
requiredMessageDecoder<T> decoder,
requiredHandler<T> handler
});
}
We need a
RoverNetwork
service that can:Loosely going from the above, we'd probably need the following:
We'd use a stream for incoming messages since
dart:io
uses it for itsRawDatagramSocket
UDP implementation. It will also help the front end, which has built-in support for updating widget values based on data from aStream
object.The text was updated successfully, but these errors were encountered: