-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
[Question] Can the P1Parser class be used on Windows or Linux PC hardware or on a microcontroller without Arduino library? #51
Comments
You should be able to. Arduino code is really just C++ code, and I think I've written the parser class separate from the reader class to make the parser not depend on any Arduino libraries/core code. I guess it would be a matter of including all files in your C++ project and including the right files (just don't include |
Unfortunately, the situation is more complicated. The parser at least depends on the Arduino |
@matthijskooijman, |
Good point, I had missed that it seems. It's because the AVR Arduino core does not have libstdc++ available, so it has not
From a quick glance at the code, I guess it might be sufficient to:
e.g. replaces this function: Lines 54 to 60 in 5a0b558
By: static void concat_hack(String& s, const char *append, size_t n) {
s.append(append, n);
} It seems the other operations on I haven't tested this, so there might be more required changes. If you do test this, let me know the result and we can maybe figure out how to integrate this into the main codebase. |
@matthijskooijman, |
By the way, I have also written my own DSMR parser: DsmrParserLite. |
The parser implementation tightly depends on Arduino framework.
I want to use the parser on a different microcontroller platform without Arduino libraries.
Also, I would like to be able to run the parser on my development machine for unit testing purposes.
Has anyone tried to do it before? What steps would I need to take to achieve that?
The text was updated successfully, but these errors were encountered: