JavaScript is disabled on your browser.
Skip navigation links
com.openxc.sinks

Class FileRecorderSink

  • All Implemented Interfaces:
    VehicleDataSink


    public class FileRecorderSink
    extends java.lang.Object
    implements VehicleDataSink 
    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.
    • Method Summary

      All Methods
      Modifier and Type Method and Description
      void flush ()
      void receive (VehicleMessage message)
      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).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FileRecorderSink

        public FileRecorderSink(FileOpener fileOpener)
    • Method Detail

      • receive

        public void receive(VehicleMessage message)
         throws DataSinkException 
        Description copied from interface: VehicleDataSink
        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.
        Specified by:
        receive in interface VehicleDataSink
        Parameters:
        message - The new measurement.
        Throws:
        DataSinkException
      • stop

        public void stop()
        Description copied from interface: VehicleDataSink
        Release any acquired resources and either stop sending measurements (if a source) or stop expecting to receive them (if a sink).
        Specified by:
        stop in interface VehicleDataSink
      • flush

        public void flush()
Skip navigation links

AltStyle によって変換されたページ (->オリジナル) /