Expression on rhs is not a class or a compatible class and hence cannot be assigned to a class handle on lhs

In reply to ramankaur09:
You should show how your driver and monitor code looks like.
In your agent you have 2 analyis ports, aport and monitor_aport. Is this really your intention?