#include <basetrace.h>
Inheritance diagram for EventTrace:


Definition at line 87 of file basetrace.h.
Public Member Functions | |
| char * | buffer () |
| void | channel (Tcl_Channel ch) |
| Tcl_Channel | channel () |
| virtual int | command (int argc, const char *const *argv) |
| virtual void | dump () |
| EventTrace () | |
| void | flush (Tcl_Channel channel) |
| void | namchannel (Tcl_Channel namch) |
| Tcl_Channel | namchannel () |
| virtual void | namdump () |
| char * | nbuffer () |
| void | tagged (bool tag) |
| bool | tagged () |
| virtual void | trace () |
Static Public Member Functions | |
| static double | round (double x, double precision=PRECISION) |
Protected Attributes | |
| Tcl_Channel | channel_ |
| Tcl_Channel | namChan_ |
| char * | nwrk_ |
| bool | tagged_ |
| char * | wrk_ |
|
|
Definition at line 89 of file basetrace.h. 00089 : BaseTrace() {}
|
|
|
|
Definition at line 54 of file basetrace.h. References BaseTrace::channel_. 00054 {channel_ = ch; }
|
|
|
Definition at line 53 of file basetrace.h. References BaseTrace::channel_. Referenced by Trace::command(), and DequeTrace::recv(). 00053 { return channel_; }
|
|
||||||||||||
|
Definition at line 121 of file basetrace.cc. References BaseTrace::channel_, BaseTrace::namChan_, and BaseTrace::tagged(). 00122 { 00123 Tcl& tcl = Tcl::instance(); 00124 if (argc == 2) { 00125 if (strcmp(argv[1], "detach") == 0) { 00126 channel_ = 0; 00127 namChan_ = 0; 00128 return (TCL_OK); 00129 } 00130 if (strcmp(argv[1], "flush") == 0) { 00131 if (channel_ != 0) 00132 Tcl_Flush(channel_); 00133 if (namChan_ != 0) 00134 Tcl_Flush(namChan_); 00135 return (TCL_OK); 00136 } 00137 if (strcmp(argv[1], "tagged") == 0) { 00138 tcl.resultf("%d", tagged()); 00139 return (TCL_OK); 00140 } 00141 } else if (argc == 3) { 00142 if (strcmp(argv[1], "attach") == 0) { 00143 int mode; 00144 const char* id = argv[2]; 00145 channel_ = Tcl_GetChannel(tcl.interp(), (char*)id, 00146 &mode); 00147 if (channel_ == 0) { 00148 tcl.resultf("trace: can't attach %s for writing", id); 00149 return (TCL_ERROR); 00150 } 00151 return (TCL_OK); 00152 } 00153 if (strcmp(argv[1], "namattach") == 0) { 00154 int mode; 00155 const char* id = argv[2]; 00156 namChan_ = Tcl_GetChannel(tcl.interp(), (char*)id, 00157 &mode); 00158 if (namChan_ == 0) { 00159 tcl.resultf("trace: can't attach %s for writing", id); 00160 return (TCL_ERROR); 00161 } 00162 return (TCL_OK); 00163 } 00164 if (strcmp(argv[1], "tagged") == 0) { 00165 int tag; 00166 if (Tcl_GetBoolean(tcl.interp(), 00167 (char*)argv[2], &tag) == TCL_OK) { 00168 tagged(tag); 00169 return (TCL_OK); 00170 } else return (TCL_ERROR); 00171 } 00172 } 00173 return (TclObject::command(argc, argv)); 00174 }
Here is the call graph for this function: ![]() |
|
|
|
Definition at line 59 of file basetrace.h. Referenced by Trace::command(). 00059 { Tcl_Flush(channel); }
|
|
|
Definition at line 57 of file basetrace.h. References BaseTrace::namChan_. 00057 {namChan_ = namch; }
|
|
|
Definition at line 56 of file basetrace.h. References BaseTrace::namChan_. Referenced by Trace::command(), CMUTrace::format(), DequeTrace::recv(), and SatDequeTrace::recv(). 00056 { return namChan_; }
|
|
|
Definition at line 95 of file basetrace.cc. References BaseTrace::namChan_, and BaseTrace::nwrk_. Referenced by DequeTrace::recv(), Trace::recv(), SatDequeTrace::recv(), Trace::recvOnly(), trace(), and Trace::write_nam_trace(). 00096 { 00097 int n = 0; 00098 00099 /* Otherwise nwrk_ isn't initialized */ 00100 if (namChan_ != 0) 00101 n = strlen(nwrk_); 00102 if ((n > 0) && (namChan_ != 0)) { 00103 /* 00104 * tack on a newline (temporarily) instead 00105 * of doing two writes 00106 */ 00107 nwrk_[n] = '\n'; 00108 nwrk_[n + 1] = 0; 00109 (void)Tcl_Write(namChan_, nwrk_, n + 1); 00110 //Tcl_Flush(channel_); 00111 nwrk_[n] = 0; 00112 } 00113 }
|
|
|
Definition at line 51 of file basetrace.h. References BaseTrace::nwrk_. Referenced by DequeTrace::recv(), TcpAgent::trace_event(), MacSimple::trace_event(), Mac802_11::trace_event(), ErrorModel::trace_event(), and Trace::write_nam_trace(). 00051 {return nwrk_; }
|
|
||||||||||||
|
Definition at line 72 of file basetrace.h. Referenced by SatGeometry::distance(), HttpApp::log(), SatGeometry::propdelay(), Trace::trace(), TcpAgent::trace_event(), MacSimple::trace_event(), Mac802_11::trace_event(), and ErrorModel::trace_event().
|
|
|
Definition at line 77 of file basetrace.h. References BaseTrace::tagged_.
|
|
|
Definition at line 76 of file basetrace.h. References BaseTrace::tagged_. Referenced by Trace::annotate(), Trace::command(), BaseTrace::command(), CMUTrace::format_aodv(), CMUTrace::format_arp(), CMUTrace::format_dsr(), SatTrace::format_hdlc(), CMUTrace::format_imep(), CMUTrace::format_ip(), CMUTrace::format_mac(), CMUTrace::format_tcp(), CMUTrace::format_tora(), DequeTrace::recv(), and Trace::trace(). 00076 { return tagged_; }
|
|
|
Definition at line 178 of file basetrace.cc. References BaseTrace::dump(), and BaseTrace::namdump(). Referenced by TcpAgent::trace_event(), and ErrorModel::trace_event().
Here is the call graph for this function: ![]() |
|
|
Definition at line 80 of file basetrace.h. Referenced by BaseTrace::channel(), BaseTrace::command(), and BaseTrace::dump(). |
|
|
Definition at line 81 of file basetrace.h. Referenced by BaseTrace::command(), BaseTrace::namchannel(), and BaseTrace::namdump(). |
|
|
Definition at line 83 of file basetrace.h. Referenced by BaseTrace::BaseTrace(), BaseTrace::namdump(), BaseTrace::nbuffer(), and BaseTrace::~BaseTrace(). |
|
|
Definition at line 84 of file basetrace.h. Referenced by BaseTrace::tagged(). |
|
|
Definition at line 82 of file basetrace.h. Referenced by BaseTrace::BaseTrace(), BaseTrace::buffer(), BaseTrace::dump(), and BaseTrace::~BaseTrace(). |
1.4.6