public interface

VehicleInterface

implements VehicleDataSink VehicleDataSource
com.openxc.interfaces.VehicleInterface
Known Indirect Subclasses

Class Overview

A connection to a physical vehicle interface that is capable of full duplex communication. This is a simple combination of two other interfaces to represent an interface capable of full duplex communication. The methods of VehicleDataSource are used to receive data from the vehicle, and the methods of VehicleDataSink are used to send data back to the vehicle. Implementation of this interface are expected to have a constructor that accepts (Context context, String resource) where "context" is an active Android application context (used to be able to refer to Android services and system managers) and "resource" is a String, the format of which is defined by the implementer (e.g. a URI, a MAC address, etc).

Summary

Public Methods
abstract boolean isConnected()
Return true if the interface is actively connected to the vehicle.
abstract boolean setResource(String resource)
Change the resource used by the instance to connect to the interface, restarting any neccessary services.
[Expand]
Inherited Methods
From interface com.openxc.DataPipeline.Operator
From interface com.openxc.sinks.VehicleDataSink
From interface com.openxc.sources.VehicleDataSource

Public Methods

public abstract boolean isConnected ()

Return true if the interface is actively connected to the vehicle.

public abstract boolean setResource (String resource)

Change the resource used by the instance to connect to the interface, restarting any neccessary services.

Parameters
resource The new resource to use for the interface.
Returns
  • true if the resource was different and the interface was restarted.