locking_put_if&lt;Packet&gt; &gt; in;

  tlm_analysis_port&lt;Packet&gt; analysis_out;

  Consumer(sc_module_name nm) : in(&quot;in&quot;),
                                analysis_out(&quot;analysis_out&quot;)
  {
    in(*this);
  }

  virtual void put(const Packet &amp;t) {

    cout &lt;&lt; sc_time_stamp()
         &lt;&lt; &quot; SC consumer executing packet:&quot; &lt;&lt; endl
         &lt;&lt; &quot;  &quot; &lt;&lt; t &lt;&lt; endl;

    wait(123,SC_NS);

    analysis_out.write(t);
  }
};</pre></bl