Q2NS dev
ns-3 module
Loading...
Searching...
No Matches
q2nsviz-trace.h File Reference
#include "ns3/nstime.h"
#include "ns3/q2nsviz-trace-writer.h"
#include <initializer_list>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
Include dependency graph for q2nsviz-trace.h:

Go to the source code of this file.

Functions

template<typename... Ts>
std::string StrCat (Ts &&... parts)
 
uint64_t NowNs ()
 
void TraceCreateNode (const std::string &label, int xPct, int yPct)
 
void TraceCreateChannel (const std::string &from, const std::string &to, const std::string &kind)
 
void TraceCreateQubit (const std::string &node, const std::string &bitLabel)
 
void TraceCreateCbit (const std::string &node, const std::string &bitLabel)
 
void TraceRemoveCbit (const std::string &bitLabel, uint64_t t_ns=NowNs())
 
void TraceEntangle (const std::vector< std::string > &bits)
 
void TraceEntangle (const std::vector< std::string > &bits, uint64_t duration_ns)
 
void TraceEntangle (const std::vector< std::string > &bits, ns3::Time duration)
 
void TraceMeasure (const std::string &bitLabel, const std::string &base="Z")
 
void TraceMeasure (const std::string &bitLabel, uint64_t duration_ns, const std::string &base="Z")
 
void TraceMeasure (const std::string &bitLabel, ns3::Time duration, const std::string &base="Z")
 
void TraceGraphMeasure (const std::string &bitLabel, const std::string &base="Z", const std::string &supportNode="")
 
void TraceGraphMeasure (const std::string &bitLabel, uint64_t duration_ns, const std::string &base="Z", const std::string &supportNode="")
 
void TraceGraphMeasure (const std::string &bitLabel, ns3::Time duration, const std::string &base="Z", const std::string &supportNode="")
 
void TraceRemoveQubit (const std::string &bitLabel, const std::string &reason="discarded", uint64_t t_ns=NowNs())
 
void TraceSendQubit (const std::string &bitLabel, const std::string &from, const std::string &to, uint64_t t0_ns, uint64_t t1_ns)
 
void TraceSendQubit (const std::string &bitLabel, const std::string &from, const std::string &to, ns3::Time t0, ns3::Time t1)
 
void TraceSendCbit (const std::string &bitLabel, const std::string &from, const std::string &to, uint64_t t0_ns, uint64_t t1_ns)
 
void TraceSendCbit (const std::string &bitLabel, const std::string &from, const std::string &to, ns3::Time t0, ns3::Time t1)
 
void TraceSendPacket (const std::string &from, const std::string &to, uint64_t t0_ns, uint64_t t1_ns, const std::string &label, const std::string &protocol="")
 
void TraceSendPacket (const std::string &from, const std::string &to, ns3::Time t0, ns3::Time t1, const std::string &label, const std::string &protocol="")
 
void _TraceString (const std::string &text)
 
void Trace (const std::string &text)
 
template<typename... Ts>
void Trace (Ts &&... parts)
 
void _TraceNodeTextString (const std::string &node, const std::string &text)
 
void TraceNodeText (const std::string &node, const std::string &text)
 
template<typename... Ts>
void TraceNodeText (const std::string &node, Ts &&... parts)
 

Function Documentation

◆ _TraceNodeTextString()

void _TraceNodeTextString ( const std::string &  node,
const std::string &  text 
)
inline

Definition at line 272 of file q2nsviz-trace.h.

References TraceWriter::Instance(), J(), JTns(), and TraceWriter::Write().

Referenced by TraceNodeText(), and TraceNodeText().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _TraceString()

void _TraceString ( const std::string &  text)
inline

Definition at line 257 of file q2nsviz-trace.h.

References TraceWriter::Instance(), J(), JTns(), and TraceWriter::Write().

Referenced by Trace(), and Trace().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ NowNs()

uint64_t NowNs ( )
inline

Definition at line 46 of file q2nsviz-trace.h.

◆ StrCat()

template<typename... Ts>
std::string StrCat ( Ts &&...  parts)
inline

Definition at line 40 of file q2nsviz-trace.h.

Referenced by main(), Trace(), and TraceNodeText().

Here is the caller graph for this function:

◆ Trace() [1/2]

void Trace ( const std::string &  text)
inline

Definition at line 264 of file q2nsviz-trace.h.

References _TraceString().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Trace() [2/2]

template<typename... Ts>
void Trace ( Ts &&...  parts)
inline

Definition at line 268 of file q2nsviz-trace.h.

References _TraceString(), and StrCat().

Here is the call graph for this function:

◆ TraceCreateCbit()

void TraceCreateCbit ( const std::string &  node,
const std::string &  bitLabel 
)
inline

Definition at line 85 of file q2nsviz-trace.h.

References TraceWriter::Instance(), J(), JTns(), and TraceWriter::Write().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceCreateChannel()

void TraceCreateChannel ( const std::string &  from,
const std::string &  to,
const std::string &  kind 
)
inline

Definition at line 62 of file q2nsviz-trace.h.

References TraceWriter::Instance(), J(), and TraceWriter::Write().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceCreateNode()

void TraceCreateNode ( const std::string &  label,
int  xPct,
int  yPct 
)
inline

Definition at line 54 of file q2nsviz-trace.h.

References TraceWriter::Instance(), J(), and TraceWriter::Write().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceCreateQubit()

void TraceCreateQubit ( const std::string &  node,
const std::string &  bitLabel 
)
inline

Definition at line 74 of file q2nsviz-trace.h.

References TraceWriter::Instance(), J(), JTns(), and TraceWriter::Write().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceEntangle() [1/3]

void TraceEntangle ( const std::vector< std::string > &  bits)
inline

Definition at line 104 of file q2nsviz-trace.h.

References TraceWriter::Instance(), J(), JTns(), and TraceWriter::Write().

Referenced by main(), and TraceEntangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceEntangle() [2/3]

void TraceEntangle ( const std::vector< std::string > &  bits,
ns3::Time  duration 
)
inline

Definition at line 132 of file q2nsviz-trace.h.

References TraceEntangle().

Here is the call graph for this function:

◆ TraceEntangle() [3/3]

void TraceEntangle ( const std::vector< std::string > &  bits,
uint64_t  duration_ns 
)
inline

Definition at line 119 of file q2nsviz-trace.h.

References TraceWriter::Instance(), J(), JTns(), and TraceWriter::Write().

Here is the call graph for this function:

◆ TraceGraphMeasure() [1/3]

void TraceGraphMeasure ( const std::string &  bitLabel,
const std::string &  base = "Z",
const std::string &  supportNode = "" 
)
inline

Definition at line 162 of file q2nsviz-trace.h.

References TraceWriter::Instance(), J(), JTns(), and TraceWriter::Write().

Referenced by TraceGraphMeasure().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceGraphMeasure() [2/3]

void TraceGraphMeasure ( const std::string &  bitLabel,
ns3::Time  duration,
const std::string &  base = "Z",
const std::string &  supportNode = "" 
)
inline

Definition at line 190 of file q2nsviz-trace.h.

References TraceGraphMeasure().

Here is the call graph for this function:

◆ TraceGraphMeasure() [3/3]

void TraceGraphMeasure ( const std::string &  bitLabel,
uint64_t  duration_ns,
const std::string &  base = "Z",
const std::string &  supportNode = "" 
)
inline

Definition at line 177 of file q2nsviz-trace.h.

References TraceWriter::Instance(), J(), JTns(), and TraceWriter::Write().

Here is the call graph for this function:

◆ TraceMeasure() [1/3]

void TraceMeasure ( const std::string &  bitLabel,
const std::string &  base = "Z" 
)
inline

Definition at line 138 of file q2nsviz-trace.h.

References TraceWriter::Instance(), J(), JTns(), and TraceWriter::Write().

Referenced by main(), and TraceMeasure().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceMeasure() [2/3]

void TraceMeasure ( const std::string &  bitLabel,
ns3::Time  duration,
const std::string &  base = "Z" 
)
inline

Definition at line 156 of file q2nsviz-trace.h.

References TraceMeasure().

Here is the call graph for this function:

◆ TraceMeasure() [3/3]

void TraceMeasure ( const std::string &  bitLabel,
uint64_t  duration_ns,
const std::string &  base = "Z" 
)
inline

Definition at line 148 of file q2nsviz-trace.h.

References TraceWriter::Instance(), J(), JTns(), and TraceWriter::Write().

Here is the call graph for this function:

◆ TraceNodeText() [1/2]

void TraceNodeText ( const std::string &  node,
const std::string &  text 
)
inline

Definition at line 280 of file q2nsviz-trace.h.

References _TraceNodeTextString().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceNodeText() [2/2]

template<typename... Ts>
void TraceNodeText ( const std::string &  node,
Ts &&...  parts 
)
inline

Definition at line 284 of file q2nsviz-trace.h.

References _TraceNodeTextString(), and StrCat().

Here is the call graph for this function:

◆ TraceRemoveCbit()

void TraceRemoveCbit ( const std::string &  bitLabel,
uint64_t  t_ns = NowNs() 
)
inline

Definition at line 93 of file q2nsviz-trace.h.

References TraceWriter::Instance(), J(), and TraceWriter::Write().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceRemoveQubit()

void TraceRemoveQubit ( const std::string &  bitLabel,
const std::string &  reason = "discarded",
uint64_t  t_ns = NowNs() 
)
inline

Definition at line 196 of file q2nsviz-trace.h.

References TraceWriter::Instance(), J(), and TraceWriter::Write().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceSendCbit() [1/2]

void TraceSendCbit ( const std::string &  bitLabel,
const std::string &  from,
const std::string &  to,
ns3::Time  t0,
ns3::Time  t1 
)
inline

Definition at line 232 of file q2nsviz-trace.h.

References TraceSendCbit().

Here is the call graph for this function:

◆ TraceSendCbit() [2/2]

void TraceSendCbit ( const std::string &  bitLabel,
const std::string &  from,
const std::string &  to,
uint64_t  t0_ns,
uint64_t  t1_ns 
)
inline

Definition at line 224 of file q2nsviz-trace.h.

References TraceWriter::Instance(), J(), and TraceWriter::Write().

Referenced by main(), and TraceSendCbit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceSendPacket() [1/2]

void TraceSendPacket ( const std::string &  from,
const std::string &  to,
ns3::Time  t0,
ns3::Time  t1,
const std::string &  label,
const std::string &  protocol = "" 
)
inline

Definition at line 248 of file q2nsviz-trace.h.

References TraceSendPacket().

Here is the call graph for this function:

◆ TraceSendPacket() [2/2]

void TraceSendPacket ( const std::string &  from,
const std::string &  to,
uint64_t  t0_ns,
uint64_t  t1_ns,
const std::string &  label,
const std::string &  protocol = "" 
)
inline

Definition at line 237 of file q2nsviz-trace.h.

References TraceWriter::Instance(), J(), and TraceWriter::Write().

Referenced by main(), and TraceSendPacket().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceSendQubit() [1/2]

void TraceSendQubit ( const std::string &  bitLabel,
const std::string &  from,
const std::string &  to,
ns3::Time  t0,
ns3::Time  t1 
)
inline

Definition at line 219 of file q2nsviz-trace.h.

References TraceSendQubit().

Here is the call graph for this function:

◆ TraceSendQubit() [2/2]

void TraceSendQubit ( const std::string &  bitLabel,
const std::string &  from,
const std::string &  to,
uint64_t  t0_ns,
uint64_t  t1_ns 
)
inline

Definition at line 211 of file q2nsviz-trace.h.

References TraceWriter::Instance(), J(), and TraceWriter::Write().

Referenced by main(), and TraceSendQubit().

Here is the call graph for this function:
Here is the caller graph for this function: