SimulatorServer class
- Inheritance
-
- Object
- ServerInterface
- SimulatorServer
Constructors
- SimulatorServer({required AutonomyInterface collection})
Properties
- collection → AutonomyInterface
-
finalinherited
- destination ↔ SocketInfo?
-
The destination port to send to.
getter/setter pairinherited
- device → Device
-
The rover device this socket represents.
finalinherited
- didReceivedHeartbeat ↔ bool
-
Whether this socket received a heartbeat since the last call to checkHeartbeats.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- heartbeatInterval → Duration
-
How often to check for heartbeats.
no setterinherited
- heartbeatTimer ↔ Timer?
-
A timer to call checkHeartbeats every heartbeatInterval.
getter/setter pairinherited
- isConnected → bool
-
Whether the socket is connected to the intended device(s).
no setterinherited
- logger → BurtLogger
-
A logger to capture important events during operation.
finalinherited
- port ↔ int?
-
The port this socket is listening on. See RawDatagramSocket.bind.
getter/setter pairinherited
- 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
Methods
-
checkHeartbeats(
) → Future< void> -
Checks if a heartbeat has been received. If not, calls onDisconnect.
inherited
-
dispose(
) → Future< void> -
Closes the socket.
inherited
-
init(
) → Future< bool> -
Initializes the socket, and restarts it if a known "safe" error occurs (see
allowedErrors
). -
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 -
onData(
Datagram packet) → void -
Override this function to process incoming data, along with the source address and port.
inherited
-
onDisconnect(
) → Future< void> -
Sends a
Disconnect
message to the dashboard and sets destination tonull
.inherited -
onHeartbeat(
Connect heartbeat, SocketInfo source) → void -
Handles incoming heartbeats.
inherited
-
onMessage(
WrappedMessage wrapper) → void -
Handles a non-heartbeat message, usually containing data or commands.
inherited
-
onShutdown(
) → Future< void> -
Shuts down the program by disposing the collection.
inherited
-
onWrapper(
WrappedMessage wrapper, SocketInfo source) → void -
A callback for when messages are received.
inherited
-
restart(
) → Future< void> -
Restarts this program, usually by disposing and re-initializing the collection.
inherited
-
sendCommand(
Message message) → void -
inherited
-
sendData(
List< int> data, {SocketInfo? destinationOverride}) → void -
Sends data to the given destination.
inherited
-
sendDone(
) → void -
sendHeartbeatResponse(
) → void -
Responds to an incoming heartbeat.
inherited
-
sendLog(
BurtLog log) → void -
Sends a log message or saves it until a Dashboard is connected.
inherited
-
sendMessage(
Message message, {SocketInfo? destinationOverride}) → void -
Wraps a message and sends it with sendWrapper.
inherited
-
sendWrapper(
WrappedMessage wrapper, {SocketInfo? destinationOverride}) → void -
Sends an already-wrapped
WrappedMessage
to the destination, or the givendestinationOverride
.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
updateSettings(
UpdateSetting settings) → Future< void> -
Handles an
UpdateSetting
command and updates the appropriate setting.inherited -
waitForConnection(
) → Future< void> -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited