public class

FileRecorderSink

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

Class Overview

Record raw vehicle messages to a file as JSON. This data sink is a simple passthrough that records every raw vehicle message as it arrives to a file on the device. It uses a heuristic to detect different "trips" in the vehicle, and splits the recorded trace by trip. The heuristic is very simple: if we haven't received any new data in a while, consider the previous trip to have ended. When activity resumes, start a new trip.

Summary

Public Constructors
FileRecorderSink(FileOpener fileOpener)
Public Methods
synchronized void flush()
synchronized void receive(VehicleMessage message)
Receive a data point with a name, a value and a event value.
synchronized 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 class java.lang.Object
From interface com.openxc.sinks.VehicleDataSink

Public Constructors

public FileRecorderSink (FileOpener fileOpener)

Public Methods

public synchronized void flush ()

public synchronized void receive (VehicleMessage message)

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
message The new measurement.

public synchronized void stop ()

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