Reading Variables in "controller.cpp"

I need to read some variables inside the controller.cpp file (such as vel_des, pos_err) at my python script like how we read system monitoring commands. But I can’t figure out the way I can return the variable values and read them on my python script like odrv0.axis1.controller..

Can someone please help me on this matter?