public interface

SourceCallback

com.openxc.sources.SourceCallback
Known Indirect Subclasses

Class Overview

A recipient of measurement updates from a vehicle data source. A VehicleDataSource is given a callback that implements this interface. When new measurements arrive from the source, it uses the receive(VehicleMessage) method to pass along the new value.

Summary

Public Methods
abstract void receive(VehicleMessage measurement)
Receive a new measurement with at least a value and optionally an event.
abstract void sourceConnected(VehicleDataSource source)
The data source is connected, so if necessary, keep the device awake.
abstract void sourceDisconnected(VehicleDataSource source)
The data source is connected, so if necessary, let the device go to sleep.

Public Methods

public abstract void receive (VehicleMessage measurement)

Receive a new measurement with at least a value and optionally an event.

Parameters
measurement the new measurement.

public abstract void sourceConnected (VehicleDataSource source)

The data source is connected, so if necessary, keep the device awake.

public abstract void sourceDisconnected (VehicleDataSource source)

The data source is connected, so if necessary, let the device go to sleep.