RmstSnkReceive Class Reference

#include <rmst_sink.hh>

Inheritance diagram for RmstSnkReceive:

NR::Callback Collaboration diagram for RmstSnkReceive:

Collaboration graph
[legend]

Detailed Description

Definition at line 55 of file rmst_sink.hh.

Public Member Functions

void recv (NRAttrVec *data, NR::handle my_handle)
 RmstSnkReceive (RmstSink *rmstSnk)

Protected Attributes

RmstSinksnk_


Constructor & Destructor Documentation

RmstSnkReceive::RmstSnkReceive RmstSink rmstSnk  )  [inline]
 

Definition at line 57 of file rmst_sink.hh.

References snk_.

00057 { snk_ = rmstSnk; }


Member Function Documentation

void RmstSnkReceive::recv NRAttrVec data,
NR::handle  my_handle
[virtual]
 

Implements NR::Callback.

Definition at line 67 of file rmst_sink.cc.

References NRSimpleAttribute< T >::getLen(), GetTime(), NRSimpleAttribute< T >::getVal(), RmstSink::recv(), RmstDataAttr, RmstIdAttr, and snk_.

00068 {
00069   NRSimpleAttribute<int> *rmst_id_attr = NULL;
00070   NRSimpleAttribute<void *> *data_buf_attr = NULL;
00071   timeval cur_time;
00072   int rmst_no;
00073   int size;
00074   void *blob_ptr;
00075 
00076   printf("RMST-SNK::recv callback got an NRAttrVec.\n");
00077   GetTime (&cur_time);
00078   printf("  time: sec = %d\n", (unsigned int) cur_time.tv_sec);
00079 
00080   rmst_id_attr = RmstIdAttr.find(data);
00081   data_buf_attr = RmstDataAttr.find(data);
00082 
00083   rmst_no = rmst_id_attr->getVal();
00084   blob_ptr = data_buf_attr->getVal();
00085   size = data_buf_attr->getLen();
00086 
00087   printf("  Got a blob, rmstId = %d, size = %d\n", rmst_no, size);
00088   snk_->recv((void *)blob_ptr, size);
00089 }

Here is the call graph for this function:


Field Documentation

RmstSink* RmstSnkReceive::snk_ [protected]
 

Definition at line 60 of file rmst_sink.hh.

Referenced by recv(), and RmstSnkReceive().


The documentation for this class was generated from the following files:
Generated on Tue Mar 6 17:27:59 2007 for ns2 Network Simulator 2.29 by  doxygen 1.4.6