TestDeviceCommunicator class abstract
Interface that plugins may implement to provide their own solution for communicating with external sources.
Constructors
Properties
- active → bool
-
Returns whether or not the communicator is currently active
no setter
-
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.no setter - 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.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- onConnectionChanged ← ConnectionChangedCallback
-
Sets the function that will be called whenever the
no getter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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 nonexistent 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