public interface

VehicleDataSource

implements DataPipeline.Operator
com.openxc.sources.VehicleDataSource
Known Indirect Subclasses

Class Overview

The interface for all sources of raw vehicle measurements. Data is retrieved from a vehicle source by registering a callback object that implements the DataPipeline - its receive() methods are passed values from the data source.

Summary

Public Methods
abstract 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.
abstract void setCallback(SourceCallback callback)
Set the callback for receiving raw measurements as they are received.
abstract void stop()
Release any acquired resources and either stop sending measurements (if a source) or stop expecting to receive them (if a sink).
[Expand]
Inherited Methods
From interface com.openxc.DataPipeline.Operator

Public Methods

public abstract 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 abstract void setCallback (SourceCallback callback)

Set the callback for receiving raw measurements as they are received. Vehicle data sources only need to support a single callback, and in fact should not support more than one - all vehicle measurements should be directed to a single, central collector.

public abstract void stop ()

Release any acquired resources and either stop sending measurements (if a source) or stop expecting to receive them (if a sink).