ChannelEthernet
Summary
Represents an Ethernet Channel Adapter object.
See also
- 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
,packet_rate
andcycle
can not be used together. The parametersrepeat
andduration
can not be used together. The parametersmax_throughput
andduration
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 isNone
duration (
float
or None) – Duration of transmission the packets, indefinitely if value isNone
, value in secondsmax_throughput (
bool
) – ifTrue
sends the packet as fast as possible, and ignore the messages timestampbitrate (
float
or None) – If specified, the packets would be burst sent with the specified bitrate, value in bit/spacket_rate (
float
or None) – If specified, the packets would be burst sent with the specified packet rate, value in packet/scycle (
float
or None) – If specified, how much time should pass before start sending messages again, value in secondspacket_overhead (
int32
) – How many bytes to add to each packet when usingbitrate
- Returns
The transmission object
- Return type
- get_mac() str
Returns the MAC address of the adapter.
- Returns
MAC address of the adapter.
- Return type
- 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: float)
Starts a pcap player using an offline source (pcap file).
- start_pcap_player(nb_play: int32, file_path: str)
Starts a pcap player using an offline source (pcap file).
- start_pcap_player(file_path: str, buffer_size: float, time_stamp: bool)
Starts a pcap player using an offline source (pcap file).
- start_pcap_player(nb_play: int32, file_path: str, auto_increment_seq_nb: bool)
Starts a pcap player using an offline source (pcap file).
- start_pcap_player(nb_play: int32, file_path: str, buffer_size: float)
Starts a pcap player using an offline source (pcap file).
- start_pcap_player(nb_play: int32, file_path: str, buffer_size: float, time_stamp: bool)
Starts a pcap player using an offline source (pcap file).
- start_pcap_player(nb_play: int32, file_path: str, buffer_size: float, 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 pathbuffer_size (
float
) – the buffer size (in MB) used by the playertime_stamp (
bool
) –True
if the player respects timestamps,False
otherwiseis_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
- Returns
The record handler responsible for recording.
- Return type
- start_transmit(data_rate: uint32, packets: IList, times: int32, is_synchronous: bool) Transmission
Deprecated, use
ChannelEthernet.create_transmit()
instead.- Parameters
- Returns
A transmission object created
- Return type
- start_transmit(distance: uint64, times: int32, is_synchronous: bool, packets: IList) Transmission
Deprecated, use
ChannelEthernet.create_transmit()
instead.- Parameters
- Returns
A transmission object created
- Return type
- 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
otherwiseis_synchronous (
bool
) –True
if transmission is synchronus with the channel adapter,False
otherwise.
- Returns
The object created for the transmission
- Return type
- stop_pcap_player()
Stops the currently running Pcap player.
- 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.