public class

TestSource

extends BaseVehicleDataSource
java.lang.Object
   ↳ com.openxc.sources.BaseVehicleDataSource
     ↳ com.openxc.sources.TestSource

Summary

Fields
public SourceCallback callback
public boolean delayAfterInject
Public Constructors
TestSource()
Public Methods
void inject(VehicleMessage message)
void inject(String name, Object value)
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.
[Expand]
Inherited Methods
From class com.openxc.sources.BaseVehicleDataSource
From class java.lang.Object
From interface com.openxc.DataPipeline.Operator
From interface com.openxc.sources.VehicleDataSource

Fields

public SourceCallback callback

public boolean delayAfterInject

Public Constructors

public TestSource ()

Public Methods

public void inject (VehicleMessage message)

public void inject (String name, Object value)

public 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. The source is capable of providing new vehicle data. Returns true if connected, false otherwise.

public void sendTestMessage ()

public void setCallback (SourceCallback theCallback)

Set the current source callback to the given value.

Parameters
theCallback a valid callback or null if you wish to stop the source from sending updates.

public void stop ()

Clear the callback so no further updates are sent. Subclasses should be sure to call super.stop() so they also stop sending updates when killed by a user.