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

Julia support #54

Open
jonschumacher opened this issue Mar 25, 2021 · 1 comment · May be fixed by #58
Open

Julia support #54

jonschumacher opened this issue Mar 25, 2021 · 1 comment · May be fixed by #58

Comments

@jonschumacher
Copy link

jonschumacher commented Mar 25, 2021

Thanks for the vast range of bindings for Tinkerforge bricks. Is it planned to also port the bindings to Julia (https://julialang.org/)? I would be interested in using such bindings in various projects but I have to admit that I am a bit overwhelmed by implementing my own version of the IP connection. Is there any documentation about the interface to Brickv that I am missing?

@photron
Copy link
Member

photron commented Mar 25, 2021

There are no plans for Julia API bindings at the moment.

The internals of the API bindings are basically undocumented. There is a bit of documentation about the TCP/IP protocol the API bindings implement: https://www.tinkerforge.com/en/doc/Low_Level_Protocols/TCPIP.html

If you want to take a shot at implementing Julia API bindings you would have to implement the IPConnection class in Julia that takes care of the basic TCP/IP protocol handing and the request and response dispatch to the Device objects for the various Bricks and Bricklets. You would implement a basic Device class in Julia and then implement the generator in Python3 that generates the specific Device classes in Julia for all the Bricks and Bricklets based on the device configs. Finally there are Julia specific generators for the API documentation the ZIP file and Debian package that have to be implemented for complete Julia API bindings.

All API bindings follow the same basic model, but might differ slightly from each other.

The recommended approach is to pick one of the existing API bindings generators for a language that is close or similar to Julia. Copy that generator, rename it to the Julia API bindings generator and then modify it until it produces Julia API bindings. Yes, this is a bit of a tedious task. Also the existing code might be hard to follow in places, as the code base is complex and is coming near to its 10 year anniversary.

If you have any questions about the internals of the API bindings or the generators feel free to ask.

@jonschumacher jonschumacher linked a pull request Oct 15, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants