public class TestVehicleInterface extends java.lang.Object implements VehicleInterface
| Constructor and Description |
|---|
TestVehicleInterface(android.content.Context context,
java.lang.String resource) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isConnected()
Return true if the interface is actively connected to the vehicle.
|
void |
onPipelineActivated() |
void |
onPipelineDeactivated() |
void |
receive(VehicleMessage measurement)
Receive a data point with a name, a value and a event value.
|
void |
setCallback(SourceCallback callback)
Set the callback for receiving raw measurements as they are received.
|
boolean |
setResource(java.lang.String resource)
Change the resource used by the instance to connect to the interface,
restarting any necessary services.
|
void |
stop()
Release any acquired resources and either stop sending measurements (if a
source) or stop expecting to receive them (if a sink).
|
public TestVehicleInterface(android.content.Context context,
java.lang.String resource)
public boolean setResource(java.lang.String resource)
throws DataSourceException
VehicleInterfacesetResource in interface VehicleInterfaceresource - The new resource to use for the interface.DataSourceExceptionpublic void setCallback(SourceCallback callback)
VehicleDataSourcesetCallback in interface VehicleDataSourcepublic boolean isConnected()
VehicleInterfaceisConnected in interface VehicleInterfaceisConnected in interface VehicleDataSourcepublic void stop()
VehicleDataSourcestop in interface VehicleDataSinkstop in interface VehicleDataSourcepublic void receive(VehicleMessage measurement) throws DataSinkException
VehicleDataSinkreceive in interface VehicleDataSinkmeasurement - The new measurement.DataSinkExceptionpublic void onPipelineActivated()
onPipelineActivated in interface DataPipeline.Operatorpublic void onPipelineDeactivated()
onPipelineDeactivated in interface DataPipeline.Operator