com.kuka.common
Class DataRecorderLogParser

java.lang.Object
  extended by com.kuka.common.DataRecorderLogParser

public class DataRecorderLogParser
extends Object

Parser for extracting logged data from files created by the DataRecorder.


Constructor Summary
DataRecorderLogParser(InputStream logStream)
          Constructor with a stream pointing to the log file.
 
Method Summary
 double[][] getCommandedCartesianPosition(int measurementIndex)
          Reads commanded Cartesian position values from the log file.
 double[][] getMeasuredCartesianPosition(int measurementIndex)
          Reads measured Cartesian position values from the log file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataRecorderLogParser

public DataRecorderLogParser(InputStream logStream)
Constructor with a stream pointing to the log file.

Parameters:
logStream - The stream for the log file. Needs to point to the beginning of the file.
Method Detail

getMeasuredCartesianPosition

public double[][] getMeasuredCartesianPosition(int measurementIndex)
                                        throws IOException
Reads measured Cartesian position values from the log file.

Parameters:
measurementIndex - The index of the measurement. This index starts from 1, when a measurement is added to the DataRecorder by the DataRecorder.addCurrentCartesianPositionXYZ() method, and is incremented if the same measurement is added again.
Returns:
The measurements in a 2D array. The first dimension is the time, the second dimension contains the measurements along the X, Y and Z axes, in that order.
Throws:
IOException - If an IO operation fails during the parsing.

getCommandedCartesianPosition

public double[][] getCommandedCartesianPosition(int measurementIndex)
                                         throws IOException
Reads commanded Cartesian position values from the log file.

Parameters:
measurementIndex - The index of the measurement. This index starts from 1, when a measurement is added to the DataRecorder by the DataRecorder.addCommandedCartesianPositionXYZ() method, and is incremented if the same measurement is added again.
Returns:
The measurements in a 2D array. The first dimension is the time, the second dimension contains the measurements along the X, Y and Z axes, in that order.
Throws:
IOException - If an IO operation fails during the parsing.


Copyright © 2019. All rights reserved.