nopasaran.primitives.action_primitives.client_echo_primitives.ClientEchoPrimitives

class nopasaran.primitives.action_primitives.client_echo_primitives.ClientEchoPrimitives

Bases: object

Class containing Echo client action primitives for the state machine.

__init__()

Methods

__init__()

make_tcp_echo_request(inputs, outputs, ...)

Make a one-shot TCP echo request.

make_udp_echo_request(inputs, outputs, ...)

Make a one-shot UDP echo request.

static make_tcp_echo_request(inputs, outputs, state_machine)

Make a one-shot TCP echo request.

Number of input arguments: 4 Number of output arguments: 1 Optional input arguments: No Optional output arguments: No

Args:
inputs (List[str]): The list of input variable names. It contains four mandatory input arguments:
  • The name of the variable containing the IP address.

  • The name of the variable containing the port number.

  • The name of the variable containing the message to be echoed.

  • The name of the variable containing the timeout duration.

outputs (List[str]): The list of output variable names. It contains one mandatory output argument:
  • The name of the variable to store the echoed response (or None).

state_machine: The state machine object.

Returns:

None

static make_udp_echo_request(inputs, outputs, state_machine)

Make a one-shot UDP echo request.

Number of input arguments: 4 Number of output arguments: 1 Optional input arguments: No Optional output arguments: No

Args:
inputs (List[str]): The list of input variable names. It contains four mandatory input arguments:
  • The name of the variable containing the IP address.

  • The name of the variable containing the port number.

  • The name of the variable containing the message to be echoed.

  • The name of the variable containing the timeout duration.

outputs (List[str]): The list of output variable names. It contains one mandatory output argument:
  • The name of the variable to store the echoed response (or None).

state_machine: The state machine object.

Returns:

None