Package edu.wpi.first.util.datalog
Class FloatLogEntry
java.lang.Object
edu.wpi.first.util.datalog.DataLogEntry
edu.wpi.first.util.datalog.FloatLogEntry
Log float values.
-
Field Summary
FieldsFields inherited from class edu.wpi.first.util.datalog.DataLogEntry
m_entry, m_log -
Constructor Summary
ConstructorsConstructorDescriptionFloatLogEntry(DataLog log, String name) Constructs a float log entry.FloatLogEntry(DataLog log, String name, long timestamp) Constructs a float log entry.FloatLogEntry(DataLog log, String name, String metadata) Constructs a float log entry.FloatLogEntry(DataLog log, String name, String metadata, long timestamp) Constructs a float 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.floatGets 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 edu.wpi.first.util.datalog.DataLogEntry
finish, finish, setMetadata, setMetadata
-
Field Details
-
kDataType
The data type for float values.- See Also:
-
-
Constructor Details
-
FloatLogEntry
Constructs a float log entry.- Parameters:
log- datalogname- name of the entrymetadata- metadatatimestamp- entry creation timestamp (0=now)
-
FloatLogEntry
Constructs a float log entry.- Parameters:
log- datalogname- name of the entrymetadata- metadata
-
FloatLogEntry
Constructs a float log entry.- Parameters:
log- datalogname- name of the entrytimestamp- entry creation timestamp (0=now)
-
FloatLogEntry
Constructs a float log entry.- Parameters:
log- datalogname- name of the entry
-
-
Method Details
-
append
Appends a record to the log.- Parameters:
value- Value to recordtimestamp- Time stamp (0 to indicate now)
-
append
Appends a record to the log.- Parameters:
value- Value to record
-
update
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 (0 to indicate now)
-
update
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
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
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 0 if none.
-