I'm trying to write an external block in order to interface puredata with an external device.
The external device is connected to a callback function (an API already available in libraries in C language).
I'm not able to send the callback function result to an outlet of the block I'm trying to write.
If I use a global variable it's a mess if I use more than one block in a patch.
On the other side, I can't pass a pointer to the pd class, since the callback function is written according to the API given with the device.
is there any possibility to incapsulate a variable or a function in order to make them invisible to other objects of the same class?