-
Notifications
You must be signed in to change notification settings - Fork 671
[datalog] Add java entry map #8377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 2027
Are you sure you want to change the base?
Conversation
b297fca to
4f478ff
Compare
4f478ff to
fc0fb6e
Compare
|
The C++ DataLogReader class does not have these functions, only DataLogReaderThread does. DataLogReaderThread reads the entire file (in the background) in order to build the map, and the user can separately check (or have a signal callback) to find out when reading is complete. The current approach in this PR has a major flaw in that it doesn't read the entire file for the user. A user would need to iterate over the entire file first (to build the map) before the added functions would work. This ordering dependency is not obvious in the API. Also, in Java, you might not want to construct entries for the entire file, so this background scan should probably not do that, and manually decode only the start and finish records? |
datalog/src/main/java/org/wpilib/datalog/DataLogReaderThread.java
Outdated
Show resolved
Hide resolved
datalog/src/main/java/org/wpilib/datalog/DataLogReaderThread.java
Outdated
Show resolved
Hide resolved
94aeaeb to
192a0f7
Compare
The C++
DataLogReaderclasses allow the user to get the name, type, metadata, etc. of any entry in a log given only its entry id using an internal map. The java library does not expose this functionality, so this is a proof of concept at one way this could be added. There are some very obvious warts but I want to get feedback if I am even barking up the right tree to begin with.Closes #8126
TODO: