public class TestSource extends BaseVehicleDataSource
Modifier and Type | Field and Description |
---|---|
SourceCallback |
callback |
boolean |
delayAfterInject |
Constructor and Description |
---|
TestSource() |
Modifier and Type | Method and Description |
---|---|
void |
inject(java.lang.String name,
java.lang.Object value) |
void |
inject(VehicleMessage message) |
boolean |
isConnected()
Return true if the data source is actively connected to its target, be it
a USB endpoint, a Bluetooth channel, a trace file, etc.
|
void |
sendTestMessage() |
void |
setCallback(SourceCallback theCallback)
Set the current source callback to the given value.
|
void |
stop()
Clear the callback so no further updates are sent.
|
connected, disconnected, getCallback, getTag, handleMessage, onPipelineActivated, onPipelineDeactivated, waitForCallback
public SourceCallback callback
public boolean delayAfterInject
public void sendTestMessage()
public void inject(java.lang.String name, java.lang.Object value)
public void inject(VehicleMessage message)
public void setCallback(SourceCallback theCallback)
BaseVehicleDataSource
setCallback
in interface VehicleDataSource
setCallback
in class BaseVehicleDataSource
theCallback
- a valid callback or null if you wish to stop the source
from sending updates.public void stop()
BaseVehicleDataSource
stop
in interface VehicleDataSource
stop
in class BaseVehicleDataSource
public boolean isConnected()
VehicleDataSource
isConnected
in interface VehicleDataSource
isConnected
in class BaseVehicleDataSource