ChannelEthernet

Summary

Represents an Ethernet Channel Adapter object.

See also

Transmission

Methods
Properties

Structure

class ChannelEthernet
create_transmit(messages: IList, repeat: uint32 or None = None, duration: float or None = None, max_throughput: bool = False, bitrate: float or None = None, packet_rate: float or None = None, cycle: float or None = None, packet_overhead: int32 = 4) Transmission
Create a transmission of a burst of messages, useful to write load/stress tests.

Depending on the arguments provided, a different kind of load test is executed. The parameters max_throughput, bitrate and packet_rate can not be used together. The parameters repeat and duration can not be used together. The parameters max_throughput and duration can not be used together.

Note: The usage of the parameter max_throughput can raise OutOfMemoryException.

Parameters
  • messages (IList) – The messages to transmit.

  • repeat (uint32 or None) – Number of times transmitting the packets, indefinitely if value is None

  • duration (float or None) – Duration of transmission the packets, indefinitely if value is None, value in seconds

  • max_throughput (bool) – if True sends the packet as fast as possible, and ignore the messages timestamp

  • bitrate (float or None) – If specified, the packets would be burst sent with the specified bitrate, value in bit/s

  • packet_rate (float or None) – If specified, the packets would be burst sent with the specified packet rate, value in packet/s

  • cycle (float or None) – If specified, how much time should pass before start sending messages again, value in seconds

  • packet_overhead (int32) – How many bytes to add to each packet when using bitrate

Returns

The transmission object

Return type

Transmission

get_ip() str

Returns the IP address of the adapter.

Returns

Adapter's IP address

Return type

str

get_ips() List[str]

returns a list of the ip addresses of the devices in the network

Returns

list of IP addresses

Return type

List[str]

get_ipv6() str

Returns the IPv6 address of the adapter.

Returns

Adapter's IP address

Return type

str

get_mac() str

Returns the MAC address of the adapter.

Returns

MAC address of the adapter.

Return type

str

refresh()

Refresh the adapter.

start_pcap_player(file_path: str)

Starts a pcap player using an offline source (pcap file).

Parameters

file_path (str) – pcap file path

start_pcap_player(file_path: str, buffer_size: int32)

Starts a pcap player using an offline source (pcap file).

Parameters
  • file_path (str) – pcap file path

  • buffer_size (int32) – the buffer size user by the player

start_pcap_player(nb_play: int32, file_path: str)

Starts a pcap player using an offline source (pcap file).

Parameters
  • nb_play (int32) – number of times playing the pcap file, indefinitely if value is -1

  • file_path (str) – pcap file path

start_pcap_player(file_path: str, buffer_size: int32, time_stamp: bool)

Starts a pcap player using an offline source (pcap file).

Parameters
  • file_path (str) – pcap file path

  • buffer_size (int32) – the buffer size used by the player

  • time_stamp (bool) – True if the player respects timestamps, False otherwise

start_pcap_player(nb_play: int32, file_path: str, auto_increment_seq_nb: bool)

Starts a pcap player using an offline source (pcap file).

Parameters
  • nb_play (int32) – number of times playing the pcap file, indefinitely if value is -1

  • file_path (str) – pcap file path

  • auto_increment_seq_nb (bool) – True if sequence number auto increments, False otherwise.

start_pcap_player(nb_play: int32, file_path: str, buffer_size: int32)

Starts a pcap player using an offline source (pcap file).

Parameters
  • nb_play (int32) – number of times playing the pcap file, indefinitely if value is -1

  • file_path (str) – pcap file path

  • buffer_size (int32) – the buffer size used by the player

start_pcap_player(nb_play: int32, file_path: str, buffer_size: int32, time_stamp: bool)

Starts a pcap player using an offline source (pcap file).

Parameters
  • nb_play (int32) – number of times playing the pcap file, indefinitely if value is -1

  • file_path (str) – pcap file path

  • buffer_size (int32) – the buffer size used by the player

  • time_stamp (bool) – True if the player respects timestamps, False otherwise

start_pcap_player(nb_play: int32, file_path: str, buffer_size: int32, time_stamp: bool, is_synchronous: bool, auto_increment_seq_nb: bool)

Starts a pcap player using an offline source (pcap file).

Parameters
  • nb_play (int32) – number of times playing the pcap file, indefinitely if value is -1

  • file_path (str) – pcap file path

  • buffer_size (int32) – the buffer size used by the player

  • time_stamp (bool) – True if the player respects timestamps, False otherwise

  • is_synchronous (bool) – True if player is synchronus with the channel adapter, False otherwise.

  • auto_increment_seq_nb (bool) – True if sequence number auto increments, False otherwise.

start_record(file: str, filter: Filter = None) IRecordHandler

Starts recording the traffic on the adapter to an output file.

Parameters
  • file (str) – The file to record into.

  • filter (Filter) – Filter to use to narrow down packets to capture

Returns

The record handler responsible for recording.

Return type

IRecordHandler

start_transmit(data_rate: uint32, packets: IList, times: int32, is_synchronous: bool) Transmission

Deprecated, use ChannelEthernet.create_transmit() instead.

Parameters
  • data_rate (uint32) – the data rate with which the packets are sent.

  • packets (IList) – The packets to transmit.

  • times (int32) – Number of times transmitting the packets, indefinitely if value is -1

  • is_synchronous (bool) – True if transmission is synchronus with the channel adapter, False otherwise.

Returns

A transmission object created

Return type

Transmission

start_transmit(distance: uint64, times: int32, is_synchronous: bool, packets: IList) Transmission

Deprecated, use ChannelEthernet.create_transmit() instead.

Parameters
  • distance (uint64) – the distance between packets

  • times (int32) – Number of times transmitting the packets, indefinitely if value is -1

  • is_synchronous (bool) – True if transmission is synchronus with the channel adapter, False otherwise.

  • packets (IList) – The packets to transmit.

Returns

A transmission object created

Return type

Transmission

start_transmit(packets: IList, times: int32, respect_timestamp: bool, is_synchronous: bool) Transmission

Deprecated, use ChannelEthernet.create_transmit() instead.

Parameters
  • packets (IList) – The packets to transmit.

  • times (int32) – Number of times transmitting the packets, indefinitely if value is -1

  • respect_timestamp (bool) – True if the transmission respects timestamps, False otherwise

  • is_synchronous (bool) – True if transmission is synchronus with the channel adapter, False otherwise.

Returns

The object created for the transmission

Return type

Transmission

stop_pcap_player()

Starts a pcap player using an online source (network device).

stop_record()

stops capturing transmission

stop_transmit()

Stops all the burst transmissions from the adapter.

stop_transmit(tr: Transmission)

Stops a certain burst transmission from the adapter.

Parameters

tr (Transmission) – The transmission to stop.

cluster_name

The name of the cluster that is mapped to the channel.

Type

str

name

The channel name. This Property is Read Only.

Type

str