TestDeviceCommunicator class Null safety

Interface that plugins may implement to provide their own solution for communicating with external sources.

Constructors

TestDeviceCommunicator()

Properties

active bool
Returns whether or not the communicator is currently active
read-only
commandStream Stream<DeviceCommand>
Returns the stream that will fire whenever the communicator receives a command from the external driver. This may return null if the communicator is not currently active.
read-only
connected bool
Returns whether the communicator is currently connected to the external source or not. This may be false because the communicator is not connected, but still trying to connect. To determine if the communicator is trying to connect, use the active property.
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
onConnectionChanged ConnectionChangedCallback
Sets the function that will be called whenever the
write-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

activate(Future<TestDeviceInfo> testDeviceInfoBuilder()) Future<void>
Instructs the driver to connect to the external source. By the time the returned Future completes, the commandStream must be available to be listened to.
deactivate() Future<void>
Instructs the driver to deactivate and disconnect from any external source.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
sendCommand(DeviceCommand command) Future<void>
This will send the comamnd to the external source. If the communicator is not active, this will throw an exception. If the communicator is offline, but active, it should send the command the next time it reconnects.
toString() String
A string representation of this object. [...]
inherited

Operators

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