Class: Trema::Stats
- Inherits:
-
Object
- Object
- Trema::Stats
- Defined in:
- ruby/trema/cli.rb
Defined Under Namespace
Classes: Packet
Instance Attribute Summary collapse
-
#ip_dst ⇒ Object
readonly
Returns the value of attribute ip_dst.
-
#ip_src ⇒ Object
readonly
Returns the value of attribute ip_src.
-
#n_octets ⇒ Object
readonly
Returns the value of attribute n_octets.
-
#n_pkts ⇒ Object
readonly
Returns the value of attribute n_pkts.
-
#tp_dst ⇒ Object
readonly
Returns the value of attribute tp_dst.
-
#tp_src ⇒ Object
readonly
Returns the value of attribute tp_src.
Instance Method Summary collapse
-
#initialize(ip_dst, tp_dst, ip_src, tp_src, n_pkts, n_octets) ⇒ Stats
constructor
A new instance of Stats.
- #packets ⇒ Object
Constructor Details
#initialize(ip_dst, tp_dst, ip_src, tp_src, n_pkts, n_octets) ⇒ Stats
Returns a new instance of Stats.
38 39 40 41 42 43 44 45 |
# File 'ruby/trema/cli.rb', line 38 def initialize ip_dst, tp_dst, ip_src, tp_src, n_pkts, n_octets @ip_dst = ip_dst @tp_dst = tp_dst.to_i @ip_src = ip_src @tp_src = tp_src.to_i @n_pkts = n_pkts.to_i @n_octets = n_octets.to_i end |
Instance Attribute Details
#ip_dst ⇒ Object (readonly)
Returns the value of attribute ip_dst.
30 31 32 |
# File 'ruby/trema/cli.rb', line 30 def ip_dst @ip_dst end |
#ip_src ⇒ Object (readonly)
Returns the value of attribute ip_src.
32 33 34 |
# File 'ruby/trema/cli.rb', line 32 def ip_src @ip_src end |
#n_octets ⇒ Object (readonly)
Returns the value of attribute n_octets.
35 36 37 |
# File 'ruby/trema/cli.rb', line 35 def n_octets @n_octets end |
#n_pkts ⇒ Object (readonly)
Returns the value of attribute n_pkts.
34 35 36 |
# File 'ruby/trema/cli.rb', line 34 def n_pkts @n_pkts end |
#tp_dst ⇒ Object (readonly)
Returns the value of attribute tp_dst.
31 32 33 |
# File 'ruby/trema/cli.rb', line 31 def tp_dst @tp_dst end |
#tp_src ⇒ Object (readonly)
Returns the value of attribute tp_src.
33 34 35 |
# File 'ruby/trema/cli.rb', line 33 def tp_src @tp_src end |