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_rateandcyclecan not be used together. The parametersrepeatanddurationcan not be used together. The parametersmax_throughputanddurationcan not be used together.Note: The usage of the parameter
max_throughputcan raise OutOfMemoryException.
- Parameters
messages (
IList) – The messages to transmit.repeat (
uint32or None) – Number of times transmitting the packets, indefinitely if value isNoneduration (
floator None) – Duration of transmission the packets, indefinitely if value isNone, value in secondsmax_throughput (
bool) – ifTruesends the packet as fast as possible, and ignore the messages timestampbitrate (
floator None) – If specified, the packets would be burst sent with the specified bitrate, value in bit/spacket_rate (
floator None) – If specified, the packets would be burst sent with the specified packet rate, value in packet/scycle (
floator 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-1file_path (
str) – pcap file pathbuffer_size (
float) – the buffer size (in MB) used by the playertime_stamp (
bool) –Trueif the player respects timestamps,Falseotherwiseis_synchronous (
bool) –Trueif player is synchronus with the channel adapter,Falseotherwise.auto_increment_seq_nb (
bool) –Trueif sequence number auto increments,Falseotherwise.
- 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-1respect_timestamp (
bool) –Trueif the transmission respects timestamps,Falseotherwiseis_synchronous (
bool) –Trueif transmission is synchronus with the channel adapter,Falseotherwise.
- 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.