public class

UserSink

extends Object
implements VehicleDataSink
java.lang.Object
   ↳ com.openxc.sinks.UserSink

Class Overview

Pass measurements from a user-level data sources back to the remote VehicleService. This sink is a bit of a special case - it's used by the VehicleManager to pass measurement updates from a user's data sources back to the VehicleService, so it can propagate them to all OpenXC apps.

Summary

Public Constructors
UserSink(VehicleServiceInterface service)
Registers a measurement listener with the remote service.
Public Methods
void receive(VehicleMessage measurement)
Receive a data point with a name, a value and a event value.
void stop()
Release any acquired resources and either stop sending measurements (if a source) or stop expecting to receive them (if a sink).
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.openxc.sinks.VehicleDataSink

Public Constructors

public UserSink (VehicleServiceInterface service)

Registers a measurement listener with the remote service.

Public Methods

public void receive (VehicleMessage measurement)

Receive a data point with a name, a value and a event value. The implementation of this method should not block, lest the vehicle data source get behind in processing data from a source potentially external to the system.

Parameters
measurement The new measurement.

public void stop ()

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

public String toString ()