Casting from parent class to child class

In reply to manik16:

It becomes more and more confusing to me.
I understood you have an UVC which is RO for you, but you know the source code, I guess.
In this case it is common and useful practice to extend classes from your UVC to add more functionality.
Each extended class has the content of the base class (here from your UVC) and the added data members, methods etc.
If you want to access the data fields comimng from your base class you can do this using the extended class. You don’t have to do any casting.