All Classes Namespaces Files Functions Pages
Rx.Capture.ResultSnapshot Class Reference

This class represents the result of a Rx.Capture.RawPacket. It contains the metrics and the frames that are captured. More...

Methods

 ByteCount.Get
 Returns the number of bytes captured. More...
 
 CaptureDuration.Get
 Returns the duration of the capture. More...
 
 Clear
 Clears the counters and deletes the captured packets from the capture. More...
 
 Description.Get
 Returns a textual description of the object.
 
 ErrorCount.Get
 Returns Error count. More...
 
 Frames.Get
 Returns a list of Rx.Capture.Frame. More...
 
 Frames.GetByIndex
 Returns a Rx.Capture.Frame at the provided index. More...
 
 PacketCount.Get
 Returns the number of packets captured. More...
 
 Parent.Get
 Returns the parent object.
 
 Pcap.LastFileName.Get
 The fileName where the last pcap was saved to. More...
 
 Pcap.Nano.Save fileName
 Stores the captured frames into a pcap file. More...
 
 Pcap.Save fileName
 Stores the captured frames into a pcap file. More...
 
 Refresh.Timestamp.Get
 Returns the timestamp when the counters of this object where last refreshed. More...
 
 Refresh
 Refresh the resultobject. Update the counters and framelist. More...
 
 State.Name.Get
 Returns the status of the current capture. More...
 

Class overview

This class represents the result of a Rx.Capture.RawPacket. It contains the metrics and the frames that are captured.

To get an update of the values use Refresh.

Example
1 set port [ $server Port.Create "trunk-1-2" ]
2  set capture [ $port Rx.Capture.Add ]
3  $capture Start
4  ...
5  $capture Stop
6  set result [ $capture Result.Get ]

Definition at line 18418 of file api.tcl.

Method documentation

Rx.Capture.ResultSnapshot::ByteCount.Get

Returns the number of bytes captured.

Returns
The number of bytes captured
Example

This example returns the number of bytes captured

1 $captureResult ByteCount.Get

Returns:

2160 

Definition at line 18430 of file api.tcl.

Rx.Capture.ResultSnapshot::CaptureDuration.Get

Returns the duration of the capture.

Returns
The duration of the capture in nanoseconds
Example

This example returns the duration of the capture

1 $captureResult CaptureDuration.Get

Returns:

0 

Definition at line 18442 of file api.tcl.

Rx.Capture.ResultSnapshot::Clear

Clears the counters and deletes the captured packets from the capture.

Example

This example returns the captured frames

1 $captureResult Clear

Definition at line 18452 of file api.tcl.

Rx.Capture.ResultSnapshot::ErrorCount.Get

Returns Error count.

Returns
Returns the number of packets with incorrect CRC
Example

This example returns the number of corrupt frames

1 $captureResult ErrorCount.Get

Returns:

0 

Definition at line 18469 of file api.tcl.

Rx.Capture.ResultSnapshot::Frames.Get

Returns a list of Rx.Capture.Frame.

Returns
a list of Rx.Capture.Frame
Example

This example returns the captured frames

1 $captureResult Frames.Get

Returns:

[ <Rx.Capture.Frame object> ... ] 

Definition at line 18481 of file api.tcl.

Rx.Capture.ResultSnapshot::Frames.GetByIndex

Returns a Rx.Capture.Frame at the provided index.

Returns
a Rx.Capture.Frame
Example

This example returns the captured frame given by the index

1 $captureResult Frames.GetByIndex 0

Returns:

<Rx.Capture.Frame object> 

Definition at line 18493 of file api.tcl.

Rx.Capture.ResultSnapshot::PacketCount.Get

Returns the number of packets captured.

Returns
The number of packets this capture captured
Example

This example returns the number of packets captured

1 $captureResult PacketCount.Get

Returns:

1562 

Definition at line 18505 of file api.tcl.

Rx.Capture.ResultSnapshot::Pcap.LastFileName.Get

The fileName where the last pcap was saved to.

Example
1 $captureResult Pcap.LastFileName.Get

Returns:

mypcap.pcap 

Definition at line 18520 of file api.tcl.

Rx.Capture.ResultSnapshot::Pcap.Nano.Save   fileName  

Stores the captured frames into a pcap file.

The stored capture file can be opened by e.g. wireshark.

Note
This function requires that the pcap library is installed on the host PC. You should use the OS-specific software to install it. e.g. On windows WinPcap comes together with wireshark. It can also be installed separately if required.
Parameters
fileNameDestination filename for the capture file.
Exceptions
<tcl_error>No pcap support found: When the pcap library is not installed on the ByteBlower client PC.
ByteBlower.Rx.Capture.GetFailedWhen no results are available or when an exception occurred while obtaining the results.
ByteBlower.Rx.Capture.GetFramesFailedInvalid captured packet offset.
Example

Stores all packets captured by filter to c:.pcap which is in PcapNano format

1 $captureResult Pcap.Nano.Save "c:\\mypcap.pcap"

Definition at line 18542 of file api.tcl.

Rx.Capture.ResultSnapshot::Pcap.Save   fileName  

Stores the captured frames into a pcap file.

The stored capture file can be opened by e.g. wireshark.

Note
This function requires that the pcap library is installed on the host PC. You should use the OS-specific software to install it. e.g. On windows WinPcap comes together with wireshark. It can also be installed separately if required.
Parameters
fileNameDestination filename for the capture file.
Exceptions
<tcl_error>No pcap support found: When the pcap library is not installed on the ByteBlower client PC.
ByteBlower.Rx.Capture.GetFailedWhen no results are available or when an exception occurred while obtaining the results.
ByteBlower.Rx.Capture.GetFramesFailedInvalid captured packet offset.
Example

Stores all packets captured by filter to c:.pcap

1 $captureResult Pcap.Save "c:\\mypcap.pcap"

Definition at line 18564 of file api.tcl.

Rx.Capture.ResultSnapshot::Refresh

Refresh the resultobject. Update the counters and framelist.

Example

Refresh the result of the Capture. Add the newly captured frames

1 $captureResult Refresh

Definition at line 18584 of file api.tcl.

Rx.Capture.ResultSnapshot::Refresh.Timestamp.Get

Returns the timestamp when the counters of this object where last refreshed.

Example
1 $captureResult Refresh.Timestamp.Get

Returns:

1432805398000000000 

Definition at line 18574 of file api.tcl.

Rx.Capture.ResultSnapshot::State.Name.Get

Returns the status of the current capture.

Returns
Returns current state of this capture. Possible return values are:
  • unknown
  • unavailable
  • inactive
  • active
Example
1 $result State.Name.Get

Returns:

active 

Definition at line 18596 of file api.tcl.