[Question] Best strategy for wrapping a c++ library to interface a hardware sensor with a c# project

Hi, I have been doing c# a while, but have very limited c++ experience (i.e. one college course a few years back that I've mostly forgotten). For my work, I need to make use of a sensor which only has a c++ sdk and wrap that in a way that I can trigger a c# event every time there is an updated reading, or at least at some consistent framerate.

I am still digging through the c++ library to understand which functions supply the readings I'm looking for, but it's my understanding that c++ doesn't really have events like c#, so it will be more than a matter of just wrapping whatever function I find. Can anyone offer some advice or link to a tutorial that could be helpful? Even if it's not directly applicable code examples, some guidance in the direction of what my general approach should be would be greatly appreciated.


by quixotic_illogic via /r/csharp

Leave a Reply