Skip to content
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

Binary log parsing #9

Open
RickMeasham opened this issue May 11, 2020 · 3 comments
Open

Binary log parsing #9

RickMeasham opened this issue May 11, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@RickMeasham
Copy link
Contributor

The 5-minute logs are available at /dyn/genericLog.bin, however they're returned as binary data and script.xxxx.js decodes them and pushes them to the user as CSV.

This ticket isn't a bug report as these logs aren't yet implemented in the library. Instead it's a Feature ticket in case @Dymerz or anyone else has already done some work on rewriting the binary interpreter so we don't double up.

@RickMeasham
Copy link
Contributor Author

RickMeasham commented May 11, 2020

getLogConfig is passed to getLogData which calls either getLogChunksByDate or getLogChunksByLastRowStamp with the log config. These functions then ultimately call convertRows which uses the log config to pull bytes from the row and convert them into values.

getLogConfig calls /dyn/genericLogCfg.bin to get the config. This too is a binary response that needs parsing. Sigh.

@Dymerz
Copy link
Owner

Dymerz commented May 13, 2020

Ive tried to access to /dyn/genericLog.bin but without success so I've searched in the /scripts/vendor.xxxx.js and I've found the reference of functions you talk about, I haven't been deep into the script.

@Dymerz Dymerz added the enhancement New feature or request label May 13, 2020
@RickMeasham
Copy link
Contributor Author

I'm tempted to take the easy way out here and do what the graph endpoint appears to do: to get a 5 minute generation figure, subtract the total generation at the end of five minutes from the total generation at the end of the previous five minutes.

JSON Endpoint returns: Generation in period:
648511 -
648803 292
649612 809
650324 712
... ...

Heaps easier than parsing the binary data. Not as much fun though. But at the moment I need the numbers more than the fun.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants