public class

VehicleService

extends Service
implements DataPipeline.Operator
java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.app.Service
         ↳ com.openxc.remote.VehicleService

Class Overview

The VehicleService is the centralized source of all vehicle data. This server is intended to be a singleton on an Android device. All OpenXC applciations funnel data to and from this service so they can share sources, sinks and vehicle interfaces. Applications should not use this service directly, but should bind to the in-process VehicleManager instead - that has an interface that respects Measurement types. The interface used for the VehicleService is purposefully primative as there are a small set of objects that can be natively marshalled through an AIDL interface. Only one vehicle interface can be active at at time, and it can be set with the #setVehicleInterface(Class, String) method. This service uses the same DataPipeline as the VehicleManager to move data from sources to sinks, but it the pipeline is not modifiable by the application as there is no good way to pass running sources through the AIDL interface. The same style is used here for clarity and in order to share code.

Summary

[Expand]
Inherited Constants
From class android.app.Service
From class android.content.Context
From interface android.content.ComponentCallbacks2
Fields
public static boolean sIsUnderTest
Public Constructors
VehicleService()
Public Methods
IBinder onBind(Intent intent)
Initialize the service and data source when a client binds to us.
void onCreate()
void onDestroy()
Shut down any associated services when this service is about to die.
synchronized void onPipelineActivated()
void onPipelineDeactivated()
[Expand]
Inherited Methods
From class android.app.Service
From class android.content.ContextWrapper
From class android.content.Context
From class java.lang.Object
From interface android.content.ComponentCallbacks
From interface android.content.ComponentCallbacks2
From interface com.openxc.DataPipeline.Operator

Fields

public static boolean sIsUnderTest

Public Constructors

public VehicleService ()

Public Methods

public IBinder onBind (Intent intent)

Initialize the service and data source when a client binds to us.

public void onCreate ()

public void onDestroy ()

Shut down any associated services when this service is about to die. This stops the data source (e.g. stops trace playback) and kills the thread used for notifying measurement listeners.

public synchronized void onPipelineActivated ()

public void onPipelineDeactivated ()