Since the analysis port is parameterized by the class type going through it, the only way to send different objects through the analysis port is if they are both extensions of the same base class (or one is an extension of the other). Parameterize the analysis port using the base class and then, as mentioned, have the write() method distinguish and upcast the transaction to the appropriate type.