Class FloatArrayLogEntry
java.lang.Object
org.wpilib.datalog.DataLogEntry
org.wpilib.datalog.FloatArrayLogEntry
Log array of float values.
-
Field Summary
FieldsFields inherited from class DataLogEntry
m_entry, m_log -
Constructor Summary
ConstructorsConstructorDescriptionFloatArrayLogEntry(DataLog log, String name) Constructs a float array log entry.FloatArrayLogEntry(DataLog log, String name, long timestamp) Constructs a float array log entry.FloatArrayLogEntry(DataLog log, String name, String metadata) Constructs a float array log entry.FloatArrayLogEntry(DataLog log, String name, String metadata, long timestamp) Constructs a float array log entry. -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(float[] value) Appends a record to the log.voidappend(float[] value, long timestamp) Appends a record to the log.float[]Gets the last value.booleanGets whether there is a last value.voidupdate(float[] value) Updates the last value and appends a record to the log if it has changed.voidupdate(float[] value, long timestamp) Updates the last value and appends a record to the log if it has changed.Methods inherited from class DataLogEntry
finish, finish, setMetadata, setMetadata
-
Field Details
-
DATA_TYPE
-
-
Constructor Details
-
FloatArrayLogEntry
-
FloatArrayLogEntry
-
FloatArrayLogEntry
-
FloatArrayLogEntry
-
-
Method Details
-
append
public void append(float[] value, long timestamp) Appends a record to the log.- Parameters:
value- Value to recordtimestamp- Time stamp in nanoseconds (0 to indicate now)
-
append
public void append(float[] value) Appends a record to the log.- Parameters:
value- Value to record
-
update
public void update(float[] value, long timestamp) Updates the last value and appends a record to the log if it has changed.Note: the last value is local to this class instance; using update() with two instances pointing to the same underlying log entry name will likely result in unexpected results.
- Parameters:
value- Value to recordtimestamp- Time stamp in nanoseconds (0 to indicate now)
-
update
public void update(float[] value) Updates the last value and appends a record to the log if it has changed.Note: the last value is local to this class instance; using update() with two instances pointing to the same underlying log entry name will likely result in unexpected results.
- Parameters:
value- Value to record
-
hasLastValue
public boolean hasLastValue()Gets whether there is a last value.Note: the last value is local to this class instance and updated only with update(), not append().
- Returns:
- True if last value exists, false otherwise.
-
getLastValue
public float[] getLastValue()Gets the last value.Note: the last value is local to this class instance and updated only with update(), not append().
- Returns:
- Last value, or false if none.
-