How to assign value to the function from different class with different enum

In reply to dave_59:

Thanks Dave, it works.

And the

`uvm_info(this.get_type_name(), $sformatf("Type is %h", xt.name()), UVM_NONE)

should be

`uvm_info(this.get_type_name(), $sformatf("Type is %s", xt.name()), UVM_NONE)

Thank you