C# wrappers smV2


Hi, just getting started on my software project and had a few questions…

Any C# wrappers around for smV2?
Used Qt 5.10.1 MinGW 32bit build for smV2. Any known issues using this in C# under VS2017?
If I make my own communications drivers is there a document on serial communication details?



We haven’t implemented those type of wrappers yet, and we do not know about any current open source implementations. We know that some Simplemotion API users have implemented this type of wrappers successfully.


Are there any documents that define the send and receive bytes?


I had the same question few years ago. We had to catch and reverse engineer protocol in order to deal with it from Arduino since restoring protocol from the library source code proven to be even harder. It would be nice to have protocol description published…

But you can make your own wrapper for native DLL in C# - it’s very simple basic c# task. Don’t go to protocol implementation yourself.


I’m a novice programmer and haven’t done any wappers like this. I could just be over worried about getting it right because my requirements on the application side are steep. A year back I implemented a trinamic driver using their docs for I/O and it worked out great, but they also had a good command UI and working examples.


MSDN and stackoverflow both have quite good and simple examples how to do it. It would take you one day if you didn’t do it before. Deciphering protocol would take longer. You don’t have to wrap whole library - only things that you actually need. That would be few classes and few methods only. But it will be way more reliable. And you going to have useful practice.


In fact, it’s C lib, so no classes. Just pinvoke. Even simpler. Should take you few hours with docs reading on API and trying.


Thanks for a vote of confidence. Hopefully I’ll work something out because there aren’t many other options. You would think documenting the protocol for developers would have been the first document made and any libraries just backs up the logic. If I had the time and docs I would just make a C# native library for them but I’m on a non-disclosure at the moment. Can I ask why you had to figured out the protocol?


I kinda feel that guys doing it right. For now they can just update protocol and change a library. If protocol is open - you getting backward compatibility hell. And since FW space is limited - at some point you can’t expand it further. And it’s very simple API, so C# wrapper is very simple. Like few lines of code literally and it works.