Package edu.wpi.first.util.datalog
Class IntegerArrayLogEntry
java.lang.Object
edu.wpi.first.util.datalog.DataLogEntry
edu.wpi.first.util.datalog.IntegerArrayLogEntry
Log array of integer values.
-
Field Summary
FieldsFields inherited from class edu.wpi.first.util.datalog.DataLogEntry
m_entry, m_log -
Constructor Summary
ConstructorsConstructorDescriptionIntegerArrayLogEntry(DataLog log, String name) Constructs a integer array log entry.IntegerArrayLogEntry(DataLog log, String name, long timestamp) Constructs a integer array log entry.IntegerArrayLogEntry(DataLog log, String name, String metadata) Constructs a integer array log entry.IntegerArrayLogEntry(DataLog log, String name, String metadata, long timestamp) Constructs a integer array log entry. -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(long[] value) Appends a record to the log.voidappend(long[] value, long timestamp) Appends a record to the log.long[]Gets the last value.booleanGets whether there is a last value.voidupdate(long[] value) Updates the last value and appends a record to the log if it has changed.voidupdate(long[] 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 integer array values.- See Also:
-
-
Constructor Details
-
IntegerArrayLogEntry
Constructs a integer array log entry.- Parameters:
log- datalogname- name of the entrymetadata- metadatatimestamp- entry creation timestamp (0=now)
-
IntegerArrayLogEntry
Constructs a integer array log entry.- Parameters:
log- datalogname- name of the entrymetadata- metadata
-
IntegerArrayLogEntry
Constructs a integer array log entry.- Parameters:
log- datalogname- name of the entrytimestamp- entry creation timestamp (0=now)
-
IntegerArrayLogEntry
Constructs a integer array 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 false if none.
-