RoverHeartbeats mixin

A mixin that automatically handles rover-side heartbeats.

Superclass Constraints
Mixin Applications

Properties

collection Service?
The main service, or collection of services, of the program, if any.
getter/setter pairinherited
destination SocketInfo?
The destination port to send to.
getter/setter pairinherited
device Device
The device this socket will be used on.
finalinherited
didReceivedHeartbeat bool
Whether this socket received a heartbeat since the last call to checkHeartbeats.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
heartbeatInterval Duration
How often to check for new heartbeats.
no setteroverride
isConnected bool
Whether the device on the other end is connected.
no setteroverride
logger BurtLogger
A logger to capture important events during operation.
finalinherited
messages Stream<WrappedMessage>
A stream of WrappedMessages as they arrive in the UDP socket.
no setterinherited
port int?
The port this socket is listening on. See RawDatagramSocket.bind.
no setterinherited
quiet bool
Whether to silence "normal" output, like opening/closing and resetting sockets.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream Stream<Datagram>
A stream containing all the data coming out of the socket.
no setterinherited

Methods

checkHeartbeats() Future<void>
Checks if a heartbeat has been received. If not, calls onDisconnect.
override
dispose() Future<void>
Closes the connection to the device.
inherited
init() Future<bool>
Initializes the connection to the device.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onConnect(SocketInfo source) → void
Sets destination to the incoming source.
inherited
onDisconnect() Future<void>
Sends a Disconnect message to the dashboard and sets destination to null.
inherited
onHeartbeat(Heartbeat heartbeat, SocketInfo source) → void
Handles incoming heartbeats.
override
onSettings(NetworkSettings settings) → void
Handle an incoming request to change network settings.
inherited
send(List<int> data, {SocketInfo? destination}) → void
Sends data to the given destination.
inherited
sendHeartbeatResponse() → void
Responds to an incoming heartbeat.
sendMessage(Message message, {SocketInfo? destination}) → void
Sends a Message over the socket (in a WrappedMessage).
inherited
sendWrapper(WrappedMessage wrapper, {SocketInfo? destination}) → void
Sends a WrappedMessage over the socket.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited