Class IntegerArrayLogEntry
java.lang.Object
org.wpilib.datalog.DataLogEntry
org.wpilib.datalog.IntegerArrayLogEntry
Log array of integer values.
-
Field Summary
FieldsFields inherited from class 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 DataLogEntry
finish, finish, setMetadata, setMetadata
-
Field Details
-
DATA_TYPE
-
-
Constructor Details
-
IntegerArrayLogEntry
-
IntegerArrayLogEntry
-
IntegerArrayLogEntry
-
IntegerArrayLogEntry
-
-
Method Details
-
append
public void append(long[] 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(long[] value) Appends a record to the log.- Parameters:
value- Value to record
-
update
public void update(long[] 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(long[] 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 long[] 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.
-