Downcasting to subclass pointer

8 views
Skip to first unread message

zahed052

unread,
Nov 21, 2017, 12:08:26 PM11/21/17
to ns-3-users
I am trying to call a function implemented in a sub class mac layer using a pointer to the abstract base mac layer. I tried both DynamicCast and GetObject methods. However, in either case,  mac addresses of all of my nodes becomes 00:00:00:00:00:00(i.e. when I print them from sub class mac layer)

If I put that function in the base layer it works, but this function is only specific to sub class. Any help would be appreciated.

Thanks,
Reply all
Reply to author
Forward
0 new messages